Closed cflurin closed 7 years ago
It seems that the Apple home app doesn't support this feature. I've test it with EVE and here works.
@cflurin indeed Home.app doesn't support it. Then it is even more strange behaviour while Philips Hue is able to set "No response" status in Home.app the reachability characteristic does not. Any ideas? I have also come by reachability characteristic in Apple's datasheet for HomeKit but even thought I tried it before somehow it didn't work so I thought I'm doing something wrong and gave up. I have no idea what else it could be as Apple's datasheet doesn't quite give a lot info.
@ArnieX:
Please install the latest version from GitHub. It should now work for Home too (No Response)
Note: at Homebridge start reachable is set true.
You are officially my HERO! ;)
Now I will just periodically test if device is connected or not.
great! thanks for your feedback.
@ArnieX maybe you can use a "last Will and Testament" if your mqtt client supports that, which helps to see if it is unreachable, instead of writing extra client code. See example of use: http://www.hivemq.com/blog/mqtt-essentials-part-9-last-will-and-testament
@tvillingett that is a good idea and less overkill than pinging the device every 60second.
how do I make it so that the reachability is false when the device is not connected (off or not on the network).
@CaptiveCreeper Have a look at the documentation https://github.com/cflurin/homebridge-mqtt#set-reachability
The documentation only shows how to set the reachability. It doesnt say anything about how to make it so that when the device no longer responds that it will show as not reachable
@CaptiveCreeper Is the idea to use "last will" that I wrote about above not working for you?
@tvillingett When I was looking into last will at first I apparently skimmed though it too much and misunderstood how it worked. After you responded saying that it should work I looked into it more and now it does work. Sorry for wasting your time with something that was already solved.
@tvillingett I have also used it on your tip, thanks for that.
Thanks for your reference @cflurin , and your tips @ArnieX @tvillingett Could you tell me how to set the accessory "NO RESPONSE", by using"homebridge/to/set/reachability" at server side? thank you in advance! However, @tvillingett 's idea can be used on specific Topic, but "HB-mqtt APIs" are general topics, so it seems that the "last will testament" feature doesn't work fine with it? I will be grateful if you correct my mistake.
Cool! And thank you guys for your inspirations. Finally I find it out and here is a brief for those who may need: 1.[mqtt client] publish a "LWT" to broker when connect with [topic] "homebridge/to/set/reachability " and [payload] "name": "YOUR_CLIENT_NAME", "reachable": false). 2.homebridge-mqtt will subscribe this topic and set to "unreachable" once client was ungracefully dropped. 3.remember to set reachability to true when CLIENT starts so that you can wake it up again.
I've added
homebridge/to/set/reachability
Please install from GitHub: