This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
import paho.mqtt.client as mqtt | |
import json | |
import logging | |
import time | |
import daemon | |
import signal | |
from logging.handlers import SysLogHandler | |
# MQTT configuration |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# Original script by Tim Brooks | |
# https://gist.github.com/brookst/bdbede3a8d40eb8940a5b53e7ca1f6ce | |
# Disclaimer: I can't write python! I wanted to do this but couldn't find another way, so I asked an AI to modify the original script. | |
# It should run silently unless there is an error, and MQTT messages are only sent when a value changes. | |
# However I am not in a position to gauge the quality of the script. | |
import datetime |