### Install and Use htop for CPU Load Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/next/faq Guide to installing and using `htop` on Venus OS to monitor and troubleshoot high CPU usage. `htop` is not pre-installed and requires manual installation. ```bash # Install htop (if not already installed) opkg update opkg install htop # Open htop and sort by CPU time hop # Inside htop: # Press F6 to sort # Select Time and press Enter # Exit htop # Press q or CTRL + C ``` -------------------------------- ### Download and Execute Venus OS Installer Script (Shell) Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/general/install This snippet downloads the `install.sh` script from a GitHub repository to the `/tmp` directory and then executes it. This script is used to install or update the Venus OS on GX devices. ```shell wget -O /tmp/install.sh https://raw.githubusercontent.com/mr-manuel/venus-os_dbus-serialbattery/master/dbus-serialbattery/install.sh bash /tmp/install.sh ``` -------------------------------- ### Install dbus-serialbattery via SSH Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/v1.4.20240928/general/install This snippet provides the commands to download and execute the dbus-serialbattery installer script over SSH. It requires root access and allows the user to choose the installation version. ```shell wget -O /tmp/install.sh https://raw.githubusercontent.com/mr-manuel/venus-os_dbus-serialbattery/refs/tags/v1.4.20240928/etc/dbus-serialbattery/install.sh bash /tmp/install.sh ``` -------------------------------- ### Troubleshooting High CPU Load with htop Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/v1.3.20240705-or-older/faq Guides users on how to troubleshoot high CPU usage on Venus OS by installing and using the `htop` utility. It explains how to launch `htop`, sort processes by CPU time using F6, and exit the utility. ```bash apt-get update apt-get install htop htop ``` ```bash # Inside htop: # Press F6 to sort # Select 'Time' and press Enter # Press 'q' or CTRL+C to exit ``` -------------------------------- ### Install Venus OS Serialbattery via SSH Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/v1.3.20240705-or-older/general/install This snippet demonstrates how to download and execute the installation script for the Venus OS serialbattery component over SSH. It requires root access and fetches the script from a GitHub repository. The script then prompts the user to select an installation version (e.g., latest stable, beta, nightly, specific version, or local tar file). ```shell wget -O /tmp/install.sh https://raw.githubusercontent.com/mr-manuel/venus-os_dbus-serialbattery/refs/tags/v1.3.20240705/etc/dbus-serialbattery/install.sh bash /tmp/install.sh ``` -------------------------------- ### Install dbus-serialbattery via SSH Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/v1.6.20250131/general/install This snippet demonstrates how to download and execute the installation script for dbus-serialbattery on a Venus OS device using SSH. It requires root access and fetches the script from a GitHub repository. ```shell wget -O /tmp/install.sh https://raw.githubusercontent.com/mr-manuel/venus-os_dbus-serialbattery/master/dbus-serialbattery/install.sh bash /tmp/install.sh ``` -------------------------------- ### Install Venus OS Serialbattery via SSH Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/next/general/install This snippet shows how to download and execute the installation script for the Venus OS serialbattery driver using SSH. It requires root access and fetches the script from a GitHub repository. ```shell wget -O /tmp/install.sh https://raw.githubusercontent.com/mr-manuel/venus-os_dbus-serialbattery/master/dbus-serialbattery/install.sh bash /tmp/install.sh ``` -------------------------------- ### Adjust Max Cell Voltage Setting (Example) Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/next/faq Example demonstrating how adjusting the MAX_CELL_VOLTAGE setting affects the charging voltage. It illustrates the impact of aiming for protection voltage versus full charge voltage and the resulting cell balancing issues. ```text MAX_CELL_VOLTAGE = 3.45V Example: 8 cell battery Aim for 3.45V/cell = 27.60V Aim for 3.64V/cell = 29.12V ``` -------------------------------- ### Monitor Serial BMS Driver Logs Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/next/troubleshoot Monitors the log file for the serial starter driver, filtering for dbus-serialbattery entries and converting timestamps. The `tail -F` command continuously streams new log entries, and `CTRL + C` is used to exit. This helps verify if the driver started successfully against a USB port. ```shell tail -F -n 100 /data/log/serial-starter/current | grep dbus-serialbattery | tai64nlocal ``` -------------------------------- ### Monitor System Load with htop Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/v1.6.20250131/faq Instructions on how to install and use the `htop` utility on Venus OS to diagnose high CPU usage by sorting processes by CPU time. ```bash cat /var/log/messages* | grep watchdog ``` ```bash head /data/log/watchdog_processlist.txt ``` -------------------------------- ### Enable Bluetooth/CAN services Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/general/install Shell script to execute after adding Bluetooth or CAN configurations to `config.ini` to create the necessary Bluetooth services. ```bash /data/apps/dbus-serialbattery/enable.sh ``` -------------------------------- ### Restart dbus-serialbattery service Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/general/install Command to restart the `dbus-serialbattery` service after updating settings in `config.ini` to apply the changes. ```bash /data/apps/dbus-serialbattery/restart.sh ``` -------------------------------- ### Enable dbus-serialbattery Driver Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/general/install This script enables the dbus-serialbattery driver, allowing it to run on the GX device. ```bash bash /data/apps/dbus-serialbattery/enable.sh ``` -------------------------------- ### Prepare for downgrade: Remove serial starter configuration Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/v1.3.20240705-or-older/general/install This command is specifically for downgrading from dbus-serialbattery versions `>= v1.0.0` to `<= v0.14.3`. It removes the `/data/conf/serial-starter.d` folder, which is configured differently in newer versions, to prevent 'File exists' errors during the downgrade installation. ```shell rm -rf /data/conf/serial-starter.d ``` -------------------------------- ### Enable dbus-serialbattery Driver Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/v1.3.20240705-or-older/general/install Re-enable the dbus-serialbattery driver by running the installer script via SSH. This action effectively reinstalls the driver and its associated services. ```bash bash /data/etc/dbus-serialbattery/reinstall-local.sh ``` -------------------------------- ### Setting Max Cell Voltage Configuration Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/faq Example of how MAX_CELL_VOLTAGE and MIN_CELL_VOLTAGE are used to calculate the maximum charging voltage for a battery pack. The example uses 8 cells and demonstrates the impact of different target voltages on the charging process. ```text MAX_CELL_VOLTAGE MIN_CELL_VOLTAGE 3.2V 3.45V 3.65V 3.64V 27.60V (3.45V x 8) 29.12V (3.64V x 8) 0.2V 1.32V 3.85V 3.1V - 3.45V ``` -------------------------------- ### Remove dbus-serialbattery Installation Files Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/v1.4.20240928/general/install Completely remove all installation files associated with the dbus-serialbattery driver. This command should be run after the uninstall script to ensure a clean removal. ```shell rm -rf /data/etc/dbus-serialbattery ``` -------------------------------- ### Monitor Serial Starter Logs (Shell) Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/troubleshoot Monitors the serial starter log file for entries related to dbus-serialbattery. It uses `tail` to follow new entries, `grep` to filter for relevant lines, and `tai64nlocal` to format timestamps. This helps verify if the driver has successfully started against a USB port. ```shell tail -F -n 100 /data/log/serial-starter/current | grep dbus-serialbattery | tai64nlocal ``` -------------------------------- ### Daly BMS RS485 Configuration Example Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/next/general/connect Example of setting Modbus addresses for multiple Daly BMS units connected via RS485. Each BMS requires a unique board number, which maps to a specific Modbus address. This is configured in the `config.ini` file. ```ini BATTERY_ADDRESSES = 0x40, 0x41, 0x42 ``` -------------------------------- ### Restore GUI to default for Venus OS Driver >= v1.0.0 Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/v1.3.20240705-or-older/faq This command executes a script to restore the default GUI configuration. It is intended for newer driver versions starting from v1.0.0. ```shell bash /data/etc/dbus-serialbattery/restore-gui.sh ``` -------------------------------- ### Remove dbus-serialbattery install script from rc.local Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/v1.3.20240705-or-older/general/install This command uses `sed` to remove the line responsible for running the dbus-serialbattery installation script from the `/data/rc.local` file. This prevents the script from running on subsequent reboots. ```shell sed -i "/sh \/data\/etc\/dbus-serialbattery\/reinstalllocal.sh/d" /data/rc.local ``` -------------------------------- ### Scan for Bluetooth Devices with bluetoothctl Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/general/install Uses the `bluetoothctl` utility to scan for Bluetooth devices and retrieve their MAC addresses. This is a multi-step process involving enabling scanning, listing devices, and disabling scanning. ```bash bluetoothctl scan on devices scan off quit ``` -------------------------------- ### Edit config.ini using Nano Editor Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/general/install Provides instructions for editing the `config.ini` file directly on a GX device or Raspberry Pi using the Nano text editor via SSH. It details how to save and exit the editor. ```bash nano /data/apps/dbus-serialbattery/config.ini ``` -------------------------------- ### Adjusting Max Cell Voltage for LiFePo4 Batteries Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/v1.6.20250131/faq This code example demonstrates how to adjust the `MAX_CELL_VOLTAGE` and `MIN_CELL_VOLTAGE` settings in the driver for LiFePo4 cells. It explains the rationale behind the default values and provides an example calculation for charging voltages. ```python MAX_CELL_VOLTAGE = 3.45 MIN_CELL_VOLTAGE = 3.2 # Example for 8 cell battery: # Aiming for 3.45V per cell -> 27.60V # Aiming for 3.64V per cell -> 29.12V ``` -------------------------------- ### Restore GUI Changes Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/next/faq Shell command to revert GUI modifications made by the driver, potentially fixing white screen issues after installation. ```bash bash /data/apps/dbus-serialbattery/restore-gui.sh ``` -------------------------------- ### Force firmware update/reinstall for Venus OS Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/v1.3.20240705-or-older/faq This command forces a check for and installation of available firmware updates. It may take 5-15 minutes. It's used as a troubleshooting step if GUI changes don't resolve issues. ```shell /opt/victronenergy/swupdate-scripts/check-updates.sh -update -force ``` -------------------------------- ### Restore GUI Changes Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/faq This command reverts GUI modifications made by the driver, helping to resolve issues like a white screen after installation. It restores the system to its default GUI state. ```bash bash /data/apps/dbus-serialbattery/restore-gui.sh ``` -------------------------------- ### Prevent Driver Auto-installation Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/faq These commands back up the rc.local and rcS.local files, preventing any drivers from automatically installing after a firmware update. This is useful if specific driver installations are causing issues. ```bash mv /data/rc.local /data/rc.local.backup mv /data/rcS.local /data/rcS.local.backup ``` -------------------------------- ### RS485 Daisy Chaining Guide Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/v1.4.20240928/general/connect Instructions for daisy-chaining devices via RS485, emphasizing the importance of a daisy-chain configuration, shielded cables, and termination resistors for lines longer than 10 meters. ```text Connect the wires in a device-to-device (daisy chain) configuration: * **Avoid star or ring networks** to prevent signal reflections. * The main cable runs from the master (USB to RS485 adapter) to all BMS and contains three wires: * **A (DATA-)** * **B (DATA+)** * **GND (common)** for proper reference The main cable should be shielded. Ideally, the shield is separate from the 0 Volt line (GND), but they can be combined if the shield is free of voltage fluctuations. Use a termination resistor (120-130 Ω) between A (DATA-) and B (DATA+) if the line is longer than 10 meters. ``` -------------------------------- ### Configure Battery Limits in config.ini Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/general/install Shows how to set various battery parameters like maximum charge/discharge current and cell voltage limits within the `config.ini` file. These settings allow for customization of battery behavior. ```ini MAX_BATTERY_CHARGE_CURRENT = 50.0 MAX_BATTERY_DISCHARGE_CURRENT = 60.0 MIN_CELL_VOLTAGE = 2.900 MAX_CELL_VOLTAGE = 3.450 FLOAT_CELL_VOLTAGE = 3.375 ``` -------------------------------- ### Restore GUI Changes in dbus-serialbattery Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/v1.4.20240928/faq Executes a script to revert GUI modifications made by the dbus-serialbattery driver. This is a common fix for white screen issues after installation. ```bash bash /data/etc/dbus-serialbattery/restore-gui.sh ``` -------------------------------- ### Monitor Single Cell Voltages Locally (Node-RED) Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/next/faq Guidance on using Node-RED, InfluxDB, and Grafana to monitor individual cell voltages and other data locally for offline statistics. This setup allows for detailed data tracking and analysis. ```text Track individual cell voltages. ``` -------------------------------- ### Uninstall dbus-serialbattery Driver Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/v1.6.20250131/general/install This command shows how to uninstall the dbus-serialbattery driver. It also includes an additional command to forcefully remove the driver's installation directory. ```bash bash /data/etc/dbus-serialbattery/uninstall.sh rm -rf /data/etc/dbus-serialbattery ``` -------------------------------- ### Edit config.ini using Nano Editor via SSH Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/v1.6.20250131/general/install This command illustrates how to open and edit the config.ini file on a GX device or Raspberry Pi using the Nano text editor over an SSH connection. It also includes instructions for saving and exiting the editor. ```bash nano /data/etc/dbus-serialbattery/config.ini ``` -------------------------------- ### Force Firmware Update Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/faq This command initiates a forceful update or reinstallation of the system firmware. It can resolve various issues, including those caused by outdated firmware or corrupted installations. ```bash /opt/victronenergy/swupdate-scripts/check-updates.sh -update -force ``` -------------------------------- ### Get BMS MAC address using bluetoothctl Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/v1.4.20240928/general/install These commands demonstrate how to use the `bluetoothctl` utility to scan for Bluetooth devices and retrieve their MAC addresses. This is useful for identifying and configuring specific BMS devices. ```shell bluetoothctl scan on devices scan off quit ``` -------------------------------- ### Check driver runtime status Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/next/troubleshoot Checks the running status and uptime (in seconds) of the dbus-serialbattery driver services. This helps determine if the driver is stable or frequently restarting. ```shell svstat /service/dbus-serialbattery.tty* ``` ```shell svstat /service/dbus-blebattery.* ``` -------------------------------- ### Uninstall dbus-serialbattery Driver Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/general/install This script uninstalls and removes the dbus-serialbattery driver from the system. ```bash bash /data/apps/dbus-serialbattery/uninstall.sh ``` -------------------------------- ### Remove dbus-serialbattery installation files Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/v1.3.20240705-or-older/general/install These commands remove all directories associated with the dbus-serialbattery driver from the system. It's crucial not to use variables in these commands to prevent accidental deletion of other critical files if an error occurs. ```shell rm -rf /data/conf/serial-starter.d rm -rf /opt/victronenergy/service/dbus-serialbattery rm -rf /opt/victronenergy/service-templates/dbus-serialbattery rm -rf /opt/victronenergy/dbus-serialbattery rm -rf /data/etc/dbus-serialbattery ``` -------------------------------- ### Monitor CAN BMS Driver Logs Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/next/troubleshoot Monitors the log file for the dbus-canbattery driver, converting timestamps to local time. The `tail -F` command streams new log entries, and `CTRL + C` is used to exit. This helps verify a successful CAN BMS connection. ```shell tail -F -n 100 /data/log/dbus-canbattery.*/current | tai64nlocal ``` -------------------------------- ### Monitor Bluetooth BMS Driver Logs Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/next/troubleshoot Monitors the log file for the dbus-blebattery driver, converting timestamps to local time. The `tail -F` command streams new log entries, and `CTRL + C` is used to exit. This is used to confirm a successful Bluetooth BMS connection. ```shell tail -F -n 100 /data/log/dbus-blebattery.*/current | tai64nlocal ``` -------------------------------- ### Prevent auto-installation of drivers after firmware update Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/v1.3.20240705-or-older/faq These commands move the rc.local and rcS.local files to back them up, preventing any drivers from automatically installing after a firmware update. This is a follow-up step if the firmware update itself doesn't resolve the issue. ```shell mv /data/rc.local /data/rc.local.backup mv /data/rcS.local /data/rcS.local.backup ``` -------------------------------- ### Disable dbus-serialbattery Driver Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/general/install This script disables the dbus-serialbattery driver, preventing it from running on the GX device. After running this script, MPPTs must be configured to run in 'Stand alone mode'. ```bash bash /data/apps/dbus-serialbattery/disable.sh ``` -------------------------------- ### Check USB Device Recognition Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/next/troubleshoot Lists USB devices connected to the system, helping to identify if a USB to serial converter is recognized by Venus OS. This command is used for troubleshooting serial BMS connection issues. ```shell lsusb ``` -------------------------------- ### Get BMS MAC Address using bluetoothctl Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/v1.3.20240705-or-older/general/install This sequence of commands utilizes the `bluetoothctl` utility to scan for Bluetooth devices and retrieve their MAC addresses. It involves enabling scanning, listing discovered devices, and then disabling scanning. This is crucial for identifying and configuring specific BMS hardware. ```shell bluetoothctl ``` ```shell scan on ``` ```shell devices ``` ```shell scan off ``` ```shell quit ``` -------------------------------- ### Python: Set Unique Identifier Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/v1.4.20240928/general/supported-bms Instructions for populating the `self.unique_identifier` attribute with a unique value to differentiate BMS devices in a multi-battery setup. This ensures proper identification and management. ```python If available populate `self.unique_identifier` with a unique value to distinguish the BMS in a multiple battery setup ``` -------------------------------- ### Monitor serial-starter log Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/v1.3.20240705-or-older/troubleshoot Displays the last part of the serial-starter log file and updates in real-time. Useful for observing device connection and assigned ttyUSB ports. Exits with CTRL+C. ```shell tail -F /data/log/serial-starter/current | tai64nlocal ``` -------------------------------- ### Configure GitHub Actions Permissions Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/next/general/supported-bms This section provides instructions on how to configure GitHub Actions permissions to ensure CI/CD pipelines run correctly. It specifies settings for 'Actions permissions' and 'Workflow permissions' to allow all actions and grant read/write access. ```Shell Actions -> General -> Actions permissions -> Allow all actions and reusable workflows Actions -> General -> Workflow permissions -> Read and write permissions ``` -------------------------------- ### Node-RED, InfluxDB, and Grafana for Cell Voltage Monitoring Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/faq This snippet outlines the tools used for local monitoring of single cell voltages and other data, enabling offline statistics. It requires setting up Node-RED, InfluxDB, and Grafana. ```bash Node-RED, InfluxDB and Grafana ``` -------------------------------- ### Restore GUI to default for Venus OS Driver <= v0.14.3 Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/v1.3.20240705-or-older/faq This snippet restores the default GUI configuration by copying a backup QML file and then restarting the GUI service. It is intended for older driver versions. ```shell # restore original qml cp -f /opt/victronenergy/gui/qml/PageBattery.qml.backup /opt/victronenergy/gui/qml/PageBattery.qml # restart gui svc -d /service/gui && sleep 1 && svc -u /service/gui ``` -------------------------------- ### View serial-starter logs Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/troubleshoot Monitors the serial-starter log file in real-time to identify USB device connections and assigned TTY ports. The `-F` parameter ensures the command continues to follow new log entries. Exit with CTRL+C. ```shell tail -F /data/log/serial-starter/current | tai64nlocal ``` -------------------------------- ### Markdown: Add BMS to Supported BMS Page Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/v1.4.20240928/general/supported-bms Instructions for adding a newly supported BMS to the main 'Supported BMS' documentation page by editing a specific Markdown file. ```markdown Add your BMS to the Supported BMS page by editing `docs/general/supported-bms.md` ``` -------------------------------- ### Add New BMS with Python Template Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/v1.6.20250131/general/supported-bms Guidance on contributing new BMS support by forking the repository and using `battery_template.py` as a base. It includes a checklist for ensuring code quality and proper integration, such as running GitHub Actions for linting and adding BMS details to configuration files and documentation. ```python from dbus_serialbattery import Battery, battery_unit_type class NewBMS(Battery): # battery_unit_type: The unit type of the battery. # battery_unit_type = battery_unit_type.BatteryUnitType.SHUNT def __init__(self, comm_settings, poll_interval, device_id, hassname, name, soc_limited=False, auto_detect_soc_method=False, read_soc_from_device=False, max_battery_charge_current=None, max_battery_discharge_current=None, serial_port=None, off_value=None, is_zero_pfs=False, has_temp_sensor=True, voltage_correction=0, voltage_correction_for_cell_count=False, custom_module_data_length=None, custom_module_data_offset=None, unique_identifier=None, # optional parameters temperature_battery_low=None, temperature_battery_high=None, temperature_battery_low_off=None, temperature_battery_high_off=None, # use custom value for cell voltage cell_voltage_divisor=None, cell_voltage_multiplier=None, # use custom value for cell balancing cell_balancing_divisor=None, cell_balancing_multiplier=None, custom_battery_capacity=None, # use custom value for serial number serial_number_divisor=None, serial_number_multiplier=None, custom_cells_count=None, # for JKBMS check_crc=None, # for MNB battery_start_cell_number=None, # for JBD set_voltage_for_soc=None, # for ANT # use ANT protocol is_ANT=False, # use custom value for current current_divisor=None, current_multiplier=None, # use custom value for voltage voltage_divisor=None, voltage_multiplier=None, # use custom value for temperature temperature_divisor=None, temperature_multiplier=None, # use custom value for capacity capacity_divisor=None, capacity_multiplier=None, # use custom value for soc soc_divisor=None, soc_multiplier=None, # use custom value for mosfet mosfet_divisor=None, mosfet_multiplier=None, # for JKBMS PB Model temp_max=None, # for JKBMS capacity_offset=None, # for JKBMS capacity_multiply=None, # for JKBMS capacity_divisor_new=None, # for JKBMS temp_offset=None, # for JKBMS temp_multiply=None, # for JKBMS temp_divisor_new=None, # for JKBMS current_offset=None, # for JKBMS current_multiply=None, # for JKBMS current_divisor_new=None, # for JKBMS voltage_offset=None, # for JKBMS voltage_multiply=None, # for JKBMS voltage_divisor_new=None, # for JKBMS soc_offset=None, # for JKBMS soc_multiply=None, # for JKBMS soc_divisor_new=None, # for JKBMS status_offset=None, # for JKBMS status_multiply=None, # for JKBMS status_divisor_new=None, # for JKBMS fet_offset=None, # for JKBMS fet_multiply=None, # for JKBMS fet_divisor_new=None, # for JKBMS cells_offset=None, # for JKBMS cells_multiply=None, # for JKBMS cells_divisor_new=None, # for JKBMS cycle_offset=None, # for JKBMS cycle_multiply=None, # for JKBMS cycle_divisor_new=None, # for JKBMS battery_cells_offset=None, # for JKBMS battery_cells_multiply=None, # for JKBMS battery_cells_divisor_new=None, # for JKBMS battery_fet_offset=None, # for JKBMS battery_fet_multiply=None, # for JKBMS battery_fet_divisor_new=None, # for JKBMS battery_status_offset=None, # for JKBMS battery_status_multiply=None, # for JKBMS battery_status_divisor_new=None, # for JKBMS battery_soc_offset=None, # for JKBMS battery_soc_multiply=None, # for JKBMS battery_soc_divisor_new=None, # for JKBMS battery_voltage_offset=None, # for JKBMS battery_voltage_multiply=None, # for JKBMS battery_voltage_divisor_new=None, # for JKBMS battery_current_offset=None, # for JKBMS battery_current_multiply=None, # for JKBMS battery_current_divisor_new=None, # for JKBMS battery_temp_offset=None, # for JKBMS battery_temp_multiply=None, # for JKBMS battery_temp_divisor_new=None, # for JKBMS battery_cycle_offset=None, # for JKBMS battery_cycle_multiply=None, # for JKBMS battery_cycle_divisor_new=None, # for JKBMS battery_fet_type=None, # for JKBMS battery_fet_type_offset=None, # for JKBMS battery_fet_type_multiply=None, # for JKBMS battery_fet_type_divisor_new=None, # for JKBMS battery_fet_type_enable=None, # for JKBMS battery_fet_type_enable_offset=None, # for JKBMS battery_fet_type_enable_multiply=None, # for JKBMS battery_fet_type_enable_divisor_new=None, # for JKBMS battery_fet_type_enable_xor=None, # for JKBMS battery_fet_type_enable_xor_offset=None, # for JKBMS battery_fet_type_enable_xor_multiply=None, # for JKBMS battery_fet_type_enable_xor_divisor_new=None, # for JKBMS battery_fet_type_enable_xor_enable=None, # for JKBMS battery_fet_type_enable_xor_enable_offset=None, # for JKBMS battery_fet_type_enable_xor_enable_multiply=None, # for JKBMS battery_fet_type_enable_xor_enable_divisor_new=None, # for JKBMS battery_fet_type_enable_xor_enable_xor=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_offset=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_multiply=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_divisor_new=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_offset=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_multiply=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_divisor_new=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_offset=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_multiply=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_divisor_new=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_offset=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_multiply=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_divisor_new=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_offset=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_multiply=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_divisor_new=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_offset=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_multiply=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_divisor_new=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_offset=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_multiply=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_divisor_new=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_offset=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_multiply=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_divisor_new=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_offset=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_multiply=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_divisor_new=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_offset=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_multiply=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_divisor_new=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_offset=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_multiply=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_divisor_new=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_offset=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_multiply=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_divisor_new=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_offset=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_multiply=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_divisor_new=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_offset=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_multiply=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_divisor_new=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_offset=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_multiply=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_divisor_new=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_offset=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_multiply=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_divisor_new=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_offset=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_multiply=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_divisor_new=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_offset=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_multiply=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_divisor_new=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_offset=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_multiply=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_divisor_new=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_offset=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_multiply=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_divisor_new=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_offset=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_multiply=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_divisor_new=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_offset=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_multiply=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_divisor_new=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_offset=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_multiply=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_divisor_new=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_offset=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_multiply=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_xor_enable_divisor_new=None, # for JKBMS battery_fet_type_enable_xor_enable_xor_enable_xor_enable_ ``` -------------------------------- ### Understand config.ini and config.default.ini Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/v1.4.20240928/faq Explains the purpose of `config.ini` for user-defined configurations and `config.default.ini` which contains all possible settings with their default values. `config.ini` is preserved across updates, while `config.default.ini` is overwritten. ```text The `config.ini` is a file where you can specify your own configuration changes. Like when you want to change default values, e.g. increase the charge and discharge limits. This file is preserved after a version update. Lookup the `config.default.ini` to see which settings are available. The `config.default.ini` is a file where all possible configuration settings are stored with their default values. Every setting is also well documented in order to understand what the setting does. This file is overwritten every time you update the driver. ``` -------------------------------- ### Tail dbus-blebattery Logs (All Devices) Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/v1.4.20240928/troubleshoot Monitors log files for all dbus-blebattery devices in real-time. Press CTRL+C to exit. Requires the 'tail' command. ```bash tail -F /data/log/dbus-blebattery.*/current | tai64nlocal ``` -------------------------------- ### Tail dbus-serialbattery Logs (All Ports) Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/v1.4.20240928/troubleshoot Monitors log files for all dbus-serialbattery TTY devices in real-time. Press CTRL+C to exit. Requires the 'tail' command. ```bash tail -F /data/log/dbus-serialbattery.*/current | tai64nlocal ``` -------------------------------- ### Python Battery Template Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/next/general/supported-bms Guidance on using the `battery_template.py` file as a template for adding a new battery. This involves creating a new battery class and importing it alphabetically in the main script. ```Python from dbus_serialbattery.battery import Battery class MyNewBattery(Battery): # ... implementation ... pass # Add MyNewBattery in alphabetical order in etc/dbus-serialbattery/dbus-serialbattery.py ``` -------------------------------- ### Configure SOC Calculation (Coulomb-Counting) Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/v1.4.20240928/general/features Enables the driver's SOC calculation based on coulomb-counting to workaround BMS SOC reset issues. Configuration details can be found in `config.default.ini`. ```ini [SOC] # Enable SOC calculation based on coloumb-counting # SOC_CALCULATE = True/False # Optional: Create a map to correct wrong current measurements # SOC_MAP = "" ``` -------------------------------- ### Markdown: Add BMS to Features Comparison Source: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/v1.4.20240928/general/supported-bms Instructions for updating the BMS feature comparison page by editing a specific Markdown file. This ensures new BMS support is reflected in the documentation. ```markdown Add your BMS to the BMS feature comparison page by editing `docs/general/features.md` ```