{"repo":"frtz13/UPSPlus_mqtt","free":true,"listed":false,"github":"https://github.com/frtz13/UPSPlus_mqtt","clone":"git clone https://github.com/frtz13/UPSPlus_mqtt.git","description":null,"language":"Python","stars":20,"topics":["mqtt","raspberry-pi","home-assistant"],"license":"GPL-3.0","category":"self-hosted-apps","readme_excerpt":"# Background script for Raspberry Pi and UPSPlus (52pi) for automatic shutdown, UPS status to MQTT, fan control Purpose of the script - Runs in the background, launched as cronjob at boot time. - Checks UPS and battery status. Shuts down the Raspberry Pi when battery voltage is under configured threshold. - Can control a fan via a GPIO pin using PWM, depending on CPU temperature. - Can publish UPS status and fan status data to a MQTT broker. - Can send UPS status data to the manufacturer's IOT platform. Requirements - a Geekpi UPSPlus EP-0136 (52pi) - python3 - additional modules: RPi.GPIO, smbus2, pi-ina219, paho-mqtt, requests Installation - Install python3 if it isn't already installed. - Install additional modules via: pip3 install module-name - Copy fanShutDownUps.py, fanShutDownUps.ini, launcher.sh into a folder (we use /scripts in our example) etc. for the other files. - Create a folder /logs - Configure your options in fanShutDownUps.ini (please see below for details) - When ready, install to crontab: crontab -e then add the line: Configuration Fan If you want to use this option, please read Andreas Spiess' excellent article SensorsIOT: Variable cooling fan for Raspberry Pi about how to assemble the required hardware. The script can also send the fan speed percentage to your MQTT broker (default topic: home/rpi/fanspeed ) Configuration parameters: GPIO FAN : GPIO pin number to control the fan. Set to -1 to disable fan control completely. FAN LOOP TIME s : recommended ","default_branch":null,"files":null,"tree":[],"storefront":"/r/frtz13","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/frtz13/UPSPlus_mqtt/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}