Comments (15)
@tvillingett that is a good idea and less overkill than pinging the device every 60second.
from homebridge-mqtt.
@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
from homebridge-mqtt.
It seems that the Apple home app doesn't support this feature.
I've test it with EVE and here works.
from homebridge-mqtt.
@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.
from homebridge-mqtt.
Please install the latest version from GitHub.
It should now work for Home too (No Response)
Note: at Homebridge start reachable is set true.
from homebridge-mqtt.
You are officially my HERO! ;)
Now I will just periodically test if device is connected or not.
from homebridge-mqtt.
great! thanks for your feedback.
from homebridge-mqtt.
how do I make it so that the reachability is false when the device is not connected (off or not on the network).
from homebridge-mqtt.
@CaptiveCreeper Have a look at the documentation https://github.com/cflurin/homebridge-mqtt#set-reachability
from homebridge-mqtt.
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
from homebridge-mqtt.
@CaptiveCreeper Is the idea to use "last will" that I wrote about above not working for you?
from homebridge-mqtt.
@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.
from homebridge-mqtt.
@tvillingett I have also used it on your tip, thanks for that.
from homebridge-mqtt.
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.
from homebridge-mqtt.
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.
from homebridge-mqtt.
Related Issues (20)
- Temperature limit 100.0° ? HOT 9
- Implementing Television HOT 7
- how to read AccessoryInformation
- I don't understand where topic/payload go in homebridge config.json HOT 2
- MQTT broker not starting HOT 2
- pulling sensors from adafruit.io to homekit through homebridge and mqtt HOT 7
- mqtt Broker in the Internet
- error on adding new accessories HOT 12
- Missing Protocol on URL
- Television Service HOT 3
- Problem with Hoobs V4 HOT 1
- Restart Causes Old MQTT Commands to Execute
- homebridge/from/set missing service_type HOT 13
- Tasmota - Home bridge
- to/get Empty Responses? HOT 1
- Controlling dummy switches
- color lights not supported HOT 1
- 如何通过mqtt 使用 Lightbulb 创建一个 有亮度 和冷暖色的灯泡
- Topic: homebridge/to/add does not work for characteristics HOT 1
- How to install on Hassio / Home Assistant? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from homebridge-mqtt.