Giter VIP home page Giter VIP logo

bms-monitoring-stack's Introduction

bms-monitoring-stack

This stack deployes:

  • bms-db
  • bms-exporter
  • dht-exporter (DHT22 temp/humidity sensor)
  • prometheus
  • node-exporter
  • grafana

Overview

This tool uses python gatt to scrape the information from Xiaoxiang BMS. Those products are used for many LifePo4 based batteries.

I personally use it for a 2019 LIONTRON 200AH 12V LifePo4 caravan battery. Those battery use BMS that use Bluetooth Low Energy with a non-standard protocol.o

I'm basically writing the values into a sqlite3 db that gets read by the bms-exporter.

Prometheus is configured to scrape the exporter.

Grafana setups a dashboard to visualize the data.

This runs on a Raspberry Pi 3b+ directly in the caravan.

See also

This project is only for private usage. This has been done only in a few hours, so expect shortcuts and errors on the way. If you want to use it, change the MAC address in docker-compose.yaml.

Grafana Demo

Known issues

Sometimes the bms-db hangs when not getting data, until this is fixed you can restart the container on stalled db entries:

There is a autoheal container that tries to restart the bms-db container when this happens.

This basically does

cd bms-db; while sleep 5; do find . -name bms.db -mmin +1 | grep -q bms.db && (date; cd ..; docker-compose restart bms-db); done

bms-monitoring-stack's People

Contributors

stefanandres avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bms-monitoring-stack's Issues

Fritzbox exporter

Hey
Nice work!
I am getting an error on Fritzbox_exporter "pull access denied for fritzbox_exporter, repository does not exist or may require "docker login"".
Do you know how to resolve that?

ERROR with bms-exporter

hello stefan,
I've got an issue concerning the bms-exporter. After starting up the container following issues occurred and container stops working...

Traceback (most recent call last):
File "/usr/local/bin/bms-exporter", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1128, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/bms_exporter/main.py", line 90, in main
metrics.build_metrics()
File "/usr/local/lib/python3.7/site-packages/bms_exporter/main.py", line 34, in build_metrics
last_update = data[0]
TypeError: 'NoneType' object is not subscriptable

Maybe you can help me out with this problem. btw, very nice project, thanks for that!

I gonna use it with the same LiPoFe Battery as yours!

docker-compose up -d won't build

Won't build:

Fatal Python error: _Py_InitializeMainInterpreter: can't initialize time
PermissionError: [Errno 1] Operation not permitted

Current thread 0xb6ffb390 (most recent call first):
ERROR: Service 'bms-exporter' failed to build: The command '/bin/sh -c pip install .' returned a non-zero code: 132

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.