29 lines
1.1 KiB
Markdown
29 lines
1.1 KiB
Markdown
# bmspy
|
|
|
|
bmspy is a tool to get information from a [xiaoxiang-type](https://www.lithiumbatterypcb.com/product/4s-or-3s-12v-li-ion-or-lifepo4-battery-smart-bms-with-bluetooth-function-uart-and-rs485-communication-with-60a-to-120a-constant-current/?attribute_specification-selection=4S+Lifepo4+120A+with+UART+and+RS485) BMS system, using some sort of serial connection.
|
|
|
|
It can display the information as text, in JSON, or export the data continuously to a Prometheus exporter.
|
|
|
|
To install:
|
|
git clone https://git.treehouse.org.za/tim/bmspy
|
|
cd bmspy
|
|
poetry install
|
|
|
|
Or, to install with influxdb and/or prometheus support:
|
|
poetry install -E influxdb -E prometheus
|
|
|
|
To run:
|
|
poetry run bmspyd &
|
|
|
|
Or to run via systemd, copy bmspyd.service to /etc/systemd/system, adjust WorkingDirectory to point to the installation location, and enable and start the service:
|
|
cp bmspy-server.service /etc/systemd/system
|
|
$EDITOR /etc/systemd/system/bmspy-server.service
|
|
systemctl daemon-reload
|
|
systemctl enable bmspy-server
|
|
systemctl start bmspy-server
|
|
|
|
To run a client to get the data, choose one of the following options:
|
|
poetry run bmspy
|
|
poetry run bmspy-influxdb --url ...
|
|
|