Skip to content
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

Mqtt availability #46

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Mqtt availability #46

wants to merge 2 commits into from

Conversation

craigInTx
Copy link

This pull request adds the usage of MQTT availability topics. This greatly enhances the security of the sensor by indicating when the remote sensor is no longer connected.
Upon initial connection, it sets a Last Will statement to set the availability to "offline" in the event the MQTT server doesn't receive any communication within the 60 seconds defined on the connect command.
Once connection is re-established, the availability is set to "online" and all currently configured sensor states are updated.

The attached image shows two Garage Doors in Home-Assistant (separate pi zeros). The unit controlling the Double Garage Door was disconnected from the network. After 60 seconds, Home-Assistant recognized the offline status. Once I reconnected it to the network, the status was seamlessly updated and everything returned to full operation.
Garage_Doors

@bg1000
Copy link

bg1000 commented Feb 19, 2021

@craigInTx I don't think this repo is actively maintained. I had a conversation with the author after waiting quite a while on a pull request. He indicated that he moved and no longer uses the application. I use it and am maintaining a fork here. It includes availability and few other enhancements which are listed in the top of the read me. I am open to other pull requests.

@craigInTx
Copy link
Author

Thank you bg1000. Moments after submitting this pull request, I found your fork. I'm in the process of converting to your newer fork, and hope to contribute where necessary.

I only wish I had found yours sooner. Would have saved me some development. :)

@bg1000
Copy link

bg1000 commented Feb 20, 2021

@craigInTx Feel free to open and issue or reach out if you have any trouble. You can reach me me on the home assistant community forum or discord under the same user name (bg1000).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants