IOTstack/services/apcupsd-mqtt/Dockerfile
IOTstack/services/apcupsd-mqtt/service.yml
IOTstack/services/apcupsd-mqtt/apcupsd-mqtt.env (may not be required?)
IOTstack/services/apcupsd-mqtt/src/apcupsd-mqtt.py
IOTstack/services/apcupsd-mqtt/src/requirements.txt
- Where to enter MQTT credentials? Use env file?
Currently I added them directly to apcupsd-mqtt.py
in services/apcupsd-mqtt/src
dir, which is not ideal:
Here are my settings from apcupsd-mqtt.py
MQTT_USER = os.getenv('MQTT_USER')
MQTT_PASSWORD = os.getenv('MQTT_PASSWORD')
MQTT_PORT = int(os.getenv('MQTT_PORT', 1883))
MQTT_HOST = os.getenv('MQTT_HOST', '192.168.107.99')
INTERVAL = float(os.getenv('INTERVAL', 15))
UPS_ALIAS = os.getenv('UPS_ALIAS',socket.gethostname())
APCUPSD_HOST = os.getenv('APCUPSD_HOST','192.168.107.99')
LOG_LEVEL = os.getenv('LOG_LEVEL',logging.INFO)
logger.setLevel(LOG_LEVEL)
- Installation error to fix (add to Dockerfile?) " Fatal Python error: can't initialize time":
Manual fix for now (https://docs.linuxserver.io/faq) :
wget http://ftp.us.debian.org/debian/pool/main/libs/libseccomp/libseccomp2_2.4.4-1~bpo10+1_armhf.deb
then
sudo dpkg -i libseccomp2_2.4.4-1~bpo10+1_armhf.deb