-
Notifications
You must be signed in to change notification settings - Fork 224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LWT status messages #357
Comments
I'm sure it's possible. Happy to look at a PR. |
This will be available in 1.9.0-dev5 (build is running now). @oakbrad, please let me know if it does the trick for you. I hardcoded willQoS to 2, but I can either change that or expose it as a setting if need be. |
Thank you so much!! made settings (MQTT LWT Topic) milight / states / LWT, MQTT LWT Message (Offline). Please make a place for the message also Online. Very convenient for processing in NODERED. |
@odis68, I'm not following. Are you asking for functionality where an MQTT message is sent when first connecting? |
If the device without power is offline. if you apply power Online. |
Oh. By "device," do you mean a light bulb or LED controller? If so, then yes--the state constructed by espMH is "best effort." There's no way for it to actually know what the state of a bulb is. It only knows what commands it's sent and intercepted, and what the state resulting from those observations would be. |
I will enter the D1 mini controller with your code (esp8266_milight_hub). I reconcile the console and esp8266_milight_hub by sending to NODERED all the RF remote control commands to esp8266_milight_hub. Sorry for the inaccuracies I am writing through the translator. |
@sidoh Thank you!! will try this out this weekend when I have some free time & report back. |
I think is missing the part where you can set when the client comes online. For example i have sonoff touch controlling two gu10 milights. If i know the esp8266 milight device is offline i will use the internal relay to control the light as failsafe. If the milight client becomes online (available) then i can use the milight hub to turn on/off the milights. The zigbee2mqtt bridge implements the same for availability. So then in my automation software If it knows the software can't send zigbee commands then it uses the internal relay toggle In this case it should be hardcoded to the base path milight/ plus something like hub/state In HA
If the milight hub disconnects we should see something like this in HA Thanks for your work 👍 |
Would it be possible to add Last-Will-and-Testament MQTT messages to the hub? For the purposes of tracking the connectivity of the device for problems. I think this is the only esp8266 project I use that doesn't have it.
https://www.hivemq.com/blog/mqtt-essentials-part-9-last-will-and-testament
The text was updated successfully, but these errors were encountered: