Giter Club home page Giter Club logo

ble-solar's Introduction

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

ble-solar's People

Contributors

ddrown avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

atochukwu0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.