Skip to content

Commit

Permalink
Changes 2023.05.03
Browse files Browse the repository at this point in the history
* Changed: Default FLOAT_CELL_VOLTAGE from 3.350 V to 3.375 V by @mr-manuel
* Changed: Default LINEAR_LIMITATION_ENABLE from False to True by @mr-manuel
* Changed: Moved Bluetooth part to `reinstall-local.sh` by @mr-manuel
* Changed: Renamed scripts for better reading #532 by @mr-manuel
* Changed: Reworked and optimized installation scripts by @mr-manuel
  • Loading branch information
mr-manuel authored May 3, 2023
2 parents a1972c8 + 2c9d3dd commit 9fcf1a5
Show file tree
Hide file tree
Showing 26 changed files with 810 additions and 726 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ on:
# Runs on pushes targeting the default branch
push:
# Run on changes in the master branch
#branches: [master]:
branches:
- master
- docusaurus

# Run on changes in the docs folder
paths:
Expand Down Expand Up @@ -37,6 +39,9 @@ jobs:
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest

# execute only in Louisvdw repository
if: github.repository_owner == 'Louisvdw'

#defaults:
# run:
# working-directory: 'docs' # Here the path to the folder where package-lock.json is located.
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,10 @@ jobs:
find . -type f -name "run" -exec chmod +x {} \;
tar -czvf venus-data.tar.gz \
--mode='a+rwX' \
--exclude battery_template.py \
--exclude __pycache__ \
--exclude restartservice.sh \
--exclude revov.py \
--exclude test_max17853.py \
--exclude util_max17853.py \
--exclude bms/battery_template.py \
--exclude bms/revov.py \
--exclude bms/test_max17853.py \
etc/dbus-serialbattery/
- name: Release
Expand Down
13 changes: 8 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,17 @@
* Added: Support for HLPdata BMS4S https://github.com/Louisvdw/dbus-serialbattery/pull/505 by @peterohman
* Added: Support for Seplos BMS https://github.com/Louisvdw/dbus-serialbattery/pull/530 by @wollew
* Added: Temperature name for temperature sensor 1 & 2. This allows to see which sensor is low and high (e.g. battery and cable) by @mr-manuel
* Changed: `reinstalllocal.sh` to recreate `/data/conf/serial-starter.d` if deleted by `disabledriver.sh` --> to check if the file `conf/serial-starter.d` could now be removed from the repository by @mr-manuel
* Changed: Added QML to `restoregui.sh` by @mr-manuel
* Changed: `reinstall-local.sh` to recreate `/data/conf/serial-starter.d`, if deleted by `disable.sh` --> to check if the file `conf/serial-starter.d` could now be removed from the repository by @mr-manuel
* Changed: Added QML to `restore-gui.sh` by @mr-manuel
* Changed: Bash output by @mr-manuel
* Changed: Default config file by @mr-manuel
* Added missing descriptions to make it much clearer to understand by @mr-manuel
* Changed name from `default_config.ini` to `config.default.ini` https://github.com/Louisvdw/dbus-serialbattery/pull/412#issuecomment-1434287942 by @mr-manuel
* Changed TimeToSoc default value `TIME_TO_SOC_VALUE_TYPE` from `Both seconds and time string "<seconds> [<days>d <hours>h <minutes>m <seconds>s]"` to `1 Seconds` by @mr-manuel
* Changed TimeToSoc description by @mr-manuel
* Changed value positions, added groups and much clearer descriptions by @mr-manuel
* Changed: Default FLOAT_CELL_VOLTAGE from 3.350 V to 3.375 V by @mr-manuel
* Changed: Default LINEAR_LIMITATION_ENABLE from False to True by @mr-manuel
* Changed: Disabled ANT BMS by default https://github.com/Louisvdw/dbus-serialbattery/issues/479 by @mr-manuel
* Changed: Fix for https://github.com/Louisvdw/dbus-serialbattery/issues/239 by @mr-manuel
* Changed: Fix for https://github.com/Louisvdw/dbus-serialbattery/issues/311 by @mr-manuel
Expand All @@ -57,13 +59,14 @@
* Changed: Fixed Time-To-Go is not working, if `TIME_TO_SOC_VALUE_TYPE` is set to other than `1` https://github.com/Louisvdw/dbus-serialbattery/pull/424#issuecomment-1440511018 by @mr-manuel
* Changed: Improved JBD BMS soc calculation https://github.com/Louisvdw/dbus-serialbattery/pull/439 by @aaronreek
* Changed: Logging to get relevant data by @mr-manuel
* Changed: Moved Bluetooth part to `installble.sh` by @mr-manuel
* Changed: Moved Bluetooth part to `reinstall-local.sh` by @mr-manuel
* Changed: Moved BMS scripts to subfolder by @mr-manuel
* Changed: Optimized installation scripts by @mr-manuel
* Changed: Removed cell voltage penalty. Replaced by automatic voltage calculation. Max voltage is kept until cells are balanced and reset when cells are inbalanced by @mr-manuel
* Changed: Removed wildcard imports from several BMS drivers and fixed black lint errors by @mr-manuel
* Changed: Serial-Starter file is now created from `reinstalllocal.sh`. Fixes also https://github.com/Louisvdw/dbus-serialbattery/issues/520 by @mr-manuel
* Changed: Renamed scripts for better reading #532 by @mr-manuel
* Changed: Reworked and optimized installation scripts by @mr-manuel
* Changed: Separate Time-To-Go and Time-To-SoC activation by @mr-manuel
* Changed: Serial-Starter file is now created from `reinstall-local.sh`. Fixes also https://github.com/Louisvdw/dbus-serialbattery/issues/520 by @mr-manuel
* Changed: Temperature alarm changed in order to not trigger all in the same condition for JKBMS by @mr-manuel
* Changed: Time-To-Soc repetition from cycles to seconds. Minimum value is every 5 seconds. This prevents CPU overload and ensures system stability. Renamed `TIME_TO_SOC_LOOP_CYCLES` to `TIME_TO_SOC_RECALCULATE_EVERY` by @mr-manuel
* Changed: Time-To-Soc string from `days, HR:MN:SC` to `<days>d <hours>h <minutes>m <seconds>s` (same as Time-To-Go) by @mr-manuel
Expand Down
61 changes: 44 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,66 @@
# dbus-serialbattery
This is a driver for VenusOS devices (any GX device sold by Victron or a Raspberry Pi running the VenusOS image).
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 communication (RS232, RS485 or TTL UART) and publish this data to the VenusOS system. 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.
The driver will communicate with a Battery Management System (BMS) that support serial communication (RS232, RS485 or TTL UART) and publish this data to the Venus OS system. 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.

## Documentation
Check the documenation for more informations.
* [Introduction](https://louisvdw.github.io/dbus-serialbattery/)
* [Features](https://louisvdw.github.io/dbus-serialbattery/general/features)
* [Supported BMS](https://louisvdw.github.io/dbus-serialbattery/general/supported-bms)
* [How to install](https://louisvdw.github.io/dbus-serialbattery/general/install)
* [Troubleshoot](https://louisvdw.github.io/dbus-serialbattery/troubleshoot/)
* [FAQ (Frequently Asked Questions)](https://louisvdw.github.io/dbus-serialbattery/troubleshoot/faq)
* [BMS Types supported](https://github.com/Louisvdw/dbus-serialbattery/wiki/BMS-types-supported)
* [FAQ](https://github.com/Louisvdw/dbus-serialbattery/wiki/FAQ)
* [Features](https://github.com/Louisvdw/dbus-serialbattery/wiki/Features)
* [How to install](https://github.com/Louisvdw/dbus-serialbattery/wiki/How-to-install)
* [Troubleshoot](https://github.com/Louisvdw/dbus-serialbattery/wiki/Troubleshoot)

## Supporting this project:
### Supporting this project:
If you find this driver helpful please considder supporting this project. You can buy me a Ko-Fi or get in contact if you would like to donate hardware.

[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/Z8Z73LCW1) or using [Paypal.me](https://paypal.me/innernet)

## Developer Remarks
### 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,
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.

## How it works
#### 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 `dbushelper.publish_battery()`. `publish_battery()` executes `Battery.refresh_data()` which
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` (note that Low Voltage is ignored by the system)
* `/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).
For more details on the victron dbus interface see [the official victron dbus documentation](https://github.com/victronenergy/venus/wiki/dbus)

## Screenshots

### Venus OS

![VenusOS](docs/screenshots/venus-os_001.png)
![VenusOS](docs/screenshots/venus-os_002.png)
![VenusOS](docs/screenshots/venus-os_003.png)
![VenusOS](docs/screenshots/venus-os_004.png)
![VenusOS](docs/screenshots/venus-os_005.png)
![VenusOS](docs/screenshots/venus-os_006.png)
![VenusOS](docs/screenshots/venus-os_007.png)
![VenusOS](docs/screenshots/venus-os_008.png)
![VenusOS](docs/screenshots/venus-os_009.png)
![VenusOS](docs/screenshots/venus-os_010.png)
![VenusOS](docs/screenshots/venus-os_011.png)
![VenusOS](docs/screenshots/venus-os_012.png)
![VenusOS](docs/screenshots/venus-os_013.png)

### VRM Portal

![VenusOS](docs/screenshots/vrm-portal_001.png)
![VenusOS](docs/screenshots/vrm-portal_002.png)
![VenusOS](docs/screenshots/vrm-portal_003.png)
![VenusOS](docs/screenshots/vrm-portal_004.png)
![VenusOS](docs/screenshots/vrm-portal_005.png)
![VenusOS](docs/screenshots/vrm-portal_006.png)
![VenusOS](docs/screenshots/vrm-portal_007.png)
![VenusOS](docs/screenshots/vrm-portal_008.png)
![VenusOS](docs/screenshots/vrm-portal_009.png)
14 changes: 7 additions & 7 deletions docs/docs/general/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ In [VRM](https://vrm.victronenergy.com/) look under the device list for your ins
2. Run these commands to install or update to the latest release version.

```bash
wget -O /tmp/installrelease.sh https://raw.githubusercontent.com/Louisvdw/dbus-serialbattery/master/etc/dbus-serialbattery/installrelease.sh
wget -O /tmp/install-release.sh https://raw.githubusercontent.com/Louisvdw/dbus-serialbattery/master/etc/dbus-serialbattery/install-release.sh

bash /tmp/installrelease.sh
bash /tmp/install-release.sh

reboot
```
Expand Down Expand Up @@ -138,7 +138,7 @@ If you use the cell voltage limits, temperature limits or SoC limits you also ne

### Settings location/path

💡 After updating the settings reboot the device or run `/data/etc/dbus-serialbattery/reinstalllocal.sh` to apply the changes.
💡 After updating the settings reboot the device or run `/data/etc/dbus-serialbattery/reinstall-local.sh` to apply the changes.

#### Driver version `<= v0.14.3`
Edit `/data/etc/dbus-serialbattery/utils.py` to update the constants.
Expand Down Expand Up @@ -204,7 +204,7 @@ Edit `/data/etc/dbus-serialbattery/dbus-serialbattery.py` and uncommented (witho
You can disable the driver so that it will not be run by the GX device. To do that run the following command in SSH.

```bash
bash /data/etc/dbus-serialbattery/disabledriver.sh
bash /data/etc/dbus-serialbattery/disable.sh
```

You also need to configure your MPPTs to run in `Stand alone mode` again. Follow the Victron guide for [Err 67 - BMS Connection lost](https://www.victronenergy.com/live/mppt-error-codes#err_67_-_bms_connection_lost).
Expand All @@ -213,7 +213,7 @@ You also need to configure your MPPTs to run in `Stand alone mode` again. Follow
To enable the driver again you can run the installer.

```bash
bash /data/etc/dbus-serialbattery/reinstalllocal.sh
bash /data/etc/dbus-serialbattery/reinstall-local.sh
```

## Uninstall/remove the driver
Expand All @@ -236,11 +236,11 @@ rm -rf /opt/victronenergy/service/dbus-serialbattery
rm -rf /opt/victronenergy/service-templates/dbus-serialbattery
rm -rf /opt/victronenergy/dbus-serialbattery
# kill if running
# kill driver, if running
pkill -f "python .*/dbus-serialbattery.py"
# remove install-script from rc.local
sed -i "/sh \/data\/etc\/dbus-serialbattery\/reinstalllocal.sh/d" /data/rc.local
sed -i "/sh \/data\/etc\/dbus-serialbattery\/reinstall-local.sh/d" /data/rc.local
```

> If after the uninstall for some reason several items in the GUI were red, DO NOT reboot your GX device. See [Uninstalling driver bricked my cerbo #576](https://github.com/Louisvdw/dbus-serialbattery/issues/576)
Loading

0 comments on commit 9fcf1a5

Please sign in to comment.