APC UPS stats (fetched from apcaccess - requires apcupsd to run) over MQTT
This script can be run as a service with systemd.
EXAMPLE /lib/systemd/system/apcupsd2mqtt.service:
[Unit]
Description=APCUPSD 2 MQTT
After=network-online.target
[Service]
ExecStart=/usr/bin/python3 /home/vince/ups-stats.py
Restart=on-failure
Type=idle
[Install]
WantedBy=multi-user.target
Steps:
- Create the .service file as described above in
/lib/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable
sudo service apcupsd2mqtt start
sudo service apcupsd2mqtt status