Skip to content

bluetooth MPPT solar charge controller to influxdb gateway

Notifications You must be signed in to change notification settings

atochukwu0/ble-solar

 
 

Repository files navigation

This uses gatttool (a bluetooth low energy utility) to speak to a solar charge controller made by Helios.

This is a proof of concept and has a lot of rough edges. Everything is experimental and may not be reliable.

I'm testing against the HQST 40A MPPT controller

I suspect the other rebranded controllers will also work:

And anything other MPPT solar charge controller using the PVChargePro/ChargePro2.0 app is worth experimenting with

This assumes the computer collecting the data is in a different location than the bluetooth adapter and uses ssh to gather the data. I'm using a USB bluetooth adapter on an openwrt access point in the same room.

Example data is in the tests/ directory, along with its expected parsed output.

The protocol seems to be:

  • write to handle 0xf / characteristic 0xffe0
  • read via ble notifications
  • two byte address (address 0x0103)
  • one byte message length (length excluding itself, the address, and the crc)
  • ending with a two byte crc

Most values seem to be two bytes long

An example Grafana dashboard, solar panels were plugged in around 12:50 and batteries accepted about 18AH before they hit the full setting of 14V:

graphs from Grafana

To figure out:

  • DC load stats
  • if I connect via app and this program at the same time, what happens?
[01:B6:EC:xx:xx:xx][LE]> connect
connect
connect
Attempting to connect to 01:B6:EC:xx:xx:xx
Error: connect to 01:B6:EC:xx:xx:xx: Resource busy (16)
[01:B6:EC:xx:xx:xx][LE]> Timeout exceeded.
...
# hcitool lescan
Set scan parameters failed: I/O error
# hciconfig hci0 down
# hciconfig hci0 up
# hcitool lescan
LE Scan ...
01:B6:EC:xx:xx:xx (unknown)
01:B6:EC:xx:xx:xx PVChargePro

About

bluetooth MPPT solar charge controller to influxdb gateway

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.3%
  • Makefile 0.7%