homebridge-plugins / homebridge-resideo

The Homebridge Resideo plugin allows you to access your Resideo devices from HomeKit.
ISC License
37 stars 8 forks source link

Bug: Cannot read battery level of leak detector. #547

Closed InfiniteTape closed 3 years ago

InfiniteTape commented 3 years ago

Describe The Bug

Started with a fresh install of Homebridge 1.3.4 and Honeywell plugin 10.0.1. Battery level of all three Honeywell leak detectors shows null%.

To Reproduce

Install Homebridge fresh on Raspbian. Add just the Honeywell plugin and authenticate it.

Expected behavior

Battery level is reported correctly.

Relevant log output

[9/6/2021, 3:18:09 PM] Homebridge v1.3.4 (Homebridge 786D) is running on port 51407.
[9/6/2021, 3:18:11 PM] [HoneywellHome] Total Locations Found: 1
[9/6/2021, 3:18:11 PM] [HoneywellHome] Total Devices Found at Home : 3
[9/6/2021, 3:18:11 PM] [HoneywellHome] Adding new accessory: Water Heater LeakDetector DeviceID: ID1
[Water Heater LeakDetector@@Battery Level] Characteristic not in required or optional characteristic section for service LeakSensor. Adding anyway.
[9/6/2021, 3:18:11 PM] [HoneywellHome] Adding new accessory: Kitchen Sink LeakDetector DeviceID: ID2
[Kitchen Sink LeakDetector@@Battery Level] Characteristic not in required or optional characteristic section for service LeakSensor. Adding anyway.
[9/6/2021, 3:18:11 PM] [HoneywellHome] Adding new accessory: Refrigerator LeakDetector DeviceID: ID3
[Refrigerator LeakDetector@@Battery Level] Characteristic not in required or optional characteristic section for service LeakSensor. Adding anyway.
...RESTART HERE...
[9/6/2021, 3:25:33 PM] [HoneywellHome] Total Locations Found: 1
[9/6/2021, 3:25:33 PM] [HoneywellHome] Total Devices Found at Home : 3
[9/6/2021, 3:25:33 PM] [HoneywellHome] Restoring existing accessory from cache: Water Heater LeakDetector DeviceID: ID1
[9/6/2021, 3:25:33 PM] [HoneywellHome] LS Water Heater LeakDetector - 15.22°, 61.2%
[9/6/2021, 3:25:33 PM] [HoneywellHome] Adding service
[9/6/2021, 3:25:33 PM] [HoneywellHome] Adding service
[9/6/2021, 3:25:33 PM] [HoneywellHome] Leak Sensor UDID: Water Heater-ID1-LeakDetector
[9/6/2021, 3:25:33 PM] [HoneywellHome] Restoring existing accessory from cache: Kitchen Sink LeakDetector DeviceID: ID2
[9/6/2021, 3:25:33 PM] [HoneywellHome] LS Kitchen Sink LeakDetector - 22.91°, 46.9%
[9/6/2021, 3:25:33 PM] [HoneywellHome] Adding service
[9/6/2021, 3:25:33 PM] [HoneywellHome] Adding service
[9/6/2021, 3:25:33 PM] [HoneywellHome] Leak Sensor UDID: Kitchen Sink-ID2-LeakDetector
[9/6/2021, 3:25:33 PM] [HoneywellHome] Restoring existing accessory from cache: Refrigerator LeakDetector DeviceID: ID3
[9/6/2021, 3:25:33 PM] [HoneywellHome] LS Refrigerator LeakDetector - 21.69°, 47.4%
[9/6/2021, 3:25:33 PM] [HoneywellHome] Adding service
[9/6/2021, 3:25:33 PM] [HoneywellHome] Adding service
[9/6/2021, 3:25:33 PM] [HoneywellHome] Leak Sensor UDID: Refrigerator-ID3-LeakDetector
[9/6/2021, 3:27:34 PM] [HoneywellHome] LS Kitchen Sink LeakDetector -  {"waterPresent":false,"currentSensorReadings":{"time":"2021-09-06T00:42:59","temperature":22.91,"humidity":46.9},"currentAlarms":[],"lastCheckin":"2021-09-06T00:43:01","lastDeviceSettingUpdatedOn":"0001-01-01T00:00:00","batteryRemaining":76,"isRegistered":true,"hasDeviceCheckedIn":true,"isDeviceOffline":false,"firstFailedAttemptTime":"0001-01-01T00:00:00","failedConnectionAttempts":0,"wifiSignalStrength":-47,"time":"2021-09-06T00:43:00","deviceClass":"LeakDetector","deviceType":"Water Leak Detector","deviceID":"ID2","deviceInternalID":1374316,"userDefinedDeviceName":"Kitchen Sink","backend":{},"isAlive":true,"isUpgrading":false,"isProvisioned":true,"deviceSettings":{"temp":{"high":{"limit":37},"low":{"limit":7}},"humidity":{"high":{"limit":70},"low":{"limit":20}},"userDefinedName":"Kitchen Sink","buzzerMuted":false,"checkinPeriod":24,"currentSensorReadPeriod":60},"service":{"mode":"Up"},"deviceRegistrationDate":"2019-04-04T14:49:56.4033333"}
[9/6/2021, 3:27:34 PM] [HoneywellHome] LS Kitchen Sink LeakDetector - 22.91°, 46.9%
[9/6/2021, 3:27:34 PM] [HoneywellHome] LS Water Heater LeakDetector -  {"waterPresent":false,"currentSensorReadings":{"time":"2021-09-05T19:29:14","temperature":15.22,"humidity":61.2},"currentAlarms":[],"lastCheckin":"2021-09-05T19:29:15","lastDeviceSettingUpdatedOn":"0001-01-01T00:00:00","batteryRemaining":68,"isRegistered":true,"hasDeviceCheckedIn":true,"isDeviceOffline":false,"firstFailedAttemptTime":"0001-01-01T00:00:00","failedConnectionAttempts":0,"wifiSignalStrength":-51,"time":"2021-09-05T19:29:14","deviceClass":"LeakDetector","deviceType":"Water Leak Detector","deviceID":"ID1","deviceInternalID":1007237,"userDefinedDeviceName":"Water Heater","backend":{},"isAlive":true,"isUpgrading":false,"isProvisioned":true,"deviceSettings":{"temp":{"high":{"limit":37},"low":{"limit":7}},"humidity":{"high":{"limit":70},"low":{"limit":20}},"userDefinedName":"Water Heater","buzzerMuted":false,"checkinPeriod":24,"currentSensorReadPeriod":60},"service":{"mode":"Up"},"deviceRegistrationDate":"2020-02-01T18:21:05.3866667"}
[9/6/2021, 3:27:34 PM] [HoneywellHome] LS Water Heater LeakDetector - 15.22°, 61.2%
[9/6/2021, 3:27:34 PM] [HoneywellHome] LS Refrigerator LeakDetector -  {"waterPresent":false,"currentSensorReadings":{"time":"2021-09-06T10:20:35","temperature":21.69,"humidity":47.4},"currentAlarms":[],"lastCheckin":"2021-09-06T10:20:36","lastDeviceSettingUpdatedOn":"0001-01-01T00:00:00","batteryRemaining":95,"isRegistered":true,"hasDeviceCheckedIn":true,"isDeviceOffline":false,"firstFailedAttemptTime":"0001-01-01T00:00:00","failedConnectionAttempts":0,"wifiSignalStrength":-44,"time":"2021-09-06T10:20:35","deviceClass":"LeakDetector","deviceType":"Water Leak Detector","deviceID":"ID3","deviceInternalID":3039702,"userDefinedDeviceName":"Refrigerator","backend":{},"isAlive":true,"isUpgrading":false,"isProvisioned":true,"deviceSettings":{"temp":{"high":{"limit":37},"low":{"limit":7}},"humidity":{"high":{"limit":70},"low":{"limit":20}},"userDefinedName":"Refrigerator","buzzerMuted":false,"checkinPeriod":24,"currentSensorReadPeriod":60},"service":{"mode":"Up"},"deviceRegistrationDate":"2021-04-11T19:31:50.9566667"}
[9/6/2021, 3:27:34 PM] [HoneywellHome] LS Refrigerator LeakDetector - 21.69°, 47.4%

Config for homebridge-honeywell-home

{
            "name": "HoneywellHome",
            "credentials": {
                "consumerKey": "key",
                "consumerSecret": "secret",
                "refreshToken": "token",
                "notice": "Keep your tokens a secret!"
            },
            "options": {
                "refreshRate": 120,
                "thermostat": {
                    "thermostatSetpointStatus": "PermanentHold"
                },
                "roompriority": {
                    "priorityType": "PickARoom"
                }
            },
            "platform": "HoneywellHome"
        }

Screenshots

No response

Device & Model

Honeywell Leak Detector

Node.js Version

v14.17.6

NPM Version

v6.14.8

Homebridge Version

v1.3.4

Homebridge Honeywell Home Plugin Version

v10.0.1

Homebridge Config UI X Plugin Version

v4.41.2

Operating System

Raspbian Buster

donavanbecker commented 3 years ago

Honeywell API does not give me this info to display so this will not happen unless Honeywell changes something, much looking at your config, might have happened. I will look into this.

InfiniteTape commented 3 years ago

There's a "batteryRemaining" key in the response with a value as shown in the logs. Maybe the name of the key changed, because this worked a few months ago.

donavanbecker commented 3 years ago

@InfiniteTape, I pushed out a new beta. See if that fixes it.

InfiniteTape commented 3 years ago

@donavanbecker, that's fixed it and all values are working, though now my logs look like they're not getting filled in. Not sure if it's a regression or not.

[9/12/2021, 11:36:43 AM] [HoneywellHome] LS %s - %s°, %s%
[9/12/2021, 11:36:43 AM] [HoneywellHome] LS %s - 
[9/12/2021, 11:36:43 AM] [HoneywellHome] LS %s - %s°, %s%
[9/12/2021, 11:36:43 AM] [HoneywellHome] LS %s - 
[9/12/2021, 11:36:43 AM] [HoneywellHome] LS %s - %s°, %s%
[9/12/2021, 11:38:43 AM] [HoneywellHome] LS %s - 
[9/12/2021, 11:38:43 AM] [HoneywellHome] LS %s - %s°, %s%
[9/12/2021, 11:38:43 AM] [HoneywellHome] LS %s - 
[9/12/2021, 11:38:43 AM] [HoneywellHome] LS %s - %s°, %s%
donavanbecker commented 3 years ago

@donavanbecker, that's fixed it and all values are working, though now my logs look like they're not getting filled in. Not sure if it's a regression or not.


[9/12/2021, 11:36:43 AM] [HoneywellHome] LS %s - %s°, %s%

[9/12/2021, 11:36:43 AM] [HoneywellHome] LS %s - 

[9/12/2021, 11:36:43 AM] [HoneywellHome] LS %s - %s°, %s%

[9/12/2021, 11:36:43 AM] [HoneywellHome] LS %s - 

[9/12/2021, 11:36:43 AM] [HoneywellHome] LS %s - %s°, %s%

[9/12/2021, 11:38:43 AM] [HoneywellHome] LS %s - 

[9/12/2021, 11:38:43 AM] [HoneywellHome] LS %s - %s°, %s%

[9/12/2021, 11:38:43 AM] [HoneywellHome] LS %s - 

[9/12/2021, 11:38:43 AM] [HoneywellHome] LS %s - %s°, %s%

I think this is do to the plugin debug log that I implemented.. need to change something for it to work correct.

donavanbecker commented 3 years ago

@InfiniteTape Logs should be fixed and battery should be fixed.