Oliver Galvin 69414b0eff fix and shorten links 1 year ago
README.md 69414b0eff fix and shorten links 1 year ago
lpc.py c488e7ec0c more verification 2 years ago


LibrePower controller

This is a small Python program which runs on your PC to interface with the charge controller.

It should run on any platform that Python supports, as long as you have the dependencies (see below).

It can be used to:

  • Set the configuration options on the controller
  • Check if there is a newer version of the firmware and update if necessary
  • Generate and upload a list of sunset and sunrise times
  • Download data logs from the controller
  • Monitor the current charge level, panel voltage, temperature etc.


LibrePower is deliberately agnostic regarding the PC connection method, to allow the builder as much choice as possible. By default the hardware just has a serial interface. If your PC doesn't have a serial connector you could connect to it with one of the many cheap serial-USB cables/adapters. Or you could include a serial-USB chip with the charge controller, and just use a USB cable.

A fancier solution could be a wireless interface, for example using an ESP8266 Wifi Module, an XBee Wifi/RF module, or a Bluetooth Low Energy module. These options would turn the controller into more of an IoT device, but would of course add a bit more complexity to the project. I haven't yet tried this kind of thing myself.


Make sure you have Python installed, either with your package manager or from here.

The Python modules needed are geoip, gnupg and pyserial. To install, use one of the following commands, depending on your package manager:

# pip install GeoIP python-gnupg pyserial
# pacman -S python-geoip geoip-database-extra python-gnupg python-pyserial
# apt install python3-geoip geoip-database-extra python3-gnupg python3-serial