fphammerle / systemctl-mqtt

MQTT client triggering & reporting shutdown on systemd-based systems :house_with_garden: 🐳
https://pypi.org/project/systemctl-mqtt/
GNU General Public License v3.0
11 stars 3 forks source link

Feature Request: MQTT LWT Topic #38

Open pixeldoc2000 opened 2 years ago

pixeldoc2000 commented 2 years ago

Please add an MQTT LWT Topic to signal host status like: ON / OFF / DISCONNECTED . It would be great to have the Status of the host of systemctl-mqtt im Home-Assistant or any other System.

I know there is PrepareForShutdown but i is not the same.

https://www.hivemq.com/blog/mqtt-essentials-part-9-last-will-and-testament/

fphammerle commented 2 years ago

Good idea! If anyone wants to start integrating this feature before I can, please go ahead.

TODO: Consider implementation that is compatible with https://www.home-assistant.io/integrations/binary_sensor.mqtt/#availability

fphammerle commented 1 year ago

Template for implementation: https://github.com/fphammerle/switchbot-mqtt/pull/105/files https://github.com/fphammerle/switchbot-mqtt/commit/31d66b2c66284a85de6c3100888813e294bf10e3