项目 / Louisvdw/dbus-serialbattery
Louisvdw/dbus-serialbattery
行业推荐
语言 Python标签 venusos-devicedbus-serialbatterybmsdbusdriver数据更新 2026-11-16 06:45:51 · 仓库 2026-11-15
一段话介绍
面向 Venus OS(Victron 的 GX 设备,或运行 Venus OS 镜像的树莓派)的电池管理驱动,用来与支持串口(RS232、RS485 或 TTL UART)或蓝牙的电池管理系统通信,并把数据发布到 Venus OS 的 dbus,作为电池监视器提供荷电状态等数值给逆变器或充电器。源文写明本仓库已归档,后续开发转到 [mr-manuel/venus-os_dbus-serialbattery](https://github.com/mr-manuel/venus-os_dbus-serialbattery)。安装、更新和卸载步骤见[现维护文档中的安装说明](https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/general/install)。
本站整理,非 GitHub 官方 description。
官方 description(GitHub API 原样)Battery Monitor driver for serial battery in VenusOS GX systems
官方快照(gh_history.db,2026-11-25):总榜 未进 Top50 · 日榜 未进 Top50 · 周榜未满 7 天基线(官方不生成) · 月榜暂无官方口径;下方四卡为站内趋势聚合(周卡按上榜次数,非官方 7 日增量窗)。
设备物联接入与边缘采集
适配系统:设备物联平台、边缘采集网关 · 得分 3.0
Victron VenusOS 串口电池监控驱动(光伏/储能集成)。
更多信息
以下三段按该项目自己的 GitHub README 章节摘录(可合理截断并标明);README 没有对应章节的留空,不编造。
我的用法
入口是 dbus-serialbattery.py:它遍历 Battery 子类调用 test_connection() 识别 BMS,成功后周期调用 publish_battery() 刷新并发布 /Info/ 充放电电流与电压等值。
特点或设计要点
支持的电池管理系统及功能对比见[功能说明](https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/general/features)和[支持列表](https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/general/supported-bms)。入门说明见[文档首页](https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/)。排错与常见问题也在同一文档站。
星标走势还差一天的数据,明天就能看到曲线
每天 10:30 记一次星标,连续两天后自动生成曲线
GitHub 项目主页介绍
来自 GitHub 仓库 README / 主页介绍正文,原样摘录,共 5,973 字节。
# 🚨 This repository was archived 🚨
After many months of inactivity, this repository has been archived for research purposes.
Development of this driver continues in [@mr-manuel's](https://github.com/mr-manuel) repository, which can be found here: [github.com/mr-manuel/venus-os_dbus-serialbattery](https://github.com/mr-manuel/venus-os_dbus-serialbattery)
Many thanks to all the users who have used this driver.
Greetings,<br>
dbus-serialbattery Team
-----
# dbus-serialbattery
This is a driver for Venus OS devices (any GX device sold by Victron or a Raspberry Pi running the Venus OS image).
The driver will communicate with a Battery Management System (BMS) that support serial (RS232, RS485 or TTL UART) and Bluetooth communication (see [BMS feature comparison](https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/general/features#bms-feature-comparison) for details). The data is then published to the Venus OS system (dbus). The main purpose is to act as a Battery Monitor in your GX and supply State of Charge (SoC) and other values to the inverter/charger.
## Documentation
* [Introduction](https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/)
* [Features](https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/general/features)
* [Supported BMS](https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/general/supported-bms)
* [How to install, update, disable, enable and uninstall](https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/general/install)
* [How to troubleshoot](https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/troubleshoot/)
* [FAQ](https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/faq/)
### Supporting this project
If you find this driver helpful please consider supporting this project. You can buy me a Ko-Fi or get in contact, if you would like to donate hardware for development.
### Support [Louisvdw](https://github.com/Louisvdw)
* Main developer
* Added most of the BMS drivers
[](https://ko-fi.com/Z8Z73LCW1) or using [Paypal.me](https://paypal.me/innernet)
### Support [mr-manuel](https://github.com/mr-manuel)
* Added a lot of features, optimizations and improvements with `v1.0.x`
* Assistance with the issues and discussions of forum
* Added a lot of documentation to the config file and notes that are displayed after installation for better understanding
* Introduced the new documentation page of the driver and reworked a great part of it for easier understanding
[<img src="https://github.md0.eu/uploads/donate-button.svg" height="38">](https://www.paypal.com/donate/?hosted_button_id=3NEVZBDM5KABW)
### Developer Remarks
To develop this project, install the requirements. This project makes use of velib_python which is pre-installed on
Venus-OS Devices under `/opt/victronenergy/dbus-systemcalc-py/ext/velib_python`. To use the python files locally,
`git clone` the [velib_python](https://github.com/victronenergy/velib_python) project to velib_python and add
velib_python to the `PYTHONPATH` environment variable.
Make sure the GitHub Actions run fine in your repository. In order to make the GitHub Actions run please select in your repository settings under `Actions` -> `General` -> `Actions permissions` the option `Allow all actions and reusable workflows`. Check also in your repository settings under `Actions` -> `General` -> `Workflow permissions` if `Read and write permissions` are selected. This will check your code for Flake8 and Black Lint errors. [Here](https://py-vscode.readthedocs.io/en/latest/files/linting.html) is a short instruction on how to set up Flake8 and Black Lint checks in VS Code. This will save you a lot of time.
See this checklist, if you want to [add a new BMS](https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/general/supported-bms#add-by-opening-a-pull-request)
#### How it works
* Each supported BMS needs to implement the abstract base class `Battery` from `battery.py`.
* `dbus-serialbattery.py` tries to figure out the correct connected BMS by looping through all known implementations of
`Battery` and executing its `test_connection()`. If this returns true, `dbus-serialbattery.py` sticks with this battery
and then periodically executes `dbushelpert.publish_battery()`. `publish_battery()` executes `Battery.refresh_data()` which
updates the fields of Battery. It then publishes those fields to dbus using `dbushelper.publish_dbus()`
* The Victron Device will be "controlled" by the values published on `/Info/` - namely:
* `/Info/MaxChargeCurrent `
* `/Info/MaxDischargeCurrent`
* `/Info/MaxChargeVoltage`
* `/Info/BatteryLowVoltage`
* `/Info/ChargeRequest` (not implemented in dbus-serialbattery)
For more details on the victron dbus interface see [the official victron dbus documentation](https://github.com/victronenergy/venus/wiki/dbus)
## Screenshots
### Venus OS













### VRM Portal








