Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JBD_BLE battery temperature shown as MOSFET temperature in GUI #971

Closed
AlexdeKairos opened this issue Feb 12, 2024 · 12 comments
Closed

JBD_BLE battery temperature shown as MOSFET temperature in GUI #971

AlexdeKairos opened this issue Feb 12, 2024 · 12 comments
Labels
enhancement New feature or request

Comments

@AlexdeKairos
Copy link

Is your feature request related to a problem? Please describe.

I Can't use new temperature protections functionality due to wrong BMS temperature assignments. Seems that driver detects first temperature sensor as MOSFET temperature but actually many batteries in the market instead of MOSFET NTC, they have just a termoswitch that triggers upon certain temperature. So in those BMSs, the temperature sensor is attached to the cells and not the MOS. My BMS is for instance, JBD DP04S007. Quite common model.

Describe the solution you'd like

Option to select if NTC 1 Correspond to a Cell or MOSFET

Describe alternatives you've considered

No response

Additional context

No response

@AlexdeKairos AlexdeKairos added the enhancement New feature or request label Feb 12, 2024
@mr-manuel
Copy link
Collaborator

Since there are a few BMS that have a different temperature sensor order maybe it would be an idea that there is a default sensor association which you can overwrite in the config file.

@mr-manuel
Copy link
Collaborator

Can you please share a screenshot of the dbus-spy where we can see /System values?

@AlexdeKairos
Copy link
Author

I'm planing to go to my boat tomorrow. I'll capture your requested info. Just as an advance. My jbd bms only has one ntc. And it's only connected to cells. Bms is protected via 2 thermo switch. All bms apps overkill, basengreen, xiaoxiang detects ntc as cell temp. Mos temp, due to switch, is detected as 0°C. Tomorrow will send info

@AlexdeKairos
Copy link
Author

AlexdeKairos commented Feb 24, 2024

Here is my \System

Logs
com.victronenergy.system
Ac/ActiveIn/Frequency                                                                                                        50.1026
Ac/ActiveIn/L1/Current                                                                                                          9.55Ac/ActiveIn/L1/Power                                                                                                            1846
Ac/ActiveIn/L1/Voltage                                                                                                        240.25
Ac/ActiveIn/L2/Current                                                                                                             -Ac/ActiveIn/L2/Power                                                                                                               -
Ac/ActiveIn/L2/Voltage                                                                                                             -
Ac/ActiveIn/L3/Current                                                                                                             -Ac/ActiveIn/L3/Power                                                                                                               -
Ac/ActiveIn/L3/Voltage                                                                                                             -
Ac/ActiveIn/NumberOfPhases                                                                                                         1Ac/ActiveIn/Source                                                                                                                 3
Ac/Consumption/Frequency                                                                                                     49.9488
Ac/Consumption/L1/Current                                                                                                       8.91Ac/Consumption/L1/Power                                                                                                         1720
Ac/Consumption/L1/Voltage                                                                                                     240.25
Ac/Consumption/L2/Current                                                                                                          -Ac/Consumption/L2/Power                                                                                                            -
Ac/Consumption/L2/Voltage                                                                                                          -
Ac/Consumption/L3/Current                                                                                                          -Ac/Consumption/L3/Power                                                                                                            -
Ac/Consumption/L3/Voltage                                                                                                          -
Ac/Consumption/NumberOfPhases                                                                                                      1Ac/ConsumptionOnInput/Frequency                                                                                              50.1026
Ac/ConsumptionOnInput/L1/Current                                                                                                   0
Ac/ConsumptionOnInput/L1/Power                                                                                                     0Ac/ConsumptionOnInput/L1/Voltage                                                                                              240.25
Ac/ConsumptionOnInput/L2/Current                                                                                                   -
Ac/ConsumptionOnInput/L2/Power                                                                                                     -Ac/ConsumptionOnInput/L2/Voltage                                                                                                   -
Ac/ConsumptionOnInput/L3/Current                                                                                                   -
Ac/ConsumptionOnInput/L3/Power                                                                                                     -Ac/ConsumptionOnInput/L3/Voltage                                                                                                   -
Ac/ConsumptionOnInput/NumberOfPhases                                                                                               1
Ac/ConsumptionOnOutput/Frequency                                                                                             49.9488Ac/ConsumptionOnOutput/L1/Current                                                                                               8.91
Ac/ConsumptionOnOutput/L1/Power                                                                                                 1720
Ac/ConsumptionOnOutput/L1/Voltage                                                                                             240.25Ac/ConsumptionOnOutput/L2/Current                                                                                                  -
Ac/ConsumptionOnOutput/L2/Power                                                                                                    -
Ac/ConsumptionOnOutput/L2/Voltage                                                                                                  -
Ac/ConsumptionOnOutput/L3/Current         
                                                                                                                               -
Ac/ConsumptionOnOutput/L3/Power                                                                                                    -
Ac/ConsumptionOnOutput/L3/Voltage                                                                                                  -
Ac/ConsumptionOnOutput/NumberOfPhases                                                                                              1
Ac/Genset/DeviceType                                                                                                               -
Ac/Genset/Frequency                                                                                                                -
Ac/Genset/L1/Current                                                                                                               -
Ac/Genset/L1/Power                                                                                                                 -
Ac/Genset/L1/Voltage                                                                                                               -
Ac/Genset/L2/Current                                                                                                               -
Ac/Genset/L2/Power                                                                                                                 -
Ac/Genset/L2/Voltage                                                                                                               -
Ac/Genset/L3/Current                                                                                                               -
Ac/Genset/L3/Power                                                                                                                 -
Ac/Genset/L3/Voltage                                                                                                               -
Ac/Genset/LastStartTime                                                                                                            -
Ac/Genset/NumberOfPhases                                                                                                           -
Ac/Genset/ProductId                                                                                                                -
Ac/Genset/RunningByConditionCode                                                                                                   -
Ac/Genset/Runtime                                                                                                                  -
Ac/Grid/DeviceType                                                                                                                 -
Ac/Grid/Frequency                                                                                                            50.1026
Ac/Grid/L1/Current                                                                                                              9.55
Ac/Grid/L1/Power                                                                                                                1876
Ac/Grid/L1/Voltage                                                                                                            240.25
Ac/Grid/L2/Current                                                                                                                 -
Ac/Grid/L2/Power                                                                                                                   -
Ac/Grid/L2/Voltage                                                                                                                 -
Ac/Grid/L3/Current                                                                                                                 -
Ac/Grid/L3/Power                                                                                                                   -
Ac/Grid/L3/Voltage                                                                                                                 -
Ac/Grid/NumberOfPhases                                                                                                             1
Ac/Grid/ProductId                                                                                                               9780
Ac/In/0/Connected                                                                                                                  0
Ac/In/0/DeviceInstance                                                                                                           276
Ac/In/0/ServiceName                                                                                    com.victronenergy.vebus.ttyS4
Ac/In/0/ServiceType                                                                                                            vebus
Ac/In/0/Source                                                                                                                     2
Ac/In/0/VrmDeviceInstance                                                                                                        276
Ac/In/1/Connected                                                                                                                  1
Ac/In/1/DeviceInstance                                                                                                           276                                                      Ac/In/NumberOfAcInputs                                                                                                             2
Ac/PvOnGenset/L1/Current                                                                                                           -
Ac/PvOnGenset/L1/Power                                                                                                             -
Ac/PvOnGenset/L2/Current                                                                                                           -
Ac/PvOnGenset/L2/Power                                                                                                             -
Ac/PvOnGenset/L3/Current                                                                                                           -
Ac/PvOnGenset/L3/Power                                                                                                             -
Ac/PvOnGenset/NumberOfPhases                                                                                                       -
Ac/PvOnGrid/L1/Current                                                                                                             -
Ac/PvOnGrid/L1/Power                                                                                                               -
Ac/PvOnGrid/L2/Current                                                                                                             -
Ac/PvOnGrid/L2/Power                                                                                                               -
Ac/PvOnGrid/L3/Current                                                                                                             -
Ac/PvOnGrid/L3/Power                                                                                                               -
Ac/PvOnGrid/NumberOfPhases                                                                                                         -
Ac/PvOnOutput/L1/Current                                                                                                           -
Ac/PvOnOutput/L1/Power                                                                                                             -
Ac/PvOnOutput/L2/Current                                                                                                           -
Ac/PvOnOutput/L2/Power                                                                                                             -
Ac/PvOnOutput/L3/Current                                                                                                           -
Ac/PvOnOutput/L3/Power                                                                                                             -
Ac/PvOnOutput/NumberOfPhases                                                                                                       -
ActiveBatteryService                                                                                     com.victronenergy.battery/3
ActiveBmsService                                                                           com.victronenergy.battery.blea5c2370595b6
AutoSelectedBatteryMeasurement                                                                      com_victronenergy_battery_3/Dc/0
AutoSelectedBatteryService                                                                                                         -
AutoSelectedTemperatureService                                                                                                     -
AvailableBatteries {"com.victronenergy.battery/278": {"name": "Shunt DC", "channel": null, "type": "battery"}, "com.victronenergy.ba
AvailableBatteryMeasurements {'com_victronenergy_battery_1024/Dc/0': Battery Aggregator on dbus,'com_victronenergy_battery_278/Dc/0'
AvailableBatteryServices {"default": "Automatic", "nobattery": "No battery monitor", "com.victronenergy.vebus/276": "Quattro 12/3000
AvailableBmsServices                        [{'instance': 1024,'name': Baterias de Servicio},{'instance': 3,'name': Bateria Serv 2}]
AvailableTemperatureServices {'com.victronenergy.vebus/276/Dc/0/Temperature': Quattro 12/3000/120-2x50 on VE.Bus,'default': Automati
Batteries [{'active_battery_service': 0,'id': com.victronenergy.battery.ttyS6:1,'name': Bateria Arraque,'voltage': 14.41},{'active_b
Buzzer/State                                                                                                                       0
Connected                                                                                                                          1
Control/ActiveSocLimit                                                                                                             -
Control/BatteryCurrentSense                                                                                                        0
Control/BatteryVoltageSense                                                                                                        0
Control/BmsParameters                                                                                                              1
Control/Dvcc                                                                                                                       1
Control/EffectiveChargeVoltage                                                                                                  14.4
Control/ScheduledSoc                                                                                                               -
Control/SolarChargeCurrent                                                                                                         1
Control/SolarChargeVoltage                                                                                                         1
Control/SolarChargerTemperatureSense                                                                                               0
Control/SolarChargerVoltageSense                                                                                                   0
Control/VebusSoc                                                                                                                   1
Dc/Alternator/Power                                                                                                                -
Dc/Battery/Alarms/CircuitBreakerTripped                                                                                            -
Dc/Battery/BatteryService                                                                  com.victronenergy.battery.blea5c2370595b6
Dc/Battery/ConsumedAmphours                                                                                                    199.2
Dc/Battery/Current                                                                                                                13
Dc/Battery/Power                                                                                                              173.81
Dc/Battery/ProductId                                                                                                               0
Dc/Battery/Soc                                                                                                                 70.87
Dc/Battery/State                                                                                                                   1
Dc/Battery/Temperature                                                                                                             -
Dc/Battery/TemperatureService                                                                                                      -
Dc/Battery/TimeToGo                                                                                                            86813
Dc/Battery/Voltage                                                                                                             13.37
Dc/Battery/VoltageService                                                                  com.victronenergy.battery.blea5c2370595b6
Dc/Charger/Power                                                                                                                   -
Dc/FuelCell/Power                                                                                                                  -
Dc/MotorDrive/Power                                                                                                                -
Dc/Pv/Current                                                                                                                      2
Dc/Pv/Power                                                                                                                     26.9
Dc/System/MeasurementType                                                                                                          0
Dc/System/Power                                                                                                              84.3527
Dc/Vebus/Current                                                                                                                  18
Dc/Vebus/Power                                                                                                                   241
Dc/WindGenerator/Power                                                                                                             -
Debug/BatteryOperationalLimits/CurrentOffset                                                                                       0
Debug/BatteryOperationalLimits/SolarVoltageOffset                                                                                  0
Debug/BatteryOperationalLimits/VebusVoltageOffset                                                                                  0
DeviceInstance                                                                                                                     0
Dvcc/Alarms/FirmwareInsufficient                                                                                                   0
Dvcc/Alarms/MultipleBatteries                                                                                                      1
DynamicEss/Active                                                                                                                  0
DynamicEss/Capabilities                                                                                                            1
DynamicEss/ErrorCode                                                                                                               0
DynamicEss/LastScheduledEnd                                                                                                        -
DynamicEss/LastScheduledStart                                                                                                      -
DynamicEss/TargetSoc                                                                                                               -
DynamicEss/LastScheduledStart                                                                                                      -
DynamicEss/TargetSoc                                                                                                               -
FirmwareBuild                                                                                                         20240124050751
FirmwareVersion                                                                                                               201728
GpsService                                                                                                                         -
HardwareVersion                                                                                                                    -
Hub                                                                                                                                1
Mgmt/Connection                                                                                       data from other dbus processes
Mgmt/ProcessName                                                            /opt/victronenergy/dbus-systemcalc-py/dbus_systemcalc.py
Mgmt/ProcessVersion                                                                                                            2.140
ProductId                                                                                                                          -
ProductName                                                                                                                        -
PvInvertersProductIds                                                                                                              -
Relay/0/State                                                                                                                      0
Relay/1/State                                                                                                                      0
Serial                                                                                                                  d4124390d6ca
ServiceMapping/com_victronenergy_battery_1024                                                   com.victronenergy.battery.aggregator
ServiceMapping/com_victronenergy_battery_278                                                         com.victronenergy.battery.ttyS6
ServiceMapping/com_victronenergy_battery_3                                                 com.victronenergy.battery.blea5c2370595b6
ServiceMapping/com_victronenergy_settings_0                                                               com.victronenergy.settings
ServiceMapping/com_victronenergy_solarcharger_277                                               com.victronenergy.solarcharger.ttyS5
ServiceMapping/com_victronenergy_solarcharger_279                                               com.victronenergy.solarcharger.ttyS7
ServiceMapping/com_victronenergy_temperature_20                                         com.victronenergy.temperature.adc_builtin0_8
ServiceMapping/com_victronenergy_temperature_21                                         com.victronenergy.temperature.adc_builtin0_7
ServiceMapping/com_victronenergy_temperature_22                                         com.victronenergy.temperature.adc_builtin0_6
ServiceMapping/com_victronenergy_temperature_23                                         com.victronenergy.temperature.adc_builtin0_5
ServiceMapping/com_victronenergy_vebus_276                                                             com.victronenergy.vebus.ttyS4
ServiceMapping/com_victronenergy_vecan_0                                                                com.victronenergy.vecan.can0
SystemState/BatteryLife                                                                                                            0
SystemState/ChargeDisabled                                                                                                         0
SystemState/DischargeDisabled                                                                                                      0
SystemState/LowSoc                                                                                                                 0
SystemState/SlowCharge                                                                                                             0
SystemState/State                                                                                                                252
SystemState/UserChargeLimited                                                                                                      0
SystemState/UserDischargeLimited                                                                                                   0
SystemType                                                                                                                     Hub-1
Timers/TimeOff                                                                                                                147050
Timers/TimeOnGenerator                                                                                                             0
Timers/TimeOnGrid                                                                                                               8006
Timers/TimeOnInverter                                                                                                           2724
VebusInstance                                                                                                                    276

@AlexdeKairos
Copy link
Author

@mr-manuel jus to let you know that my system config is published as requested...

@mr-manuel
Copy link
Collaborator

Unfortunately we misunderstood each other. I need the /System values of the com.victronenergy.battery.* devices like this:

grafik

@AlexdeKairos
Copy link
Author

AlexdeKairos commented Feb 27, 2024

OK... sorry... @mr-manuel here they are

Logs

com.victronenergy.battery.ble_a5c2370595b6

Alarms/BmsCable                                                                                                                    0
Alarms/CellImbalance                                                                                                               -
Alarms/HighChargeCurrent                                                                                                           0
Alarms/HighChargeTemperature                                                                                                       0
Alarms/HighDischargeCurrent                                                                                                        0
Alarms/HighInternalTemperature                                                                                                     -
Alarms/HighTemperature                                                                                                             0
Alarms/HighVoltage                                                                                                                 0
Alarms/InternalFailure                                                                                                             -
Alarms/LowCellVoltage                                                                                                              -
Alarms/LowChargeTemperature                                                                                                        0
Alarms/LowSoc                                                                                                                      0
Alarms/LowTemperature                                                                                                              0
Alarms/LowVoltage                                                                                                                  0
Balances/Cell1                                                                                                                     0
Balances/Cell2                                                                                                                     0
Balances/Cell3                                                                                                                     0
Balances/Cell4                                                                                                                     0
Balancing                                                                                                                          0
Capacity                                                                                                                      197.75
Connected                                                                                                                          1
ConsumedAmphours                                                                                                              262.25
CurrentAvg                                                                                                                       6.5
CustomName                                                                                                            Bateria Serv 2
Dc/0/Current                                                                                                                    39.5
Dc/0/MidVoltage                                                                                                                    -
Dc/0/MidVoltageDeviation                                                                                                           -
Dc/0/Power                                                                                                                    526.14
Dc/0/Temperature                                                                                                                   -
Dc/0/Voltage                                                                                                                   13.32
DeviceInstance                                                                                                                     3
DeviceName                                                                                                                         -
FirmwareVersion                                                                                                      1.2.20240224dev
HardwareVersion                                                                                                                  2.8
Info/BatteryLowVoltage                                                                                                            12
Info/ChargeLimitation                                                                                     Max Battery Charge Current
Info/ChargeMode                                                                                                   Bulk (Linear Mode)
Info/ChargeModeDebug
Info/Config/AUTO_RESET_SOC                                                                                                         1
Info/Config/BATTERY_CAPACITY                                                                                                      50
Info/Config/BATTERY_CELL_DATA_FORMAT                                                                                               1
Info/Config/BLOCK_ON_DISCONNECT                                                                                                    0

com.victronenergy.battery.ble_a5c2370595b6

Info/Config/BATTERY_CELL_DATA_FORMAT                                                                                               1
Info/Config/BLOCK_ON_DISCONNECT                                                                                                    0
Info/Config/BMS_TYPE                                                                                                               -
Info/Config/CCCM_CV_ENABLE                                                                                                         0
Info/Config/CCCM_SOC_ENABLE                                                                                                        0
Info/Config/CCCM_T_ENABLE                                                                                                          0
Info/Config/CELL_VOLTAGES_WHILE_CHARGING                                                                        [3.61,3.55,3.5,3.45]
Info/Config/CELL_VOLTAGES_WHILE_DISCHARGING                                                                        [2.7,2.8,2.9,3.1]
Info/Config/CELL_VOLTAGE_DIFF_KEEP_MAX_VOLTAGE_TIME_RESTART                                                                    0.013
Info/Config/CELL_VOLTAGE_DIFF_KEEP_MAX_VOLTAGE_UNTIL                                                                            0.01
Info/Config/CELL_VOLTAGE_DIFF_TO_RESET_VOLTAGE_LIMIT                                                                            0.08
Info/Config/CVCM_ENABLE                                                                                                            1
Info/Config/CVL_ICONTROLLER_FACTOR                                                                                               0.2
Info/Config/CVL_ICONTROLLER_MODE                                                                                                   0
Info/Config/DCCM_CV_ENABLE                                                                                                         0
Info/Config/DCCM_SOC_ENABLE                                                                                                        0
Info/Config/DCCM_T_ENABLE                                                                                                          0
Info/Config/DRIVER_VERSION                                                                                           1.2.20240224dev
Info/Config/EXCLUDED_DEVICES                                                                                                       -
Info/Config/FLOAT_CELL_VOLTAGE                                                                                                   3.4
Info/Config/GREENMETER_ADDRESS                                                                                                     1
Info/Config/HELTEC_MODBUS_ADDR                                                                                                   [1]
Info/Config/INVERT_CURRENT_MEASUREMENT                                                                                             1
Info/Config/LINEAR_LIMITATION_ENABLE                                                                                               1
Info/Config/LINEAR_RECALCULATION_EVERY                                                                                           120
Info/Config/LINEAR_RECALCULATION_ON_PERC_CHANGE                                                                                    5
Info/Config/LIPRO_CELL_COUNT                                                                                                      15
Info/Config/LIPRO_END_ADDRESS                                                                                                      4
Info/Config/LIPRO_START_ADDRESS                                                                                                    2
Info/Config/MAX_BATTERY_CHARGE_CURRENT                                                                                           150
Info/Config/MAX_BATTERY_DISCHARGE_CURRENT                                                                                        150
Info/Config/MAX_CELL_VOLTAGE                                                                                                     3.6
Info/Config/MAX_CHARGE_CURRENT_CV                                                                                     [0,7.5,75,150]
Info/Config/MAX_CHARGE_CURRENT_SOC                                                                                   [0,22.5,75,150]
Info/Config/MAX_CHARGE_CURRENT_T                                                     [0,17.4,17.4,55.8,75,150,150,120,0,750,41.85,0]
Info/Config/MAX_DISCHARGE_CURRENT_CV                                                                                   [0,15,75,150]
Info/Config/MAX_DISCHARGE_CURRENT_SOC                                                                               [0,15,30,75,150]
Info/Config/MAX_DISCHARGE_CURRENT_T                                                                           [0,30,45,60,150,150,0]
Info/Config/MAX_VOLTAGE_TIME_SEC                                                                                                 900
Info/Config/MIDPOINT_ENABLE                                                                                                        0
Info/Config/MIN_CELL_VOLTAGE                                                                                                       3
Info/Config/PATH_CONFIG_DEFAULT                                                                                   config.default.ini

com.victronenergy.battery.ble_a5c2370595b6

Info/Config/SOC_CALC_CURRENT_MEASURED_BY_USER                                                                             [-300,300]
Info/Config/SOC_CALC_CURRENT_REPORTED_BY_BMS                                                                              [-300,300]
Info/Config/SOC_LEVEL_TO_RESET_VOLTAGE_LIMIT                                                                                      80
Info/Config/SOC_LOW_ALARM                                                                                                         20
Info/Config/SOC_LOW_WARNING                                                                                                       25
Info/Config/SOC_RESET_AFTER_DAYS                                                                                                   0
Info/Config/SOC_RESET_CURRENT                                                                                                      7
Info/Config/SOC_RESET_TIME                                                                                                        60
Info/Config/SOC_RESET_VOLTAGE                                                                                                   3.65
Info/Config/SOC_WHILE_CHARGING                                                                                        [100,95,90,85]
Info/Config/SOC_WHILE_DISCHARGING                                                                                     [0,5,10,15,20]
Info/Config/TEMPERATURES_WHILE_CHARGING                                                                    [0,2,5,10,15,20,35,40,55]
Info/Config/TEMPERATURES_WHILE_DISCHARGING                                                                     [-20,0,5,10,15,45,55]
Info/Config/TEMP_1_NAME                                                                                                       Temp 1
Info/Config/TEMP_2_NAME                                                                                                     T Celdas
Info/Config/TEMP_3_NAME                                                                                                       Temp 3
Info/Config/TEMP_4_NAME                                                                                                       Temp 4
Info/Config/TEMP_BATTERY                                                                                                           2
Info/Config/TIME_TO_GO_ENABLE                                                                                                      1
Info/Config/TIME_TO_SOC_INC_FROM                                                                                                   0
Info/Config/TIME_TO_SOC_POINTS                                                                                             [30,20,0]
Info/Config/TIME_TO_SOC_RECALCULATE_EVERY                                                                                        180
Info/Config/TIME_TO_SOC_VALUE_TYPE                                                                                                 2
Info/Config/VOLTAGE_DROP                                                                                                           0
Info/Config/custom_config_file_path                                                 /opt/victronenergy/dbus-serialbattery/config.ini
Info/Config/default_config_file_path                                        /opt/victronenergy/dbus-serialbattery/config.default.ini
Info/Config/degree_sign                                                                                                            °
Info/Config/zero_char                                                                                                              0
Info/DischargeLimitation                                                                               Max Battery Discharge Current
Info/MaxChargeCurrent                                                                                                            150
Info/MaxChargeVoltage                                                                                                           14.4
Info/MaxDischargeCurrent                                                                                                         150
InstalledCapacity                                                                                                                460
Io/AllowToBalance                                                                                                                  1
Io/AllowToCharge                                                                                                                   1
Io/AllowToDischarge                                                                                                                1
Io/ForceChargingOff                                                                                                                0
Io/ForceDischargingOff                                                                                                             0
Io/TurnBalancingOff                                                                                                                0
Mgmt/Connection                                                                                                BLE A5:C2:37:05:95:B6
Mgmt/ProcessName                                                                 /opt/victronenergy/dbus-serialbattery/dbushelper.py
Mgmt/ProcessVersion                                                                                                    Python 3.8.14

com.victronenergy.battery.ble_a5c2370595b6

Mgmt/ProcessName                                                                 /opt/victronenergy/dbus-serialbattery/dbushelper.py
Mgmt/ProcessVersion                                                                                                    Python 3.8.14
ProductId                                                                                                                          0
ProductName                                                                                                          DP04S007L4S150A
Serial                                                                                                                  a5c2370595b6
Soc                                                                                                                            54.24
System/MOSTemperature                                                                                                           14.2
System/MaxCellTemperature                                                                                                          -
System/MaxCellVoltage                                                                                                          3.343
System/MaxTemperatureCellId                                                                                                        -
System/MaxVoltageCellId                                                                                                           C3
System/MinCellTemperature                                                                                                          -
System/MinCellVoltage                                                                                                           3.34
System/MinTemperatureCellId                                                                                                        -
System/MinVoltageCellId                                                                                                           C2
System/NrOfCellsPerBattery                                                                                                         4
System/NrOfModulesBlockingCharge                                                                                                   0
System/NrOfModulesBlockingDischarge                                                                                                0
System/NrOfModulesOffline                                                                                                          0
System/NrOfModulesOnline                                                                                                           1
System/Temperature1                                                                                                                -
System/Temperature1Name                                                                                                       Temp 1
System/Temperature2                                                                                                                -
System/Temperature2Name                                                                                                     T Celdas
System/Temperature3                                                                                                                -
System/Temperature3Name                                                                                                       Temp 3
System/Temperature4                                                                                                                -
System/Temperature4Name                                                                                                       Temp 4
TimeToGo                                                                                                                       29450
TimeToSoC/0                                                                                                                        -
TimeToSoC/20                                                                                                                       -
TimeToSoC/30                                                                                                                       -
Voltages/Cell1                                                                                                                 3.341
Voltages/Cell2                                                                                                                  3.34
Voltages/Cell3                                                                                                                 3.343
Voltages/Cell4                                                                                                                 3.341
Voltages/Diff                                                                                                                  0.003
Voltages/Sum                                                                                                                   13.37

mr-manuel added a commit to mr-manuel/venus-os_dbus-serialbattery that referenced this issue Feb 27, 2024
@mr-manuel
Copy link
Collaborator

Could you test v1.2.20240227dev? Option 6 with the latest installer script:

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

bash /tmp/install.sh

If there is only one temperature sensor it is used as battery sensor.

@AlexdeKairos
Copy link
Author

Nice idea. Single temp sensor always on battery cells.
Unfortunately, there is an error and no BLE connection. here logs
2024-02-27 11:18:10.529207500 Device A5:C2:37:05:95:B6 (public)
2024-02-27 11:18:10.529218500 Alias: Bateria Serv 2
2024-02-27 11:18:10.529220500 Paired: no
2024-02-27 11:18:10.529221500 Trusted: no
2024-02-27 11:18:10.529222500 Blocked: no
2024-02-27 11:18:10.529224500 Connected: no
2024-02-27 11:18:10.529225500 LegacyPairing: no
2024-02-27 11:18:10.529227500 UUID: Device Information (0000180a-0000-1000-8000-00805f9b34fb)
2024-02-27 11:18:10.529230500 RSSI: -58
2024-02-27 11:18:10.530128500
2024-02-27 11:18:11.922318500 INFO:SerialBattery:
2024-02-27 11:18:11.923035500 INFO:SerialBattery:Starting dbus-serialbattery
2024-02-27 11:18:11.925089500 INFO:SerialBattery:Venus OS v3.14
2024-02-27 11:18:11.925743500 INFO:SerialBattery:dbus-serialbattery v1.2.20240227dev

==> /data/log/dbus-blebattery.0/current <==
2024-02-27 11:18:17.923959500 INFO:SerialBattery:Init of LltJbd_Ble at A5:C2:37:05:95:9E
2024-02-27 11:18:17.924928500 INFO:SerialBattery:Test of LltJbd_Ble at A5:C2:37:05:95:9E
2024-02-27 11:18:22.937010500 ERROR:SerialBattery:>>> ERROR: Unable to connect with BLE device
2024-02-27 11:18:22.940435500 ERROR:SerialBattery:No BMS found at A5:C2:37:05:95:9E
2024-02-27 11:18:22.941297500 ERROR:SerialBattery:ERROR >>> No battery connection at LltJbd_Ble
2024-02-27 11:18:25.010415500 INFO:SerialBattery:BLE client disconnected
2024-02-27 11:18:25.015829500 ERROR:SerialBattery:BleakClient(): Exception occurred: BleakError('failed to discover services, device disconnected') of type <class 'bleak.exc.BleakError'> in /opt/victronenergy/dbus-serialbattery/bms/lltjbd_ble.py line #101
2024-02-27 11:18:25.344481500
2024-02-27 11:18:25.344904500 INFO:Bluetooth details

@AlexdeKairos
Copy link
Author

On the first restart another error came.

2024-02-27 11:22:57.224888500 INFO:SerialBattery:
2024-02-27 11:22:57.225617500 INFO:SerialBattery:Starting dbus-serialbattery
2024-02-27 11:22:57.227680500 INFO:SerialBattery:Venus OS v3.14
2024-02-27 11:22:57.228388500 INFO:SerialBattery:dbus-serialbattery v1.2.20240227dev
2024-02-27 11:23:02.668509500 [CHG] Device A5:C2:37:05:95:B6 RSSI: -56
2024-02-27 11:23:13.802748500 INFO:SerialBattery:Init of LltJbd_Ble at A5:C2:37:05:95:B6
2024-02-27 11:23:13.803624500 INFO:SerialBattery:Test of LltJbd_Ble at A5:C2:37:05:95:B6
2024-02-27 11:23:19.310874500 ERROR:SerialBattery:Exception occurred: TypeError("unsupported operand type(s) for -: 'NoneType' and 'float'") of type <class 'TypeError'> in /opt/victronenergy/dbus-serialbattery/bms/lltjbd.py line #275
2024-02-27 11:23:19.311937500 ERROR:SerialBattery:No BMS found at A5:C2:37:05:95:B6
2024-02-27 11:23:19.312633500 ERROR:SerialBattery:ERROR >>> No battery connection at LltJbd_Ble
2024-02-27 11:23:19.312968500 #0
2024-02-27 11:23:19.312972500 #1
2024-02-27 11:23:19.312973500 #2
2024-02-27 11:23:19.312974500 #3

@mr-manuel
Copy link
Collaborator

Can you contact me on Discord? Since I don't know which data it outputs exactly I would save much time, when I can connect directly to your system.

mr-manuel added a commit to mr-manuel/venus-os_dbus-serialbattery that referenced this issue Feb 27, 2024
@mr-manuel
Copy link
Collaborator

mr-manuel commented Feb 27, 2024

The problem was fixed with v1.2.20240227dev.

Louisvdw pushed a commit that referenced this issue Feb 28, 2024
* fix Sinowealth not loading
#702

* fix unique identifier function

* enable BMS over config, if disabled by default
Now you can also add more then one BMS for BMS_TYPE

* show battery port in log

* ANT BMS fixes
Fixed that other devices are recognized as ANT BMS

* Sinowealth BMS fixes
Fixed that other devices are recognized as Sinowealth BMS

* improved publish_battery error handling
switched from error count to seconds

* Improve Battery Voltage Handling in Linear Absorption Mode

* Refactor change time() to int(time()) for consistency in max_voltage_start_time and tDiff calculation
* Refactor battery voltage calculations for efficiency and clarity
* Remove penalty_buffer
* Reset max_voltage_start_time wenn we going to bulk(dynamic) mode

* updated changelog

* fix reply processing

* Reduce the big inrush current, if the CVL jumps
from Bulk/Absorbtion to Float
fix #659

* Check returned data lenght for Seplos BMS

Be stricter about the return data we accept, might fix the problem of grid meters accidently being recognized as a Seplos

* Validate current, voltage, capacity and SoC for all BMS
This prevents that a device, which is no BMS, is detected as BMS

* removed double check

* bump version

* fix validation if None

* updated changelog

* proposal to #659 formatted :)

* bugfix proposal to #659

* refactor setting float charge_mode

* fix type error, removed bluetooth cronjob

* updated changelog

* fix rs485 write communication errors by inserting sleeps, add debug print for charge mode and fix crash on write soc failures

* fix write problem on set_soc. also changed the switch charge/discharge function, just in case

* debug msg

* Bluetooth optimizations

* Fixes by @peterohman
#505 (comment)

* fix #712

* fix meaningless time to go values

* fix meaningless time to go values

* Duration of transition to float depends on number of cells

* Float transition - Voltage drop per second

* Update hlpdatabms4s.py

* Validate setting of FLOAT_CELL_VOLTAGE and avoid misconfiguration

* consider utils.LINEAR_RECALCULATION_EVERY to refresh CVL

* cleanup

* consider utils.LINEAR_RECALCULATION_EVERY to refresh CVL

* small refactor, introduced set_cvl_linear function to set CVL only once every LINEAR_RECALCULATION_EVERY seconds

* fix typo

* updated changelog

* remove debug msg

* remove debug msg

* undo debug change

* Daly BMS make auto reset soc configurable

* added debug and error information for CVL

* fix proposal for #733 (#735)

* Added: Tollerance to enter float voltage once the timer is triggered

* Add bulk voltage
Load to bulk voltage every x days to reset the SoC to 100% for some BMS

* JKBMS disable high voltage warning on bulk
reenable after bulk was completed

* fixed error

* disable high voltage warning for all BMS
when charging to bulk voltage

* fix error and change default value
measurementToleranceVariation from 0.025 to 0.5 else in OffGrid mode max voltage is always kept

* Added temperature names to dbus/mqtt

* Use current avg of last 300 cycles for TTG & TTS

* Calculate only positive Time-to-SoC points

* added current average of last 5 minutes

* make CCL and DCL more clear

* fix small error

* bugfix: LLTJBD BMS SOC different in Xiaoxiang app and dbus-serialbattery

* black formatting

* JDB BMS - Control FETs for charge, discharge and disable / enable balancer (#761)

* feature: Allow to control charge / discharge FET
* feature: Allow to enable / disable balancer

* bugfix: Cycle Capacity is in 10 mAh

Fixes SoC with factor 100 * 100% percentage

* JBD BMS show balancer state in GUI page IO (#763)

* Bump version

* Fix typos

* Smaller fixes
- fixes #792 (comment)

* Removed comments from utils.py
This should make more clear that there are no values to change

* Updated changelog

* possible fix for LLT/JBS connection problems
#769
#777

* bugfix: LLT/JBD BMS general packet data size check

* improved reinstall and disable script

* LLT/JBD BMS - Improved error handling and automatical driver restart
in case of error. Should fix:
- #730
- #769
- #777

* Fixed Building wheel for dbus-fast won't finish on weak systems
Fixes #785

* Support for Daly CAN Bus (#169)

* support for Daly CAN Bus
* fix constructor args
* revert port, needs fix
* add can filters
* comment logger

Some changes are still needed to work with the latest version. They will follow in a next PR.

---------

Co-authored-by: Samuel Brucksch <[email protected]>
Co-authored-by: Manuel <[email protected]>

* JKBMS BLE - Introduction of automatic SOC reset (HW Version 11) (#736)

* Introduction of automatic SOC reset for JK BMS (HW Version 11)
* Fixed value mapping
* Rework of the code to make it simpler to use without additional configuration.
Moved execution of SOC reset. It's now executed while changing from "Float" to "Float Transition".
* Implementation of suggested changes
Persist initial BMS OVP and OVPR settings
Make use of max_cell_voltage to calculate trigger value for OVP alert

* Added: Daly CAN and JKBMS CAN

* added CAN bms to installation script
optimized CAN drivers

* smaller fixes

* Trigger JK BLE SOC reset when using Step Mode

* Moved trigger_soc_reset()

* fixes LLT/JBD SOC > 100%
#769

* changed VOLTAGE_DROP behaviour

* Fix JKBMS not starting if BMS manuf. date is empty

* corrected bulk, absorption and soc reset terms

* fix typo

* add JKBMS_BLE debugging data

* fix small error

* Some changes for lost bluetooth connection / hci_uart stack restart

* added logging to config

* add sleep before starting driver
prevents lot of timeouts after reinstalling the driver, since the restart is now much faster than before

* changed post install info

* fix error

* Daly BMS fixed embedded null byte
#837

* added info for SoC reset to default config file

* fix for #716
#716

* fix for #716 and JKBMS model recognition
#716

* optimized logging

* fix JKBMS recognition

* added debugging

* fixes #716
#716

* Bind device instance to unique_identifier
#718

* added data types to battery class
disabled unused variables

* save current charge state
#840

* correct file permissions

* updated changelog

* added periodic saveChargeDetails

* fix some small errors

* fix issue with ruuvi tags
When there are hundreds of unused ruuvi tags in the settings list that where added because thei where nearby the driver does not start correctly. These stale entries are disabled on the driver startup.
The issue was already filed to Victron developers

* CVL with i-controller instead of penaltysum

* cvl_controller: switch to choose PenaltySum or ICOntroller + documentation

* docu enhancement

* Add setting and install logic for usb bluetooth module

* round temperatures

* changed battery disconnect behaviour

* Fixes #891
#891

* updated changelog

* Add bluetooth device note to config.default.ini

* Fix typo in bluetooth note in config.default.ini

* fixed error in new cvl_controller

* fixed float division by zero and code optimization

* Restart MAX_VOLTAGE_TIME_SEC if cell diff > CELL_VOLTAGE_DIFF_KEEP_MAX_VOLTAGE_TIME_RESTART

* Calculation of the SOC based on coloumb-counting (#868)

* Calculation of the SOC in the driver based on coloumb-counting

* soc_calc: add current correction before integration

* soc_calc: correction map for current

* Soc_calc: CorrectionMap, switch to turn on/off correction, selectable initial value

* soc_calc: Bugfix

* soc_calc: Bugfix

* store soc in dbus for restart

* store soc in dbus for restart (formatted)

* store soc in dbus for restart (bugfix)

* save soc_calc only after change > 1.0

* store soc in dbus for restart (bugfix)

* logger does not work this way. do not know why

* writing and reading to dbus works

* Removed options: SOC_CALC_CURRENT_CORRECTION, SOC_CALC_RESET_VALUE_ON_RESTART, SOC_CALC_INIT_VALUE
sort soc_calc alphabetically

* fixed comments

* Updated changelog, small fixes

* Changed: PUBLISH_CONFIG_VALUES from 0/1 to True/False

* Changed: Code optimizations
- Changed some variables to be more clear
- Added comments for easier code understanding

* Calculated SOC: Added two decimals, added BMS SOC for MQTT & Node-RED

* Updated changelog, small fixes

* Changed: PUBLISH_CONFIG_VALUES from 0/1 to True/False

* Changed: Code optimizations
- Changed some variables to be more clear
- Added comments for easier code understanding

* Calculated SOC: Added two decimals, added BMS SOC for MQTT & Node-RED

* Fix #898
#898

* Changed: Fix issue loading settings from dbus

* Added nightly install option
makes it easier for users to pretest fixes

* Changed: more detailed error output when an exception happens

* Possible fix for #912
#912

* Fixes #919
#919

* Changed: Exit script with error, if port excluded
else the serialstarter stops at the dbus-serialbattery

* Fixed some smaller errors

* Updated pre-release workflow

* Fix JK BMS connection restart when bluetooth fails.

This fix installs a new thread to monitor the state of the original
scraping thread.
If scraping thread dies, it verifies that it did not because the
scraping was intentionally stopped by calling stop_scrapping.
When restarting the scrapper, it first calls the bluetooth
reset lambda function that was passed in the class contructor, such that
bluetooth is ready to make a proper connection.

* Fixes #916
#916

* Added Venus OS version to logfile

* Fix #840
#840

* Small code formatting fixes

* Optimized reinstall script. Restart GUI only on changes.

* Display debugging data in GUI when DEBUG enabled

* Install script now shows repositories and version numbers

* Update daly_can.py

Fixing #950 for DalyBMS

* Update jkbms_can.py

Fixing #950 for Jk BMS

* Fix black lint check

* Fixes #970
#970

* Fixed some errors in restoring values from dbus settings

* Moved sleep on start for all BMS

* Update config description

* Reworked a part of the default config

* fix typo in stopping services when reinstalling

* Fix Time-to-SoC and Time-to-Go calculation

* Add changelog info

* Round sum and diff voltage

* Temperature limitation variables where changed

* SoC limitation variables where changed

* Added error messages

* Remove unneeded code

* Reset SoC to 0% if empty

* Add GUIv2 for dbus-serialbattery

* Check free space before installing

* Added new GUIv2 version

* Removed Python 2 compatibility

* Changelog update

* Code cleanup
- Removed: get_temperatures()
- Removed: update_last_seen()

* Bluetooth code optimizations

* Fixed some JKBMS BLE not starting
#819

* Check if packages are already installed before install

* Fixed some SOC calculation errors

* Fixed None SOC on driver start

* Do not show and allow button change when callback is missing for:
- ForceChargingOff
- ForceDischargingOff
- TurnBalancingOff

* Check if a device instance is already used by creating a PID file

* Log and execute SOC reset to 100% or 0% only once

* Update GitHub workflow and issue templates

* Fixed LLT/JBD BMS with only on temperature sensor #791
#971

* Fix warning on reinstall

* Fix missing IO control for JBDBMS #992
#992

* Prepare for removing dev branch

---------

Co-authored-by: ogurevich <[email protected]>
Co-authored-by: Bernd Stahlbock <[email protected]>
Co-authored-by: wollew <[email protected]>
Co-authored-by: Oleg Gurevich <[email protected]>
Co-authored-by: peterohman <[email protected]>
Co-authored-by: Strawder, Paul <[email protected]>
Co-authored-by: Paul Strawder <[email protected]>
Co-authored-by: Samuel Brucksch <[email protected]>
Co-authored-by: Samuel Brucksch <[email protected]>
Co-authored-by: ArendsM <[email protected]>
Co-authored-by: Meik Arends <[email protected]>
Co-authored-by: Marvo2011 <[email protected]>
Co-authored-by: cflenker <[email protected]>
Co-authored-by: cflenker <[email protected]>
Co-authored-by: Cupertino Miranda <[email protected]>
Co-authored-by: Martin Polehla <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants