tjohn327 / raspberry_pi_ups

An uninterruptible power supply for Raspberry Pi that can provide more than an hour of backup power and can shutdown the Pi safely.
MIT License
90 stars 32 forks source link

integrate into other monitoring systems #2

Open DOliana opened 4 years ago

DOliana commented 4 years ago

I would like to monitor the Power Pi via OpenHab instead of node red. Could you provide some guidance on how monitoring of the Power Pi can be achieved so that it can be integrated into other systems like OpenHab?

tjohn327 commented 4 years ago

The status of Power Pi is being published as UDP message on the port 127.0.0.1:40001 by ups.service.

The messages are JSON formatted as follows: { "BatteryPercentage": 87, "BatteryVoltage": 4.08, "ChargeCurrent": 0, "ChargeStatus": "Not Charging", "InputVoltage": 2.6, "PowerInputStatus": "Not Connected", "TimeRemaining": 76 }

DOliana commented 4 years ago

thanks for the info - I will look into that. Maybe I can forward that port to something within a docker container that can then redirect it to openhab. I am thinking of building a small PowerPi to MQTT service.

Have you thought about integrating MQTT directly?

poindexter12 commented 4 years ago

+1 for mqtt

DOliana commented 3 years ago

If anybody is interested in testing/improving MQTT support - I added MQTT-Support in a PR. Please review/improve it.