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

Send a state=online message on MQTT startup #182

Closed
neilenns opened this issue Jun 12, 2020 · 1 comment · Fixed by #185
Closed

Send a state=online message on MQTT startup #182

neilenns opened this issue Jun 12, 2020 · 1 comment · Fixed by #185
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@neilenns
Copy link
Owner

neilenns commented Jun 12, 2020

The LWT message is nice, but it needs the matching ON message. This would enable someone to set up an MQTT binary sensor in Home Assistant that could be used to cleanly fire alerts when the motion sensing is on/off.

This should use the registered status topic and get sent right after MQTT client is created.

@neilenns neilenns added enhancement New feature or request good first issue Good for newcomers labels Jun 12, 2020
neilenns added a commit that referenced this issue Jun 12, 2020
@neilenns neilenns changed the title Send a state=on message on MQTT startup Send a state=online message on MQTT startup Jun 12, 2020
@neilenns
Copy link
Owner Author

This also needs to send offline when the service fails to start up due to trigger or telegram configuration errors.

neilenns added a commit that referenced this issue Jun 12, 2020
* Send a state=on message on MQTT startup
Fixes #182

* Move MQTT initialization before everything else, send error text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant