Skip to content

Instantly share code, notes, and snippets.

View greypanda's full-sized avatar

John Crunk greypanda

View GitHub Profile
@greypanda
greypanda / mq_apc.py
Created November 18, 2020 22:32 — forked from Elwell/mq_apc.py
apcaccess (APCupsd) to MQTT python script
#!/usr/bin/python
# Script to poll the UPS (via apcupsd) and publish interesting facts to
# MQTT.
# Published under GPL3+ by Andrew Elwell <Andrew.Elwell@gmail.com>
import subprocess
# we use mosquitto for the MQTT part