ebaauw / homebridge-hue

Homebridge plugin for Philips Hue
Apache License 2.0
899 stars 91 forks source link

Question: Displaying sensor reachability? #417

Closed dergreg closed 5 years ago

dergreg commented 5 years ago

Hi,

I just put one of my Xiaomi temperature sensors into the garage (to check for the perfect beer temperature šŸ˜‚). I still displays 20 degrees, which is obviously too much for winter (a zwave based Sensor next to it correctly displays 8 degrees).

Is there any chance to detect the last update of the device (which is now older than two hours) and display the device as ā€žnot respondingā€œ in HomeKit?

Regards Greg

Larsn1 commented 5 years ago

Hello Greg,

there is the possibility to determine when the device is reachable or when it has been seen the last time in the free Eve App.

Best regards Lars

ebaauw commented 5 years ago

I set Status Fault to 1 when a sensorā€™s config.reachable or a lightā€™s state.reachable becomes false. Appleā€™s Home app seems to ignore it, even though itā€™s a standard HomeKit characteristic. Eve shows this as a red warning sign.

A sensorā€™s state.lastupdated is exposed as a custom Last Updated characteristic, which Appleā€™s Home app doesnā€™t support.

I donā€™t set accessories to Not Responding, as that causes Appleā€™s Home app to ignore updates to the accessory. When I unset Not Responding, Appleā€™s Home app continues to show it, until you refresh the accessory, forcing Home to re-read the characteristics. During that time, you cannot control the device.

dergreg commented 5 years ago

Where is the reachable flag displayed? See my screenshots from the eve app, thanks

img_5642

img_5643

ebaauw commented 5 years ago

Itā€™s a red triangle with an exclamation mark. It only shows when itā€™s set. In the details screen, itā€™s on the top bar (next to the battery symbol and the settings gear), on the room screen, itā€™s to the left of the value.

Note that homebridge-hue depends on deCONZ to report config.reachable and that deCONZ depends on the Xioami device to report itā€™s state. The battery-powered Xiaomi sensors are very sleepy and cannot be queried by deCONZ. The Aqara devices report once every hour and when ā€œsignificantā€ changes happen. Iā€™m not sure when deCONZ sets the sensorā€™sconfig.reachable to false.

dergreg commented 5 years ago

Yeah I know the exclamation mark from my Eve thermo (unfortunately), but not from the Aqara sensors so far. I guess this isn't set by deconz.