Reword discovery warning message

This commit is contained in:
tsightler
2022-08-28 22:22:43 -04:00
parent d2dfd06f62
commit 8b58605675

View File

@@ -151,17 +151,23 @@ class RingMqtt {
const locations = await this.client.getLocations()
debug(colors.green('-'.repeat(90)))
debug(colors.white('This account has access to the following locations:'))
locations.map(function(location) {
debug(' '+colors.green(location.name)+colors.cyan(` (${location.id})`))
})
debug(colors.green(' '.repeat(90)))
debug(colors.brightYellow('IMPORTANT: ')+colors.white('All alarm and smart lighting hubs at these locations *MUST* be online '))
debug(colors.white(' or device discovery for that location will hang indefinitely! '))
debug(colors.white(' If desired, use the "location_ids" config option to restrict discovery '))
debug(colors.white(' to specific locations. Please see the documentation for more details. '))
debug(colors.brightYellow('IMPORTANT: ')+colors.white('If *ANY* alarm or smart lighting hubs at these locations are *OFFLINE* '))
debug(colors.white(' the discovery process below will hang and no devices will be published!'))
debug(colors.white(' If there is no "Device Discovery Complete" message logged below, please'))
debug(colors.white(' check the Ring app for any hubs that are in offline state and either '))
debug(colors.white(' bring them back online or remove any offline hub from the location and '))
debug(colors.white(' restart ring-mqtt. '))
debug(colors.white(' If desired, the "location_ids" config option can be used to restrict '))
debug(colors.white(' discovery to specific locations. See the documentation for details. '))
// Loop through each location and update stored locations/devices
debug(colors.white('Starting Device Discovery...'))
for (const location of locations) {
let cameras = new Array()
let chimes = new Array()
@@ -243,6 +249,7 @@ class RingMqtt {
debug(colors.yellow(` Unsupported device: ${deviceType}`))
})
}
debug(colors.white('Device Discovery Complete'))
debug(colors.green('-'.repeat(90)))
debug('Ring location/device data updated, sleeping for 5 seconds.')
await utils.sleep(2)