Git Product home page Git Product logo

Comments (15)

ArnieX avatar ArnieX commented on August 29, 2024 2

@tvillingett that is a good idea and less overkill than pinging the device every 60second.

from homebridge-mqtt.

tvillingett avatar tvillingett commented on August 29, 2024 1

@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.

cflurin avatar cflurin commented on August 29, 2024

It seems that the Apple home app doesn't support this feature.
I've test it with EVE and here works.

from homebridge-mqtt.

ArnieX avatar ArnieX commented on August 29, 2024

@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.

cflurin avatar cflurin commented on August 29, 2024

@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.

from homebridge-mqtt.

ArnieX avatar ArnieX commented on August 29, 2024

You are officially my HERO! ;)

Now I will just periodically test if device is connected or not.

from homebridge-mqtt.

cflurin avatar cflurin commented on August 29, 2024

great! thanks for your feedback.

from homebridge-mqtt.

CaptiveCreeper avatar CaptiveCreeper commented on August 29, 2024

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.

cflurin avatar cflurin commented on August 29, 2024

@CaptiveCreeper Have a look at the documentation https://github.com/cflurin/homebridge-mqtt#set-reachability

from homebridge-mqtt.

CaptiveCreeper avatar CaptiveCreeper commented on August 29, 2024

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.

tvillingett avatar tvillingett commented on August 29, 2024

@CaptiveCreeper Is the idea to use "last will" that I wrote about above not working for you?

from homebridge-mqtt.

CaptiveCreeper avatar CaptiveCreeper commented on August 29, 2024

@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.

ArnieX avatar ArnieX commented on August 29, 2024

@tvillingett I have also used it on your tip, thanks for that.

from homebridge-mqtt.

linjiejim avatar linjiejim commented on August 29, 2024

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.

linjiejim avatar linjiejim commented on August 29, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.