Louisvdw / dbus-serialbattery

Battery Monitor driver for serial battery in VenusOS GX systems
MIT License
492 stars 157 forks source link

Using external current sensor (smart shunt) #1059

Closed squowse closed 1 month ago

squowse commented 1 month ago

Describe the problem

I have successfully enabled SOC_CALCULATION in the driver config.ini file. This seems to be working and resetting to 100% correctly.

I changed the EXTERNAL_CURRENT_SENSOR_DBUS_DEVICE to the path found by dbus-spy. First time after reboot, VRM came up with the warning "realtime connection disabled due to gx device overload". The VRM interface did not update.

I disabled the external current sensor in the config.ini, rebooted, tested and then re-enabled it exactly the same. Now it appears to be working but the current displayed in VRM does not match the current shown using Victron Connect app simultaneously. The rounding is also wrong and is reminiscent of the BMS current reading.

Please see attachments

Driver version

v1.3.20240510passthrough

Venus OS device type

Cerbo GX

Venus OS version

v3.30

BMS type

JKBMS / Heltec BMS

Cell count

16

Battery count

1

Connection type

Bluetooth

Config file

[DEFAULT]

BLUETOOTH_BMS = Jkbms_Ble C8:47:8C:E4:57:F5

; If you want to add custom values/settings, then check the values/settings you want to change in "config.default.ini"
; and insert them below to persist future driver updates.

; Example (remove the semicolon ";" to uncomment and activate the value/setting):
; MAX_BATTERY_CHARGE_CURRENT = 50.0
; MAX_BATTERY_DISCHARGE_CURRENT = 60.0

; --------- Battery Current limits ---------
MAX_BATTERY_CHARGE_CURRENT    = 80.0
MAX_BATTERY_DISCHARGE_CURRENT = 80.0

; --------- Cell Voltages ---------
; Description:
;     Cell min/max voltages which are used to calculate the min/max battery voltage
; Example:
;     16 cells * 3.45V/cell = 55.2V max charge voltage. 16 cells * 2.90V = 46.4V min discharge voltage
MIN_CELL_VOLTAGE   = 2.900
; Max voltage (can seen as absorption voltage)
MAX_CELL_VOLTAGE   = 3.525
; Float voltage (can be seen as resting voltage)
FLOAT_CELL_VOLTAGE = 3.325

; --------- SOC calculation ---------
; +++ This has nothing to do with "SOC reset voltage" in a section above +++
; Description:
;     Calculate the SOC in the driver. Do not use the SOC reported by the BMS
; SOC_CALCULATION:
;     True: Calc SOC in the driver, do not use SOC reported from BMS
;         - The SOC is calculated by integration of the current reported
;         - The current reported can be corrected by the map
;           (SOC_CALC_CURRENT_REPORTED_BY_BMS, SOC_CALC_CURRENT_MEASURED_BY_USER)
;         - The SOC is set to 100% if the following conditions apply for at least SOC_RESET_TIME seconds:
;             * Highest cell voltage is higher or equal to MAX_CELL_VOLTAGE
;             * Current is lower than SOC_RESET_CURRENT
;         - The SOC is set to 0% if the following conditions apply for at least SOC_RESET_TIME seconds:
;             * Lowest cell voltage is lower or equal to MIN_CELL_VOLTAGE
;             * Battery is discharging
;         - The calculated SOC is stored in dbus to persist a driver restart
;     False: Use SOC reported from BMS (none of the other parameters apply)
; More info: https://github.com/Louisvdw/dbus-serialbattery/pull/868
SOC_CALCULATION   = True
SOC_RESET_CURRENT = 2   
SOC_RESET_TIME    = 30
SOC_CALC_CURRENT_REPORTED_BY_BMS  = -300, 300
SOC_CALC_CURRENT_MEASURED_BY_USER = -300, 300
; Example to set small currents to zero
;     SOC_CALC_CURRENT_REPORTED_BY_BMS  = -300, -0.5, 0.5, 300
;     SOC_CALC_CURRENT_MEASURED_BY_USER = -300,    0,   0, 300

; --------- Externcal current sensor ---------
; Specify the dbus device and path where the external current sensor is connected to
; You can find it by executing the dbus-spy command
; Example for a external current sensor connected to the VE.Bus port:
;     EXTERNAL_CURRENT_SENSOR_DBUS_DEVICE = "com.victronenergy.vebus.ttyS3"
;     EXTERNAL_CURRENT_SENSOR_DBUS_PATH = "/Dc/0/Current"

EXTERNAL_CURRENT_SENSOR_DBUS_DEVICE = "com.victronenergy.battery.ttyS6" 
;smart shunt 1
EXTERNAL_CURRENT_SENSOR_DBUS_PATH = "/Dc/0/Current"

; --------- SOC reset voltage (needs to match BMS settings) ---------
; +++ This has nothing to do with "SOC calculation" in a section below +++
; Description:
;     May be needed to reset the SoC to 100% once in a while for some BMS, because of SoC drift.
;     Specify the cell voltage where the SoC should be reset to 100% by the BMS.
;       - JKBMS: SoC is reset to 100% if one cell reaches OVP (over voltage protection) voltage
;     As you have to adopt this value to your system, I reccomend to start with
;     OVP voltage - 0.030 (see Example).
;       - Try to increase (add) by 0.005 in steps, if the system does not switch to float mode, even if
;         the target voltage SOC_RESET_VOLTAGE * CELL_COUNT is reached.
;       - Try to decrease (lower) by 0.005 in steps, if the system hits the OVP too fast, before all
;         cells could be balanced and the system goes into protection mode multiple times.
; Example:
;     If OVP is 3.650, then start with 3.620 and increase/decrease by 0.005
; Note:
;     The value has to be higher as the MAX_CELL_VOLTAGE
;     You also have to set CELL_VOLTAGES_WHILE_CHARGING accordingly, if you set CCCM_CV_ENABLE to true
;         else the charging current will be reduced to 0 before the target voltage is reached and the
;         battery will never switch to float
SOC_RESET_VOLTAGE = 3.650
; Specify after how many days the soc reset voltage should be reached again
; The timer is reset when the soc reset voltage is reached
; Leave empty if you don't want to use this
; Example:
;     Value is set to 15
;     day 1: soc reset reached once
;     day 16: soc reset reached twice
;     day 31: soc reset not reached since it's very cloudy
;     day 34: soc reset reached since the sun came out
;     day 49: soc reset reached again, since last time it took 3 days to reach soc reset voltage
SOC_RESET_AFTER_DAYS =

Relevant log output

2024-05-12 11:52:55.246044500 
2024-05-12 11:52:55.246052500 INFO:Bluetooth details
2024-05-12 11:52:55.616066500 Attempting to disconnect from C8:47:8C:E4:57:F5
2024-05-12 11:52:55.616077500 Successful disconnected
2024-05-12 11:53:01.741375500 Device C8:47:8C:E4:57:F5 (public)
2024-05-12 11:53:01.741385500   Alias: JK-B2A24S15P
2024-05-12 11:53:01.741387500   Paired: no
2024-05-12 11:53:01.741388500   Trusted: no
2024-05-12 11:53:01.741390500   Blocked: no
2024-05-12 11:53:01.741391500   Connected: no
2024-05-12 11:53:01.741392500   LegacyPairing: no
2024-05-12 11:53:01.741394500   UUID: Device Information        (0000180a-0000-1000-8000-00805f9b34fb)
2024-05-12 11:53:01.741397500   RSSI: -58
2024-05-12 11:53:01.741398500 
2024-05-12 11:53:14.056946500 INFO:SerialBattery:
2024-05-12 11:53:14.057727500 INFO:SerialBattery:Starting dbus-serialbattery
2024-05-12 11:53:14.059831500 INFO:SerialBattery:Venus OS v3.30
2024-05-12 11:53:14.060571500 INFO:SerialBattery:dbus-serialbattery v1.3.20240510passthrough
2024-05-12 11:53:31.035657500 INFO:SerialBattery:Init of Jkbms_Ble at C8:47:8C:E4:57:F5
2024-05-12 11:53:31.036655500 INFO:SerialBattery:Test of Jkbms_Ble at C8:47:8C:E4:57:F5
2024-05-12 11:53:37.060979500 INFO:SerialBattery:BAT: JKBMS 10.XW 16 cells (20220904)
2024-05-12 11:53:37.062499500 INFO:SerialBattery:Connection established to Jkbms_Ble
2024-05-12 11:53:41.390061500 INFO:SerialBattery:Found existing battery with DeviceInstance = 2
2024-05-12 11:53:41.829680500 INFO:SerialBattery:DeviceInstance = 2
2024-05-12 11:53:41.832210500 INFO:SerialBattery:PID file created successfully: /var/tmp/dbus-serialbattery_2.pid
2024-05-12 11:53:41.836587500 INFO:SerialBattery:Used DeviceInstances = ['2', '1']
2024-05-12 11:53:41.839015500 INFO:SerialBattery:com.victronenergy.battery.ble_c8478ce457f5
2024-05-12 11:53:41.848143500 INFO:SerialBattery:BAT: JKBMS 10.XW 16 cells (20220904)
2024-05-12 11:53:41.939178500 INFO:SerialBattery:publish config values = True
2024-05-12 11:53:42.026899500 INFO:SerialBattery:Battery Jkbms_Ble connected to dbus from ble_c8478ce457f5
2024-05-12 11:53:42.035085500 INFO:SerialBattery:========== Settings ==========
2024-05-12 11:53:42.036168500 INFO:SerialBattery:> Connection voltage: 56.13 V | Current: -1.2 A | SoC: None%
2024-05-12 11:53:42.037211500 INFO:SerialBattery:> Cell count: 16 | Cells populated: 32
2024-05-12 11:53:42.038521500 INFO:SerialBattery:> LINEAR LIMITATION ENABLE: True
2024-05-12 11:53:42.039756500 INFO:SerialBattery:> MIN CELL VOLTAGE: 2.9 V | MAX CELL VOLTAGE: 3.45 V
2024-05-12 11:53:42.045831500 INFO:SerialBattery:> MAX BATTERY CHARGE CURRENT: 50.0 A | MAX BATTERY DISCHARGE CURRENT: 60.0 A
2024-05-12 11:53:42.047027500 INFO:SerialBattery:> MAX BATTERY CHARGE CURRENT: 80.0 A | MAX BATTERY DISCHARGE CURRENT: 80.0 A (read from BMS)
2024-05-12 11:53:42.048188500 INFO:SerialBattery:> CVCM:     True
2024-05-12 11:53:42.057819500 INFO:SerialBattery:> CCCM CV:  True  | DCCM CV:  True
2024-05-12 11:53:42.058741500 INFO:SerialBattery:> CCCM T:   True  | DCCM T:   True
2024-05-12 11:53:42.059736500 INFO:SerialBattery:> CCCM SOC: False | DCCM SOC: False
2024-05-12 11:53:42.060507500 INFO:SerialBattery:> CHARGE FET: True | DISCHARGE FET: True | BALANCE FET: False
2024-05-12 11:53:42.061608500 INFO:SerialBattery:Serial Number/Unique Identifier: 2042102165
2024-05-12 12:19:54.773197500 *** CCGX booted (0) ***
2024-05-12 12:20:11.162703500 
2024-05-12 12:20:11.162710500 INFO:Bluetooth details
2024-05-12 12:20:11.462241500 Attempting to disconnect from C8:47:8C:E4:57:F5
2024-05-12 12:20:11.462251500 Successful disconnected
2024-05-12 12:20:17.197158500 Device C8:47:8C:E4:57:F5 (public)
2024-05-12 12:20:17.197167500   Alias: JK-B2A24S15P
2024-05-12 12:20:17.197168500   Paired: no
2024-05-12 12:20:17.197170500   Trusted: no
2024-05-12 12:20:17.197171500   Blocked: no
2024-05-12 12:20:17.197172500   Connected: no
2024-05-12 12:20:17.197174500   LegacyPairing: no
2024-05-12 12:20:17.197175500   UUID: Device Information        (0000180a-0000-1000-8000-00805f9b34fb)
2024-05-12 12:20:17.197178500   RSSI: -58
2024-05-12 12:20:17.199196500 
2024-05-12 12:20:29.424727500 INFO:SerialBattery:
2024-05-12 12:20:29.445375500 INFO:SerialBattery:Starting dbus-serialbattery
2024-05-12 12:20:29.456732500 INFO:SerialBattery:Venus OS v3.30
2024-05-12 12:20:29.463047500 INFO:SerialBattery:dbus-serialbattery v1.3.20240510passthrough
2024-05-12 12:20:46.305596500 INFO:SerialBattery:Init of Jkbms_Ble at C8:47:8C:E4:57:F5
2024-05-12 12:20:46.306563500 INFO:SerialBattery:Test of Jkbms_Ble at C8:47:8C:E4:57:F5
2024-05-12 12:20:51.863927500 INFO:SerialBattery:BAT: JKBMS 10.XW 16 cells (20220904)
2024-05-12 12:20:51.863936500 INFO:SerialBattery:Connection established to Jkbms_Ble
2024-05-12 12:20:56.853902500 INFO:SerialBattery:Found existing battery with DeviceInstance = 2
2024-05-12 12:20:57.661065500 INFO:SerialBattery:DeviceInstance = 2
2024-05-12 12:20:57.665421500 INFO:SerialBattery:PID file created successfully: /var/tmp/dbus-serialbattery_2.pid
2024-05-12 12:20:57.666148500 INFO:SerialBattery:Used DeviceInstances = ['2', '1']
2024-05-12 12:20:57.680982500 INFO:SerialBattery:com.victronenergy.battery.ble_c8478ce457f5
2024-05-12 12:20:57.689133500 INFO:SerialBattery:BAT: JKBMS 10.XW 16 cells (20220904)
2024-05-12 12:20:57.816127500 INFO:SerialBattery:publish config values = True
2024-05-12 12:20:57.901777500 INFO:SerialBattery:Battery Jkbms_Ble connected to dbus from ble_c8478ce457f5
2024-05-12 12:20:57.902652500 INFO:SerialBattery:========== Settings ==========
2024-05-12 12:20:57.910311500 INFO:SerialBattery:> Connection voltage: 54.86 V | Current: -2.2 A | SoC: 98.0%
2024-05-12 12:20:57.911538500 INFO:SerialBattery:> Cell count: 16 | Cells populated: 32
2024-05-12 12:20:57.912726500 INFO:SerialBattery:> LINEAR LIMITATION ENABLE: True
2024-05-12 12:20:57.913940500 INFO:SerialBattery:> MIN CELL VOLTAGE: 2.9 V | MAX CELL VOLTAGE: 3.525 V
2024-05-12 12:20:57.915460500 INFO:SerialBattery:> MAX BATTERY CHARGE CURRENT: 80.0 A | MAX BATTERY DISCHARGE CURRENT: 80.0 A
2024-05-12 12:20:57.918080500 INFO:SerialBattery:> CVCM:     True
2024-05-12 12:20:57.921266500 INFO:SerialBattery:> CCCM CV:  True  | DCCM CV:  True
2024-05-12 12:20:57.923035500 INFO:SerialBattery:> CCCM T:   True  | DCCM T:   True
2024-05-12 12:20:57.931782500 INFO:SerialBattery:> CCCM SOC: False | DCCM SOC: False
2024-05-12 12:20:57.932827500 INFO:SerialBattery:> CHARGE FET: True | DISCHARGE FET: True | BALANCE FET: False
2024-05-12 12:20:57.933638500 INFO:SerialBattery:Serial Number/Unique Identifier: 2042102165
2024-05-12 12:20:58.104551500 INFO:SerialBattery:Monitoring external current using: "com.victronenergy.battery.ttyS6"/"/Dc/0/Current"
2024-05-12 12:20:58.132984500 INFO:dbusmonitor:===== Search on dbus for services that we will monitor starting... =====
2024-05-12 12:20:58.151912500 INFO:dbusmonitor:===== Search on dbus for services that we will monitor finished =====
2024-05-12 12:20:58.319913500 INFO:SerialBattery:SOC initialized from dbus and set to 98.0%
2024-05-12 12:25:01.864048500 *** CCGX booted (0) ***
2024-05-12 12:25:18.312232500 
2024-05-12 12:25:18.312239500 INFO:Bluetooth details
2024-05-12 12:25:19.057011500 Attempting to disconnect from C8:47:8C:E4:57:F5
2024-05-12 12:25:19.057021500 Successful disconnected
2024-05-12 12:25:24.508688500 Device C8:47:8C:E4:57:F5 (public)
2024-05-12 12:25:24.508698500   Alias: JK-B2A24S15P
2024-05-12 12:25:24.508700500   Paired: no
2024-05-12 12:25:24.508702500   Trusted: no
2024-05-12 12:25:24.508703500   Blocked: no
2024-05-12 12:25:24.508704500   Connected: no
2024-05-12 12:25:24.508706500   LegacyPairing: no
2024-05-12 12:25:24.508707500   UUID: Device Information        (0000180a-0000-1000-8000-00805f9b34fb)
2024-05-12 12:25:24.508710500   RSSI: -58
2024-05-12 12:25:24.508712500 
2024-05-12 12:25:36.840747500 INFO:SerialBattery:
2024-05-12 12:25:36.875875500 INFO:SerialBattery:Starting dbus-serialbattery
2024-05-12 12:25:36.884852500 INFO:SerialBattery:Venus OS v3.30
2024-05-12 12:25:36.894312500 INFO:SerialBattery:dbus-serialbattery v1.3.20240510passthrough
2024-05-12 12:25:53.911269500 INFO:SerialBattery:Init of Jkbms_Ble at C8:47:8C:E4:57:F5
2024-05-12 12:25:53.912229500 INFO:SerialBattery:Test of Jkbms_Ble at C8:47:8C:E4:57:F5
2024-05-12 12:25:59.450584500 INFO:SerialBattery:BAT: JKBMS 10.XW 16 cells (20220904)
2024-05-12 12:25:59.457058500 INFO:SerialBattery:Connection established to Jkbms_Ble
2024-05-12 12:26:04.345163500 INFO:SerialBattery:Found existing battery with DeviceInstance = 2
2024-05-12 12:26:05.073374500 INFO:SerialBattery:DeviceInstance = 2
2024-05-12 12:26:05.082577500 INFO:SerialBattery:PID file created successfully: /var/tmp/dbus-serialbattery_2.pid
2024-05-12 12:26:05.085972500 INFO:SerialBattery:Used DeviceInstances = ['2', '1']
2024-05-12 12:26:05.089830500 INFO:SerialBattery:com.victronenergy.battery.ble_c8478ce457f5
2024-05-12 12:26:05.096424500 INFO:SerialBattery:BAT: JKBMS 10.XW 16 cells (20220904)
2024-05-12 12:26:05.195888500 INFO:SerialBattery:publish config values = True
2024-05-12 12:26:05.284300500 INFO:SerialBattery:Battery Jkbms_Ble connected to dbus from ble_c8478ce457f5
2024-05-12 12:26:05.285084500 INFO:SerialBattery:========== Settings ==========
2024-05-12 12:26:05.292175500 INFO:SerialBattery:> Connection voltage: 54.79 V | Current: -1.2 A | SoC: 98.0%
2024-05-12 12:26:05.293165500 INFO:SerialBattery:> Cell count: 16 | Cells populated: 32
2024-05-12 12:26:05.295475500 INFO:SerialBattery:> LINEAR LIMITATION ENABLE: True
2024-05-12 12:26:05.296836500 INFO:SerialBattery:> MIN CELL VOLTAGE: 2.9 V | MAX CELL VOLTAGE: 3.525 V
2024-05-12 12:26:05.297989500 INFO:SerialBattery:> MAX BATTERY CHARGE CURRENT: 80.0 A | MAX BATTERY DISCHARGE CURRENT: 80.0 A
2024-05-12 12:26:05.298936500 INFO:SerialBattery:> CVCM:     True
2024-05-12 12:26:05.299819500 INFO:SerialBattery:> CCCM CV:  True  | DCCM CV:  True
2024-05-12 12:26:05.300710500 INFO:SerialBattery:> CCCM T:   True  | DCCM T:   True
2024-05-12 12:26:05.301426500 INFO:SerialBattery:> CCCM SOC: False | DCCM SOC: False
2024-05-12 12:26:05.302444500 INFO:SerialBattery:> CHARGE FET: True | DISCHARGE FET: True | BALANCE FET: False
2024-05-12 12:26:05.312841500 INFO:SerialBattery:Serial Number/Unique Identifier: 2042102165
2024-05-12 12:26:05.681096500 INFO:SerialBattery:SOC initialized from dbus and set to 98.0%
2024-05-12 12:29:29.829593500 *** CCGX booted (0) ***
2024-05-12 12:29:46.216781500 
2024-05-12 12:29:46.216788500 INFO:Bluetooth details
2024-05-12 12:29:46.623552500 Device C8:47:8C:E4:57:F5 not available
2024-05-12 12:29:52.058663500 Device C8:47:8C:E4:57:F5 (public)
2024-05-12 12:29:52.058673500   Alias: JK-B2A24S15P
2024-05-12 12:29:52.058674500   Paired: no
2024-05-12 12:29:52.058676500   Trusted: no
2024-05-12 12:29:52.058677500   Blocked: no
2024-05-12 12:29:52.058678500   Connected: no
2024-05-12 12:29:52.058680500   LegacyPairing: no
2024-05-12 12:29:52.058681500   RSSI: -50
2024-05-12 12:29:52.060895500 
2024-05-12 12:30:05.190897500 INFO:SerialBattery:
2024-05-12 12:30:05.191636500 INFO:SerialBattery:Starting dbus-serialbattery
2024-05-12 12:30:05.193772500 INFO:SerialBattery:Venus OS v3.30
2024-05-12 12:30:05.194482500 INFO:SerialBattery:dbus-serialbattery v1.3.20240510passthrough
2024-05-12 12:30:22.487896500 INFO:SerialBattery:Init of Jkbms_Ble at C8:47:8C:E4:57:F5
2024-05-12 12:30:22.488940500 INFO:SerialBattery:Test of Jkbms_Ble at C8:47:8C:E4:57:F5
2024-05-12 12:30:24.662344500 WARNING:bleak.backends.bluezdbus.client:Failed to cancel connection (/org/bluez/hci1/dev_C8_47_8C_E4_57_F5): 
2024-05-12 12:30:24.664273500 INFO:SerialBattery:--> asy_connect_and_scrape(): error while connecting to bt: BleakDBusError('org.bluez.Error.Failed', 'Disconnected early') of type <class 'bleak.exc.BleakDBusError'> in /opt/victronenergy/dbus-serialbattery/bms/jkbms_brn.py line #474
2024-05-12 12:30:24.665152500 INFO:SerialBattery:--> asy_connect_and_scrape(): Exit
2024-05-12 12:30:24.679290500 INFO:SerialBattery:Reset of system Bluetooth daemon triggered
2024-05-12 12:30:25.115036500 [CHG] Device C8:47:8C:E4:57:F5 RSSI: -60
2024-05-12 12:30:25.115044500 [CHG] Device C8:47:8C:E4:57:F5 RSSI: -78
2024-05-12 12:30:25.115047500 [CHG] Device C8:47:8C:E4:57:F5 RSSI is nil
2024-05-12 12:30:26.965507500 Starting bluetooth: bluetoothd.
2024-05-12 12:30:27.026494500 INFO:SerialBattery:System Bluetooth daemon should have been restarted
2024-05-12 12:30:34.075489500 INFO:SerialBattery:--> asy_connect_and_scrape(): Exit
2024-05-12 12:30:34.177393500 ERROR:SerialBattery:No BMS found at C8:47:8C:E4:57:F5
2024-05-12 12:30:34.177895500 ERROR:SerialBattery:ERROR >>> No battery connection at Jkbms_Ble
2024-05-12 12:30:34.869209500 
2024-05-12 12:30:34.869601500 INFO:Bluetooth details
2024-05-12 12:30:35.091580500 Device C8:47:8C:E4:57:F5 not available
2024-05-12 12:30:40.422882500 Device C8:47:8C:E4:57:F5 (public)
2024-05-12 12:30:40.422891500   Alias: JK-B2A24S15P
2024-05-12 12:30:40.422893500   Paired: no
2024-05-12 12:30:40.422894500   Trusted: no
2024-05-12 12:30:40.422896500   Blocked: no
2024-05-12 12:30:40.422897500   Connected: no
2024-05-12 12:30:40.422898500   LegacyPairing: no
2024-05-12 12:30:40.422900500   RSSI: -61
2024-05-12 12:30:40.427558500 
2024-05-12 12:30:44.259655500 INFO:SerialBattery:
2024-05-12 12:30:44.271961500 INFO:SerialBattery:Starting dbus-serialbattery
2024-05-12 12:30:44.276358500 INFO:SerialBattery:Venus OS v3.30
2024-05-12 12:30:44.279735500 INFO:SerialBattery:dbus-serialbattery v1.3.20240510passthrough
2024-05-12 12:31:01.182752500 INFO:SerialBattery:Init of Jkbms_Ble at C8:47:8C:E4:57:F5
2024-05-12 12:31:01.183710500 INFO:SerialBattery:Test of Jkbms_Ble at C8:47:8C:E4:57:F5
2024-05-12 12:31:05.697306500 INFO:SerialBattery:BAT: JKBMS 10.XW 16 cells (20220904)
2024-05-12 12:31:05.698714500 INFO:SerialBattery:Connection established to Jkbms_Ble
2024-05-12 12:31:08.823861500 INFO:SerialBattery:Found existing battery with DeviceInstance = 2
2024-05-12 12:31:09.160235500 INFO:SerialBattery:DeviceInstance = 2
2024-05-12 12:31:09.164519500 INFO:SerialBattery:PID file created successfully: /var/tmp/dbus-serialbattery_2.pid
2024-05-12 12:31:09.165837500 INFO:SerialBattery:Used DeviceInstances = ['2', '1']
2024-05-12 12:31:09.167183500 INFO:SerialBattery:com.victronenergy.battery.ble_c8478ce457f5
2024-05-12 12:31:09.169472500 INFO:SerialBattery:BAT: JKBMS 10.XW 16 cells (20220904)
2024-05-12 12:31:09.223038500 INFO:SerialBattery:publish config values = True
2024-05-12 12:31:09.259608500 INFO:SerialBattery:Battery Jkbms_Ble connected to dbus from ble_c8478ce457f5
2024-05-12 12:31:09.260301500 INFO:SerialBattery:========== Settings ==========
2024-05-12 12:31:09.261262500 INFO:SerialBattery:> Connection voltage: 54.7 V | Current: -1.4 A | SoC: 98.0%
2024-05-12 12:31:09.261947500 INFO:SerialBattery:> Cell count: 16 | Cells populated: 32
2024-05-12 12:31:09.262555500 INFO:SerialBattery:> LINEAR LIMITATION ENABLE: True
2024-05-12 12:31:09.263193500 INFO:SerialBattery:> MIN CELL VOLTAGE: 2.9 V | MAX CELL VOLTAGE: 3.525 V
2024-05-12 12:31:09.263815500 INFO:SerialBattery:> MAX BATTERY CHARGE CURRENT: 80.0 A | MAX BATTERY DISCHARGE CURRENT: 80.0 A
2024-05-12 12:31:09.264398500 INFO:SerialBattery:> CVCM:     True
2024-05-12 12:31:09.264976500 INFO:SerialBattery:> CCCM CV:  True  | DCCM CV:  True
2024-05-12 12:31:09.265577500 INFO:SerialBattery:> CCCM T:   True  | DCCM T:   True
2024-05-12 12:31:09.270510500 INFO:SerialBattery:> CCCM SOC: False | DCCM SOC: False
2024-05-12 12:31:09.270519500 INFO:SerialBattery:> CHARGE FET: True | DISCHARGE FET: True | BALANCE FET: False
2024-05-12 12:31:09.270523500 INFO:SerialBattery:Serial Number/Unique Identifier: 2042102165
2024-05-12 12:31:09.292915500 INFO:SerialBattery:SOC initialized from dbus and set to 98.0%
2024-05-12 12:31:09.452265500 INFO:SerialBattery:Monitoring external current using: "com.victronenergy.battery.ttyS6"/"/Dc/0/Current"
2024-05-12 12:31:09.889040500 INFO:dbusmonitor:===== Search on dbus for services that we will monitor starting... =====
2024-05-12 12:31:09.936026500 INFO:dbusmonitor:===== Search on dbus for services that we will monitor finished =====
2024-05-12 12:40:42.819158500 *** CCGX booted (0) ***
2024-05-12 12:40:59.472727500 
2024-05-12 12:40:59.472736500 INFO:Bluetooth details
2024-05-12 12:41:00.274759500 Attempting to disconnect from C8:47:8C:E4:57:F5
2024-05-12 12:41:00.274769500 Successful disconnected
2024-05-12 12:41:05.640878500 Device C8:47:8C:E4:57:F5 (public)
2024-05-12 12:41:05.640888500   Alias: JK-B2A24S15P
2024-05-12 12:41:05.640890500   Paired: no
2024-05-12 12:41:05.640891500   Trusted: no
2024-05-12 12:41:05.640893500   Blocked: no
2024-05-12 12:41:05.640894500   Connected: no
2024-05-12 12:41:05.640895500   LegacyPairing: no
2024-05-12 12:41:05.640897500   UUID: Device Information        (0000180a-0000-1000-8000-00805f9b34fb)
2024-05-12 12:41:05.640900500   RSSI: -58
2024-05-12 12:41:05.640901500 
2024-05-12 12:41:17.925776500 INFO:SerialBattery:
2024-05-12 12:41:17.926559500 INFO:SerialBattery:Starting dbus-serialbattery
2024-05-12 12:41:17.949333500 INFO:SerialBattery:Venus OS v3.30
2024-05-12 12:41:17.950177500 INFO:SerialBattery:dbus-serialbattery v1.3.20240510passthrough
2024-05-12 12:41:34.803513500 INFO:SerialBattery:Init of Jkbms_Ble at C8:47:8C:E4:57:F5
2024-05-12 12:41:34.804242500 INFO:SerialBattery:Test of Jkbms_Ble at C8:47:8C:E4:57:F5
2024-05-12 12:41:40.833648500 INFO:SerialBattery:BAT: JKBMS 10.XW 16 cells (20220904)
2024-05-12 12:41:40.833657500 INFO:SerialBattery:Connection established to Jkbms_Ble
2024-05-12 12:41:45.878569500 INFO:SerialBattery:Found existing battery with DeviceInstance = 2
2024-05-12 12:41:46.633201500 INFO:SerialBattery:DeviceInstance = 2
2024-05-12 12:41:46.635470500 INFO:SerialBattery:PID file created successfully: /var/tmp/dbus-serialbattery_2.pid
2024-05-12 12:41:46.636278500 INFO:SerialBattery:Used DeviceInstances = ['2', '1']
2024-05-12 12:41:46.637506500 INFO:SerialBattery:com.victronenergy.battery.ble_c8478ce457f5
2024-05-12 12:41:46.638643500 INFO:SerialBattery:BAT: JKBMS 10.XW 16 cells (20220904)
2024-05-12 12:41:46.734292500 INFO:SerialBattery:publish config values = True
2024-05-12 12:41:46.824775500 INFO:SerialBattery:Battery Jkbms_Ble connected to dbus from ble_c8478ce457f5
2024-05-12 12:41:46.825509500 INFO:SerialBattery:========== Settings ==========
2024-05-12 12:41:46.826478500 INFO:SerialBattery:> Connection voltage: 55.76 V | Current: -1.0 A | SoC: 98.28%
2024-05-12 12:41:46.832402500 INFO:SerialBattery:> Cell count: 16 | Cells populated: 32
2024-05-12 12:41:46.833229500 INFO:SerialBattery:> LINEAR LIMITATION ENABLE: True
2024-05-12 12:41:46.834158500 INFO:SerialBattery:> MIN CELL VOLTAGE: 2.9 V | MAX CELL VOLTAGE: 3.525 V
2024-05-12 12:41:46.835022500 INFO:SerialBattery:> MAX BATTERY CHARGE CURRENT: 80.0 A | MAX BATTERY DISCHARGE CURRENT: 80.0 A
2024-05-12 12:41:46.835744500 INFO:SerialBattery:> CVCM:     True
2024-05-12 12:41:46.836570500 INFO:SerialBattery:> CCCM CV:  True  | DCCM CV:  True
2024-05-12 12:41:46.858357500 INFO:SerialBattery:> CCCM T:   True  | DCCM T:   True
2024-05-12 12:41:46.858367500 INFO:SerialBattery:> CCCM SOC: False | DCCM SOC: False
2024-05-12 12:41:46.869428500 INFO:SerialBattery:> CHARGE FET: True | DISCHARGE FET: True | BALANCE FET: False
2024-05-12 12:41:46.870513500 INFO:SerialBattery:Serial Number/Unique Identifier: 2042102165
2024-05-12 12:41:46.939468500 INFO:SerialBattery:SOC initialized from dbus and set to 98.28%
2024-05-12 12:41:47.229242500 INFO:SerialBattery:Monitoring external current using: "com.victronenergy.battery.ttyS6"/"/Dc/0/Current"
2024-05-12 12:41:47.714772500 INFO:dbusmonitor:===== Search on dbus for services that we will monitor starting... =====
2024-05-12 12:41:47.738192500 INFO:dbusmonitor:===== Search on dbus for services that we will monitor finished =====
2024-05-12 12:42:01.215876500 [CHG] Device C8:47:8C:E4:57:F5 RSSI: -58
2024-05-12 12:42:01.215885500 [CHG] Device C8:47:8C:E4:57:F5 RSSI: -58
2024-05-12 12:49:10.498029500 INFO:SerialBattery:SOC set to 100%
2024-05-12 12:59:01.721905500 *** CCGX booted (0) ***
2024-05-12 12:59:18.117473500 
2024-05-12 12:59:18.117480500 INFO:Bluetooth details
2024-05-12 12:59:18.725803500 Attempting to disconnect from C8:47:8C:E4:57:F5
2024-05-12 12:59:18.725813500 Successful disconnected
2024-05-12 12:59:24.595387500 Device C8:47:8C:E4:57:F5 (public)
2024-05-12 12:59:24.595396500   Alias: JK-B2A24S15P
2024-05-12 12:59:24.595398500   Paired: no
2024-05-12 12:59:24.595399500   Trusted: no
2024-05-12 12:59:24.595400500   Blocked: no
2024-05-12 12:59:24.595402500   Connected: no
2024-05-12 12:59:24.595403500   LegacyPairing: no
2024-05-12 12:59:24.595405500   UUID: Device Information        (0000180a-0000-1000-8000-00805f9b34fb)
2024-05-12 12:59:24.595408500   RSSI: -58
2024-05-12 12:59:24.597642500 
2024-05-12 12:59:37.074730500 INFO:SerialBattery:
2024-05-12 12:59:37.129549500 INFO:SerialBattery:Starting dbus-serialbattery
2024-05-12 12:59:37.152243500 INFO:SerialBattery:Venus OS v3.30
2024-05-12 12:59:37.153245500 INFO:SerialBattery:dbus-serialbattery v1.3.20240510passthrough
2024-05-12 12:59:54.190087500 INFO:SerialBattery:Init of Jkbms_Ble at C8:47:8C:E4:57:F5
2024-05-12 12:59:54.191789500 INFO:SerialBattery:Test of Jkbms_Ble at C8:47:8C:E4:57:F5
2024-05-12 13:00:00.244097500 INFO:SerialBattery:BAT: JKBMS 10.XW 16 cells (20220904)
2024-05-12 13:00:00.245504500 INFO:SerialBattery:Connection established to Jkbms_Ble
2024-05-12 13:00:04.961105500 INFO:SerialBattery:Found existing battery with DeviceInstance = 2
2024-05-12 13:00:05.750876500 INFO:SerialBattery:DeviceInstance = 2
2024-05-12 13:00:05.752781500 INFO:SerialBattery:PID file created successfully: /var/tmp/dbus-serialbattery_2.pid
2024-05-12 13:00:05.753683500 INFO:SerialBattery:Used DeviceInstances = ['2', '1']
2024-05-12 13:00:05.762734500 INFO:SerialBattery:com.victronenergy.battery.ble_c8478ce457f5
2024-05-12 13:00:05.764171500 INFO:SerialBattery:BAT: JKBMS 10.XW 16 cells (20220904)
2024-05-12 13:00:05.923900500 INFO:SerialBattery:publish config values = True
2024-05-12 13:00:06.013940500 INFO:SerialBattery:Battery Jkbms_Ble connected to dbus from ble_c8478ce457f5
2024-05-12 13:00:06.014829500 INFO:SerialBattery:========== Settings ==========
2024-05-12 13:00:06.015862500 INFO:SerialBattery:> Connection voltage: 55.36 V | Current: -1.0 A | SoC: 100.0%
2024-05-12 13:00:06.016728500 INFO:SerialBattery:> Cell count: 16 | Cells populated: 32
2024-05-12 13:00:06.017563500 INFO:SerialBattery:> LINEAR LIMITATION ENABLE: True
2024-05-12 13:00:06.018465500 INFO:SerialBattery:> MIN CELL VOLTAGE: 2.9 V | MAX CELL VOLTAGE: 3.525 V
2024-05-12 13:00:06.030775500 INFO:SerialBattery:> MAX BATTERY CHARGE CURRENT: 80.0 A | MAX BATTERY DISCHARGE CURRENT: 80.0 A
2024-05-12 13:00:06.031727500 INFO:SerialBattery:> CVCM:     True
2024-05-12 13:00:06.032797500 INFO:SerialBattery:> CCCM CV:  True  | DCCM CV:  True
2024-05-12 13:00:06.033750500 INFO:SerialBattery:> CCCM T:   True  | DCCM T:   True
2024-05-12 13:00:06.038111500 INFO:SerialBattery:> CCCM SOC: False | DCCM SOC: False
2024-05-12 13:00:06.039040500 INFO:SerialBattery:> CHARGE FET: True | DISCHARGE FET: True | BALANCE FET: False
2024-05-12 13:00:06.042592500 INFO:SerialBattery:Serial Number/Unique Identifier: 2042102165
2024-05-12 13:00:06.215420500 INFO:SerialBattery:Monitoring external current using: "com.victronenergy.battery.ttyS6"/"/Dc/0/Current"
2024-05-12 13:00:06.238500500 INFO:dbusmonitor:===== Search on dbus for services that we will monitor starting... =====
2024-05-12 13:00:06.263038500 INFO:dbusmonitor:===== Search on dbus for services that we will monitor finished =====
2024-05-12 13:00:06.526289500 INFO:SerialBattery:SOC initialized from dbus and set to 100.0%

Any other information that may be helpful

WhatsApp Image 2024-05-12 at 14 23 28 vrm

squowse commented 1 month ago

image

mr-manuel commented 1 month ago

Please remove the quotes from EXTERNAL_CURRENT_SENSOR_DBUS_DEVICE and EXTERNAL_CURRENT_SENSOR_DBUS_PATH. I wrongly inserted them in the example.

squowse commented 1 month ago

Thanks. The current display is closer to the Victron Connect App now. The VRM display still rounds to the nearest .1A though. Eg 1.40A compared to 1.46A on the app. Would this be expected?

The rounding doesn't seem particularly consistent eg down, nearest, up. The delay between readings could be confusing this though.

squowse commented 1 month ago
; --------- Externcal current sensor ---------
; Specify the dbus device and path where the external current sensor is connected to
; You can find it by executing the dbus-spy command
; Example for a external current sensor connected to the VE.Bus port:
;     EXTERNAL_CURRENT_SENSOR_DBUS_DEVICE = com.victronenergy.vebus.ttyS3
;     EXTERNAL_CURRENT_SENSOR_DBUS_PATH = /Dc/0/Current
EXTERNAL_CURRENT_SENSOR_DBUS_DEVICE = com.victronenergy.battery.ttyS6 
;smart shunt 1
EXTERNAL_CURRENT_SENSOR_DBUS_PATH = /Dc/0/Current
mr-manuel commented 1 month ago

Please check with the dbus-spy or in the Remote Console/GUI.

squowse commented 1 month ago

The smartshunt current in Remote Console is rounded to 0.1A. The app shows to 0.01A image

squowse commented 1 month ago

dbus-spy also shows current rounded to 0.1A

mr-manuel commented 1 month ago

The rounding is normal, but how much is it delayed?

squowse commented 1 month ago

VRM? Maybe a second or two. Yes I think you are right - although the VE.Direct interface seems to get higher precision current measurements, the Cerbo only processes them at 0.1A. Thanks for your help with this

mr-manuel commented 1 month ago

But is there also a delay in the dbus-spy or Remote Console/GUI? If yes, how much?

squowse commented 1 month ago

No real delay between the app and dbus-spy or remote console. Half a second or less.