fl4p / batmon-ha

Add-on for Home Assistant to connect JK, JBD, Daly, ANT, SOK and Supervolt BMS via Bluetooth
MIT License
246 stars 53 forks source link

Enable statistics for JBD entities #232

Open LarryPost1 opened 1 month ago

LarryPost1 commented 1 month ago

Describe the issue here.

Statistics are not available for any JBD entities. Possible to enable stats? https://developers.home-assistant.io/docs/core/entity/sensor#long-term-statistics

Paste log output between BEGIN and END:
BEGIN 
19:29:58 DEBUG [client] Sending PUBLISH (d0, q0, r0, m85), 'b'Epoch_460Ah/soc/total_voltage'', ... (5 bytes)
19:29:58 DEBUG [client] Sending PUBLISH (d0, q0, r0, m86), 'b'Epoch_460Ah/soc/current'', ... (3 bytes)
19:29:58 DEBUG [client] Sending PUBLISH (d0, q0, r0, m87), 'b'Epoch_460Ah/soc/soc_percent'', ... (5 bytes)
19:29:58 DEBUG [client] Sending PUBLISH (d0, q0, r0, m88), 'b'Epoch_460Ah/soc/power'', ... (3 bytes)
19:29:58 DEBUG [client] Sending PUBLISH (d0, q0, r0, m89), 'b'Epoch_460Ah/soc/capacity'', ... (5 bytes)
19:29:58 DEBUG [client] Sending PUBLISH (d0, q0, r0, m90), 'b'Epoch_460Ah/soc/num_cycles'', ... (1 bytes)
19:29:58 DEBUG [client] Sending PUBLISH (d0, q0, r0, m91), 'b'Epoch_460Ah/mosfet_status/capacity_ah'', ... (6 bytes)
19:29:58 DEBUG [client] Sending PUBLISH (d0, q0, r0, m92), 'b'Epoch_460Ah/meter/sample_count'', ... (1 bytes)
19:29:58 DEBUG [client] Sending PUBLISH (d0, q0, r0, m93), 'b'Epoch_460Ah/switch/discharge'', ... (2 bytes)
19:29:58 DEBUG [client] Sending PUBLISH (d0, q0, r0, m94), 'b'Epoch_460Ah/switch/charge'', ... (2 bytes)
19:29:58 INFO [sampling] Epoch 460Ah: BmsSampl(53.7%,U=13.3V,I=0.00A,P=0W,Q=258/480Ah,mos=nan°C)
19:29:58 DEBUG [client] Write Characteristic 0000ff02-0000-1000-8000-00805f9b34fb | /org/bluez/hci0/dev_A4_C1_37_33_9E_AC/service000f/char0014: b'\xdd\xa5\x04\x00\xff\xfcw'
19:29:58 DEBUG [manager] received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_A4_C1_37_33_9E_AC/service000f/char0010): ['org.bluez.GattCharacteristic1', {'Value': <dbus_fast.signature.Variant ('ay', bytearray(b'\xdd\x04\x00\x08\x0c\xfa\x0c\xfc\x0c\xfb\x0c\xf8\xfb\xdfw'))>}, []]
19:29:58 DEBUG [client] Sending PUBLISH (d0, q0, r0, m95), 'b'Epoch_460Ah/cell_voltages/1'', ... (5 bytes)
19:29:58 DEBUG [client] Sending PUBLISH (d0, q0, r0, m96), 'b'Epoch_460Ah/cell_voltages/2'', ... (5 bytes)
19:29:58 DEBUG [client] Sending PUBLISH (d0, q0, r0, m97), 'b'Epoch_460Ah/cell_voltages/3'', ... (5 bytes)
19:29:58 DEBUG [client] Sending PUBLISH (d0, q0, r0, m98), 'b'Epoch_460Ah/cell_voltages/4'', ... (4 bytes)
19:29:58 DEBUG [client] Sending PUBLISH (d0, q0, r0, m99), 'b'Epoch_460Ah/cell_voltages/min'', ... (4 bytes)
19:29:58 DEBUG [client] Sending PUBLISH (d0, q0, r0, m100), 'b'Epoch_460Ah/cell_voltages/min_index'', ... (1 bytes)
19:29:58 DEBUG [client] Sending PUBLISH (d0, q0, r0, m101), 'b'Epoch_460Ah/cell_voltages/max'', ... (5 bytes)
19:29:58 DEBUG [client] Sending PUBLISH (d0, q0, r0, m102), 'b'Epoch_460Ah/cell_voltages/max_index'', ... (1 bytes)
19:29:58 DEBUG [client] Sending PUBLISH (d0, q0, r0, m103), 'b'Epoch_460Ah/cell_voltages/delta'', ... (5 bytes)
19:29:58 DEBUG [client] Sending PUBLISH (d0, q0, r0, m104), 'b'Epoch_460Ah/cell_voltages/average'', ... (5 bytes)
19:29:58 DEBUG [client] Sending PUBLISH (d0, q0, r0, m105), 'b'Epoch_460Ah/cell_voltages/median'', ... (6 bytes)
19:29:58 INFO [sampling] Epoch 460Ah volt=[3322,3324,3323,3320] temp=[21.8, 20.9, 21.0]
19:29:58 INFO [sampling] JbdBt(A4:C1:37:33:9E:AC,Epoch 460Ah) times: connect=0.00s fetch=0.22s
19:30:03 DEBUG [client] Write Characteristic 0000ff02-0000-1000-8000-00805f9b34fb | /org/bluez/hci0/dev_A4_C1_37_33_9E_AC/service000f/char0014: b'\xdd\xa5\x03\x00\xff\xfdw'
19:30:03 DEBUG [manager] received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_A4_C1_37_33_9E_AC/service000f/char0010): ['org.bluez.GattCharacteristic1', {'Value': <dbus_fast.signature.Variant ('ay', bytearray(b'\xdd\x03\x00\x1d\x050\x00\x00d\xab\xbb\x80\x00\x03-U\x00\x00\x00\x00'))>}, []]
19:30:03 DEBUG [manager] received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_A4_C1_37_33_9E_AC/service000f/char0010): ['org.bluez.GattCharacteristic1', {'Value': <dbus_fast.signature.Variant ('ay', bytearray(b'\x00\x00\x816\x03\x04\x03\x0b\x85\x0b|\x0b|\xfa\x80w'))>}, []]
19:30:03 INFO [sampling] JbdBt(A4:C1:37:33:9E:AC,Epoch 460Ah) times: connect=0.00s fetch=0.11s
19:30:08 DEBUG [client] Write Characteristic 0000ff02-0000-1000-8000-00805f9b34fb | /org/bluez/hci0/dev_A4_C1_37_33_9E_AC/service000f/char0014: b'\xdd\xa5\x03\x00\xff\xfdw'
19:30:08 DEBUG [manager] received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_A4_C1_37_33_9E_AC/service000f/char0010): ['org.bluez.GattCharacteristic1', {'Value': <dbus_fast.signature.Variant ('ay', bytearray(b'\xdd\x03\x00\x1d\x050\x00\x00d\xab\xbb\x80\x00\x03-U\x00\x00\x00\x00'))>}, []]
19:30:08 DEBUG [manager] received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_A4_C1_37_33_9E_AC/service000f/char0010): ['org.bluez.GattCharacteristic1', {'Value': <dbus_fast.signature.Variant ('ay', bytearray(b'\x00\x00\x816\x03\x04\x03\x0b\x85\x0b|\x0b}\xfa\x7fw'))>}, []]
19:30:08 DEBUG [client] Sending PUBLISH (d0, q0, r0, m106), 'b'Epoch_460Ah/soc/total_voltage'', ... (5 bytes)
19:30:08 DEBUG [client] Sending PUBLISH (d0, q0, r0, m107), 'b'Epoch_460Ah/soc/current'', ... (3 bytes)
19:30:08 DEBUG [client] Sending PUBLISH (d0, q0, r0, m108), 'b'Epoch_460Ah/soc/soc_percent'', ... (5 bytes)
19:30:08 DEBUG [client] Sending PUBLISH (d0, q0, r0, m109), 'b'Epoch_460Ah/soc/power'', ... (3 bytes)
19:30:08 DEBUG [client] Sending PUBLISH (d0, q0, r0, m110), 'b'Epoch_460Ah/soc/capacity'', ... (5 bytes)
19:30:08 DEBUG [client] Sending PUBLISH (d0, q0, r0, m111), 'b'Epoch_460Ah/soc/num_cycles'', ... (1 bytes)
19:30:08 DEBUG [client] Sending PUBLISH (d0, q0, r0, m112), 'b'Epoch_460Ah/mosfet_status/capacity_ah'', ... (6 bytes)
19:30:08 DEBUG [client] Sending PUBLISH (d0, q0, r0, m113), 'b'Epoch_460Ah/meter/sample_count'', ... (1 bytes)
19:30:08 DEBUG [client] Sending PUBLISH (d0, q0, r0, m114), 'b'Epoch_460Ah/switch/discharge'', ... (2 bytes)
19:30:08 DEBUG [client] Sending PUBLISH (d0, q0, r0, m115), 'b'Epoch_460Ah/switch/charge'', ... (2 bytes)
19:30:08 INFO [sampling] Epoch 460Ah: BmsSampl(53.7%,U=13.3V,I=0.00A,P=0W,Q=258/480Ah,mos=nan°C)
19:30:08 DEBUG [client] Write Characteristic 0000ff02-0000-1000-8000-00805f9b34fb | /org/bluez/hci0/dev_A4_C1_37_33_9E_AC/service000f/char0014: b'\xdd\xa5\x04\x00\xff\xfcw'
19:30:08 DEBUG [manager] received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_A4_C1_37_33_9E_AC/service000f/char0010): ['org.bluez.GattCharacteristic1', {'Value': <dbus_fast.signature.Variant ('ay', bytearray(b'\xdd\x04\x00\x08\x0c\xfa\x0c\xfc\x0c\xfb\x0c\xf8\xfb\xdfw'))>}, []]
19:30:08 DEBUG [client] Sending PUBLISH (d0, q0, r0, m116), 'b'Epoch_460Ah/cell_voltages/1'', ... (5 bytes)
19:30:08 DEBUG [client] Sending PUBLISH (d0, q0, r0, m117), 'b'Epoch_460Ah/cell_voltages/2'', ... (5 bytes)
19:30:08 DEBUG [client] Sending PUBLISH (d0, q0, r0, m118), 'b'Epoch_460Ah/cell_voltages/3'', ... (5 bytes)
19:30:08 DEBUG [client] Sending PUBLISH (d0, q0, r0, m119), 'b'Epoch_460Ah/cell_voltages/4'', ... (4 bytes)
19:30:09 DEBUG [client] Sending PUBLISH (d0, q0, r0, m120), 'b'Epoch_460Ah/cell_voltages/min'', ... (4 bytes)
19:30:09 DEBUG [client] Sending PUBLISH (d0, q0, r0, m121), 'b'Epoch_460Ah/cell_voltages/min_index'', ... (1 bytes)
19:30:09 DEBUG [client] Sending PUBLISH (d0, q0, r0, m122), 'b'Epoch_460Ah/cell_voltages/max'', ... (5 bytes)
19:30:09 DEBUG [client] Sending PUBLISH (d0, q0, r0, m123), 'b'Epoch_460Ah/cell_voltages/max_index'', ... (1 bytes)
19:30:09 DEBUG [client] Sending PUBLISH (d0, q0, r0, m124), 'b'Epoch_460Ah/cell_voltages/delta'', ... (5 bytes)
19:30:09 DEBUG [client] Sending PUBLISH (d0, q0, r0, m125), 'b'Epoch_460Ah/cell_voltages/average'', ... (5 bytes)
19:30:09 DEBUG [client] Sending PUBLISH (d0, q0, r0, m126), 'b'Epoch_460Ah/cell_voltages/median'', ... (6 bytes)
19:30:09 DEBUG [client] Sending PUBLISH (d0, q0, r0, m127), 'b'Epoch_460Ah/temperatures/1'', ... (4 bytes)
19:30:09 DEBUG [client] Sending PUBLISH (d0, q0, r0, m128), 'b'Epoch_460Ah/temperatures/2'', ... (4 bytes)
19:30:09 DEBUG [client] Sending PUBLISH (d0, q0, r0, m129), 'b'Epoch_460Ah/temperatures/3'', ... (4 bytes)
19:30:09 INFO [sampling] Epoch 460Ah volt=[3322,3324,3323,3320] temp=[21.8, 20.9, 21.0]
19:30:09 DEBUG [client] Sending PUBLISH (d0, q0, r0, m130), 'b'Epoch_460Ah/meter/total_charge'', ... (7 bytes)
19:30:09 DEBUG [client] Sending PUBLISH (d0, q0, r0, m131), 'b'Epoch_460Ah/meter/total_energy'', ... (5 bytes)
19:30:09 DEBUG [client] Sending PUBLISH (d0, q0, r0, m132), 'b'Epoch_460Ah/meter/total_energy_discharge'', ... (5 bytes)
19:30:09 DEBUG [client] Sending PUBLISH (d0, q0, r0, m133), 'b'Epoch_460Ah/meter/total_energy_charge'', ... (5 bytes)
19:30:09 DEBUG [client] Sending PUBLISH (d0, q0, r0, m134), 'b'Epoch_460Ah/meter/total_cycles'', ... (5 bytes)
19:30:09 DEBUG [client] Sending PUBLISH (d0, q0, r0, m135), 'b'Epoch_460Ah/meter/total_abs_diff_charge'', ... (7 bytes)
19:30:09 INFO [sampling] JbdBt(A4:C1:37:33:9E:AC,Epoch 460Ah) times: connect=0.00s fetch=0.23s
19:30:14 DEBUG [client] Write Characteristic 0000ff02-0000-1000-8000-00805f9b34fb | /org/bluez/hci0/dev_A4_C1_37_33_9E_AC/service000f/char0014: b'\xdd\xa5\x03\x00\xff\xfdw'
19:30:14 DEBUG [manager] received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_A4_C1_37_33_9E_AC/service000f/char0010): ['org.bluez.GattCharacteristic1', {'Value': <dbus_fast.signature.Variant ('ay', bytearray(b'\xdd\x03\x00\x1d\x050\x00\x00d\xab\xbb\x80\x00\x03-U\x00\x00\x00\x00'))>}, []]
19:30:14 DEBUG [manager] received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_A4_C1_37_33_9E_AC/service000f/char0010): ['org.bluez.GattCharacteristic1', {'Value': <dbus_fast.signature.Variant ('ay', bytearray(b'\x00\x00\x816\x03\x04\x03\x0b\x85\x0b|\x0b|\xfa\x80w'))>}, []]
19:30:14 INFO [sampling] JbdBt(A4:C1:37:33:9E:AC,Epoch 460Ah) times: connect=0.00s fetch=0.15s
19:30:19 DEBUG [client] Write Characteristic 0000ff02-0000-1000-8000-00805f9b34fb | /org/bluez/hci0/dev_A4_C1_37_33_9E_AC/service000f/char0014: b'\xdd\xa5\x03\x00\xff\xfdw'
19:30:19 DEBUG [manager] received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_A4_C1_37_33_9E_AC/service000f/char0010): ['org.bluez.GattCharacteristic1', {'Value': <dbus_fast.signature.Variant ('ay', bytearray(b'\xdd\x03\x00\x1d\x050\x00\x00d\xab\xbb\x80\x00\x03-U\x00\x00\x00\x00'))>}, []]
19:30:19 DEBUG [manager] received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_A4_C1_37_33_9E_AC/service000f/char0010): ['org.bluez.GattCharacteristic1', {'Value': <dbus_fast.signature.Variant ('ay', bytearray(b'\x00\x00\x816\x03\x04\x03\x0b\x85\x0b|\x0b}\xfa\x7fw'))>}, []]
19:30:19 DEBUG [client] Sending PUBLISH (d0, q0, r0, m136), 'b'Epoch_460Ah/soc/total_voltage'', ... (5 bytes)
19:30:19 DEBUG [client] Sending PUBLISH (d0, q0, r0, m137), 'b'Epoch_460Ah/soc/current'', ... (3 bytes)
19:30:19 DEBUG [client] Sending PUBLISH (d0, q0, r0, m138), 'b'Epoch_460Ah/soc/soc_percent'', ... (5 bytes)
19:30:19 DEBUG [client] Sending PUBLISH (d0, q0, r0, m139), 'b'Epoch_460Ah/soc/power'', ... (3 bytes)
19:30:19 DEBUG [client] Sending PUBLISH (d0, q0, r0, m140), 'b'Epoch_460Ah/soc/capacity'', ... (5 bytes)
19:30:19 DEBUG [client] Sending PUBLISH (d0, q0, r0, m141), 'b'Epoch_460Ah/soc/num_cycles'', ... (1 bytes)
19:30:19 DEBUG [client] Sending PUBLISH (d0, q0, r0, m142), 'b'Epoch_460Ah/mosfet_status/capacity_ah'', ... (6 bytes)
19:30:19 DEBUG [client] Sending PUBLISH (d0, q0, r0, m143), 'b'Epoch_460Ah/meter/sample_count'', ... (2 bytes)
19:30:19 DEBUG [client] Sending PUBLISH (d0, q0, r0, m144), 'b'Epoch_460Ah/switch/discharge'', ... (2 bytes)
19:30:19 DEBUG [client] Sending PUBLISH (d0, q0, r0, m145), 'b'Epoch_460Ah/switch/charge'', ... (2 bytes)
19:30:19 INFO [sampling] Epoch 460Ah: BmsSampl(53.7%,U=13.3V,I=0.00A,P=0W,Q=258/480Ah,mos=nan°C)
19:30:19 DEBUG [client] Write Characteristic 0000ff02-0000-1000-8000-00805f9b34fb | /org/bluez/hci0/dev_A4_C1_37_33_9E_AC/service000f/char0014: b'\xdd\xa5\x04\x00\xff\xfcw'
19:30:19 DEBUG [manager] received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_A4_C1_37_33_9E_AC/service000f/char0010): ['org.bluez.GattCharacteristic1', {'Value': <dbus_fast.signature.Variant ('ay', bytearray(b'\xdd\x04\x00\x08\x0c\xfa\x0c\xfc\x0c\xfb\x0c\xf8\xfb\xdfw'))>}, []]
19:30:19 DEBUG [client] Sending PUBLISH (d0, q0, r0, m146), 'b'Epoch_460Ah/cell_voltages/1'', ... (5 bytes)
19:30:19 DEBUG [client] Sending PUBLISH (d0, q0, r0, m147), 'b'Epoch_460Ah/cell_voltages/2'', ... (5 bytes)
19:30:19 DEBUG [client] Sending PUBLISH (d0, q0, r0, m148), 'b'Epoch_460Ah/cell_voltages/3'', ... (5 bytes)
19:30:19 DEBUG [client] Sending PUBLISH (d0, q0, r0, m149), 'b'Epoch_460Ah/cell_voltages/4'', ... (4 bytes)
19:30:19 DEBUG [client] Sending PUBLISH (d0, q0, r0, m150), 'b'Epoch_460Ah/cell_voltages/min'', ... (4 bytes)
19:30:19 DEBUG [client] Sending PUBLISH (d0, q0, r0, m151), 'b'Epoch_460Ah/cell_voltages/min_index'', ... (1 bytes)
19:30:19 DEBUG [client] Sending PUBLISH (d0, q0, r0, m152), 'b'Epoch_460Ah/cell_voltages/max'', ... (5 bytes)
19:30:19 DEBUG [client] Sending PUBLISH (d0, q0, r0, m153), 'b'Epoch_460Ah/cell_voltages/max_index'', ... (1 bytes)
19:30:19 DEBUG [client] Sending PUBLISH (d0, q0, r0, m154), 'b'Epoch_460Ah/cell_voltages/delta'', ... (5 bytes)
19:30:19 DEBUG [client] Sending PUBLISH (d0, q0, r0, m155), 'b'Epoch_460Ah/cell_voltages/average'', ... (5 bytes)
19:30:19 DEBUG [client] Sending PUBLISH (d0, q0, r0, m156), 'b'Epoch_460Ah/cell_voltages/median'', ... (6 bytes)
19:30:19 INFO [sampling] Epoch 460Ah volt=[3322,3324,3323,3320] temp=[21.8, 20.9, 21.0]
19:30:19 INFO [sampling] JbdBt(A4:C1:37:33:9E:AC,Epoch 460Ah) times: connect=0.00s fetch=0.23s
END