Giter Club home page Giter Club logo

ant_bms's Introduction

#Description This is a set of python scripts used for controlling a DIY battery storage for a Photovoltaic based system. Two python scripts plus a iobroker installation on a raspberry pi.

bms_post.py is used to parse the information coming via bluetooth from a china made Battery Monitoring System which is taking care of a 16s LIFEPO 100Ah bank. The type of BMS is ANT (can be found on aliexpress) The script reads info from the serial port and sends it via simple_api to iobroker signals

si_control.py is the main control script: It reads some information directly from the pI (ADC converter reading battery pack voltage) as well as grid and photovoltaic powers (using TCP Modbus from a Fronius Inverter). Some signals are read from iobroker via simple_api.

There is a branched influxdb variant, which is simpler and more robust. It dows not need iobroker to run since it posts directly from the python script to the influxdb server

To be able to automatically connect to the bluetooth of the BMS this solution uses the following:

This is part of the si_control.py file

# Define Serial port (over bluetooth) for BMS
ser_blue = serial.Serial(
    port='/dev/rfcomm0',
    baudrate = 9600,
    parity=serial.PARITY_NONE,
    stopbits=serial.STOPBITS_ONE,
    bytesize=serial.EIGHTBITS,
    timeout = 0)

And in /etc/bluetooth/rfcomm.conf put

rfcomm0 {
    # Automatically bind the device at startup
    bind yes;

   # Bluetooth address of the device
    device AA:BB:CC:A1:23:45;

    # RFCOMM channel for the connection
    channel 0;

    # Description of the connection
    comment "BMS";
}

ant_bms's People

Contributors

juamiso avatar

Watchers

James Cloos avatar

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.