lunarys / mqtt-device-status

Publish the online status of devices to MQTT.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MQTT device status

What does this do?

This script sends the current status of the device on a MQTT topic. It can be run either in a docker container or as a systemd service. Three different states are detected: Online, Offline or Crashed, the which are also the default messages. Crashes are 'detected' by setting a last will message. Additionally the start time of the device is sent.

Configuration

The script can be configured either via a configuration file (recommended when running as a service) or via environment variables (for docker containers), a template .env is provided.

About

Publish the online status of devices to MQTT.

License:GNU General Public License v3.0


Languages

Language:Python 88.2%Language:Shell 9.7%Language:Dockerfile 2.1%