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

Support for Seplos v2 BMS #101

Closed
4 tasks done
andreas-bulling opened this issue Nov 28, 2024 · 134 comments · Fixed by #115
Closed
4 tasks done

Support for Seplos v2 BMS #101

andreas-bulling opened this issue Nov 28, 2024 · 134 comments · Fixed by #115
Assignees
Labels
enhancement New feature or request

Comments

@andreas-bulling
Copy link

andreas-bulling commented Nov 28, 2024

Checklist

  • I have filled out the template to the best of my ability.
  • I have understood that this integration is only about battery management systems with Bluetooth Low Energy support.
  • This only contains 1 feature request (if you have multiple feature requests, open one feature request for each feature request).
  • This issue is not a duplicate of any previous feature requests.

Please describe the enhancement you would like to have.

It'd be great to support the v2 of the Seplos BMS (10E). The BMS is already detected correctly using the current version of this integration but a connection is not possible.

Additional context

https://drive.google.com/drive/folders/10pxgNLHovcDZRVGrCZsSkfecBrRw-AdW

@patman15
Copy link
Owner

Hi @andreas-bulling, I need a bit more information to add the support:

  • Did you rename the batteries to BP00 and BP01 or is this a default name given by the BT module?
  • Can you please connect to the battery using nRF connect? When connected, swipe to the right and please provide me the log.
  • Are you able to capture the BT traffic while running the app?

adding log of wrong detection: detect_log.txt

@patman15 patman15 self-assigned this Nov 30, 2024
@patman15 patman15 mentioned this issue Nov 30, 2024
4 tasks
@riogrande75
Copy link

I'm interrested in a seplos v2 support, too.
Seplos bms' can be interconnected - then the main (master) bms where the can/rs485 cable is connected to presents itself as BLE device BP00, slave 1 as BP01 and so on.

I posted some of my findings already here
This should actually show howto connect to the seplos and query cell data.
Protocol description attached.
Seplos.bluetooth.protocol.2.pdf

Off course I can also create a trace, if this will help.

@patman15
Copy link
Owner

patman15 commented Dec 1, 2024

Hi! A trace is always helpful. Before that, could you please provide the output of bluetoothctl info <MAC> and the service explorer script. That would be needed to do the first version. Thanks!

@riogrande75
Copy link

Attached requested trace:
Connect to BP00 with official app. It detects that it's a "multi" setup with 3 devices. Then I connected inside the app to BP00 and checked voltages of all batteries (Device detail), then BP01, device detail again and at last to BP02, Device detail.
So in fact, the voltages of 3x16 batteries should be visible in the trace.

MAC's here:

[NEW] Device 60:6E:41:26:E8:6A BP00
[NEW] Device 60:6E:41:16:72:CD BP01
[NEW] Device 60:6E:41:18:1E:29 BP02

btsnooz_hci.7z.txt

@patman15
Copy link
Owner

patman15 commented Dec 1, 2024

Thanks, but the file is corrupt and I do not need the MAC addresses but the output of bluetoothctl info <MAC> where <MAC> is the MAC address of your device(s).

@riogrande75
Copy link

riogrande75 commented Dec 1, 2024

In fact it's not corrupt but a different/new format of a snoop trace from a galaxy s24. I'll try to find an old phone to collect traces that can be directly used in wireshark.
Renmove .txt and then you should be able to unzip btsnooz_hci.log from that 7zip archive.

@riogrande75
Copy link

riogrande75 commented Dec 1, 2024

This trace includes scenario with BP00 and BP02 in classic btsnoop_hci.log format.
btsnoop_hci.7z.txt
BP00+BP02info.txt

@patman15
Copy link
Owner

patman15 commented Dec 1, 2024

Perfect, that format I can read with Wireshark. Thanks a lot. Will have a look soon.

@andreas-bulling
Copy link
Author

Thanks a lot for your help @riogrande75
I couldn't have provided the necessary information.

Thanks @patman15 for looking into this - would be fantastic to see this BMS, which is rather popular in the DIY community, supported.

@ebagnoli
Copy link

ebagnoli commented Dec 2, 2024

Hi all and thanks for the wonderful job:
I have the following situation: A battery with seplos 2.0 BMS and a JK active balancer. I installed your application, the esp32 Proxy, everithing went fine and I have a contact with the JK balancer. He also finds BP00, but it can't initialise.

here something from the debug file:

2024-12-02 19:58:41.112 DEBUG (MainThread) [custom_components.bms_ble] Initializing coordinator for BP00 (60:6E:41:26:E9:61) as Jiabaida Smart BMS
2024-12-02 19:58:41.112 DEBUG (MainThread) [custom_components.bms_ble] device data: {'name': 'BP00', 'address': '60:6E:41:26:E9:61', 'rssi': -106, 'manufacturer_data': {}, 'service_data': {}, 'service_uuids': ['0000ff00-0000-1000-8000-00805f9b34fb'], 'source': 'FC:B4:67:F4:7F:C8', 'advertisement': AdvertisementData(local_name='BP00', service_uuids=['0000ff00-0000-1000-8000-00805f9b34fb'], tx_power=-127, rssi=-106), 'device': BLEDevice(60:6E:41:26:E9:61, BP00), 'connectable': True, 'time': 105180.364329908, 'tx_power': None}
2024-12-02 19:58:41.113 DEBUG (MainThread) [custom_components.bms_ble] BP00: BMS data update
2024-12-02 19:58:41.114 DEBUG (MainThread) [custom_components.bms_ble.plugins.jbd_bms] Connecting BMS (BP00)
2024-12-02 19:58:41.117 DEBUG (MainThread) [bleak_retry_connector] 60:6E:41:26:E9:61 - 60:6E:41:26:E9:61: Connection attempt: 1
2024-12-02 19:58:41.163 ERROR (Thread-10 (_thread_main)) [tuya_iot] Unexpected disconnection.7
2024-12-02 19:58:41.407 DEBUG (MainThread) [custom_components.bms_ble.plugins.jikong_bms] (JK_B2A16S) Rx BLE data (start): bytearray(b'U\xaa\xeb\x90\x02\x95\xa7\x0c\xa7\x0c\xa6\x0c\xa6\x0c\xa0\x0c\xa0\x0c\xa3\x0c\xa2\x0c\xa6\x0c\xa7\x0c\xa7\x0c\xa7\x0c\xa5\x0c\xa2\x0c\xa3\x0c\xa6\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xa5\x0c\x05\x00\x00\x043\x003\x007\x008\x009\x00B\x00E\x00L\x00P\x00>\x00:\x00:\x00C\x00?\x003\x00I\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
2024-12-02 19:58:41.408 DEBUG (MainThread) [custom_components.bms_ble.plugins.jikong_bms] (JK_B2A16S) Rx BLE data (cnt.): bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
home-assistant_bms_ble_2024-12-02T18-58-46.488Z.log

@patman15
Copy link
Owner

patman15 commented Dec 2, 2024

@ebagnoli the Seplos V2 is not yet supported, I still need to do the implementation.

@ebagnoli
Copy link

ebagnoli commented Dec 3, 2024

Thank for your replay. Is It something i can do tò help you in this implementation?

@ebagnoli
Copy link

ebagnoli commented Dec 3, 2024

@ebagnoli the Seplos V2 is not yet supported, I still need to do the implementation.

If this can help you I installed nrf connect and thi is the log

00001800-0000-1000-8000-00805f9b34fb
nRF Connect, 2024-12-03
BP00 (60:6E:41:26:E9:61)
V 10:55:51.216 Connecting to 60:6E:41:26:E9:61...
D 10:55:51.216 gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferred PHY = LE 1M)
D 10:55:51.657 [Callback] Connection state changed with status: 0 and new state: CONNECTED (2)
I 10:55:51.657 Connected to 60:6E:41:26:E9:61
V 10:55:51.677 Discovering services...
D 10:55:51.677 gatt.discoverServices()
D 10:55:51.689 [Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
I 10:55:51.954 Connection parameters updated (interval: 7.5ms, latency: 0, timeout: 5000ms)
D 10:55:52.167 [Callback] Services discovered with status: 0
I 10:55:52.167 Services discovered
V 10:55:52.177 Generic Attribute (0x1801)

  • Service Changed [B I N R SW W] (0x2A05)
    Generic Access (0x1800)
  • Device Name [R] (0x2A00)
  • Appearance [R] (0x2A01)
  • Peripheral Privacy Flag [R] (0x2A02)
  • Peripheral Preferred Connection Parameters [R] (0x2A04)
  • Central Address Resolution [R] (0x2AA6)
    Unknown Service (0000ff00-0000-1000-8000-00805f9b34fb)
  • Unknown Characteristic [N] (0000ff01-0000-1000-8000-00805f9b34fb)
    Client Characteristic Configuration (0x2902)
  • Unknown Characteristic [W WNR] (0000ff02-0000-1000-8000-00805f9b34fb)
  • Unknown Characteristic [N W WNR] (0000ff03-0000-1000-8000-00805f9b34fb)
    Client Characteristic Configuration (0x2902)
  • Unknown Characteristic [N R W WNR] (0000ff04-0000-1000-8000-00805f9b34fb)
    Client Characteristic Configuration (0x2902)
    D 10:55:52.177 gatt.setCharacteristicNotification(0000ff01-0000-1000-8000-00805f9b34fb, true)
    D 10:55:52.180 gatt.setCharacteristicNotification(0000ff03-0000-1000-8000-00805f9b34fb, true)
    D 10:55:52.183 gatt.setCharacteristicNotification(0000ff04-0000-1000-8000-00805f9b34fb, true)
    I 10:55:52.219 Connection parameters updated (interval: 11.25ms, latency: 0, timeout: 4000ms)

@riogrande75
Copy link

If you have a first test version ready, feel free to contact me. I'm already curious and I guess I would be able to deliver useful diagnostic data too.

@patman15
Copy link
Owner

patman15 commented Dec 4, 2024

With some time on the weekend it should be pretty straightforward. Just give me a bit of time. There have been a lot of requests lately.

@patman15
Copy link
Owner

patman15 commented Dec 7, 2024

Just pushed the first version. The protocol description is a bit weak, so I had to make some assumption from the V3 logic. @riogrande75, @ebagnoli, @andreas-bulling if some of you could test and provide me feedback with an attached debug log that would be very helpful. Thanks!

@riogrande75
Copy link

@patman15 Thx for adressing this bms' too.

I just gave it a shot, BP0x get detected but fail after adding them:
grafik
Logfile attached.
home-assistant_bms_ble_2024-12-08T06-38-31.625Z.log.7z.txt

@patman15
Copy link
Owner

patman15 commented Dec 8, 2024

Seems that you already had (some) entries for the BMSs. Can you please delete all devices, restart and try again. It still detects JBD version although it shouldn't according to the code.

@ebagnoli
Copy link

ebagnoli commented Dec 8, 2024

Hi, I am out of my installation for one week, Aboard, I will. Do all the testing starting from December 16. Thanks a lot for your work

@andreas-bulling
Copy link
Author

Will do - but I first have to figure out an efficient way of downloading all necessary files to custom_components...

@riogrande75
Copy link

Did what you said, but after removing all BMS' and restarting HA, same result.
BP01 gets detected as Jiabaida BMS:

2024-12-08 12:16:19.738 DEBUG (MainThread) [custom_components.bms_ble] confirm step for BP01
2024-12-08 12:16:19.738 DEBUG (MainThread) [custom_components.bms_ble] Setup of
2024-12-08 12:16:19.739 DEBUG (MainThread) [custom_components.bms_ble] Initializing coordinator for BP01 (60:6E:41:16:72:CD) as Jiabaida Smart BMS

History:
11:56 restart
12:01 JK-BMS-B added (JK)
12:02 JK-BMS-A added (JK)
12:03 48V_Block added (JBD)
12:16 BP01 added (SeplosV2) - failed

Logs attached.
home-assistant_bms_ble_2024-12-08T11-19-10.618Z.log.7z.txt

@andreas-bulling
Copy link
Author

For me it says the following

image

@riogrande75
Copy link

Give it some time.
For some reason my seplos' get detected much later (~15min). My JK and JBD bms are found right after ha's start.

@andreas-bulling
Copy link
Author

Will do. So far no luck. With the old version (without Seplos v2 support) BL00 and BL01 were detected right away, though...

@patman15
Copy link
Owner

patman15 commented Dec 8, 2024

@riogrande75 are you sure, you really replaced all files in the folder /custom_components/bms_ble and subfolders? I just tried it in my test environment and it immediately changed the detection to Seplos_v2. In your last log BP00 does not even appear. Are you using a BT proxy? If so, please disable (for the test) all other BMS (except the BP00) to avoid running into the 3 device limit ...

@patman15
Copy link
Owner

patman15 commented Dec 8, 2024

Will do. So far no luck. With the old version (without Seplos v2 support) BL00 and BL01 were detected right away, though...

Sure you replaced all files (see above) and restarted? Can you provide a log? As mentioned I tried it in my test setup, it should work.

@patman15
Copy link
Owner

Yes I have, but at BT00 there Is not the seploss, but the jk balancer again with 12 entities

@ebagnoli not fully sure what you mean, but try deleting both devices and let them be rediscovered.

@patman15
Copy link
Owner

@patman15 I feel so stupid. Your mentioning of the "ignored or disabled integration" was exactly the hint that I needed.

@andreas-bulling No worries, great that it works now!

BP01 has not reoccurred so far however. @riogrande75 Do you see BP00, BP01, and BP02 separately?

I disabled all devices but BP00 because I still think, I can query everything via BP00. If that turns out to be wrong, I will need to re-enable the others.

And would it not make sense to report the individual cell voltages not as an attribute but as separate entities?

Please see the FAQ!

@patman15
Copy link
Owner

It almost works as expected now. However, there still seems to be an issue with the cell voltages.

@jambo1980 I just pushed a potential fix. Unfortunately, without having a device, I cannot verify. Could you (or anyone else with more than 1 battery) check and provide me a debug log? Thanks!

@jambo1980
Copy link

jambo1980 commented Dec 17, 2024

I updated the seplos_v2_bms.py and restarted HA, but I still get identical cell voltages for all 3 batteries. That's the debug log of an update:

2024-12-17 12:56:11.152 DEBUG (MainThread) [custom_components.bms_ble] BP00: BMS data update
2024-12-17 12:56:11.153 DEBUG (MainThread) [custom_components.bms_ble.plugins.seplos_v2_bms] BMS BP00 already connected
2024-12-17 12:56:11.517 DEBUG (MainThread) [custom_components.bms_ble.plugins.seplos_v2_bms] BP00: RX BLE data (start): bytearray(b'~\x14\x00Q\x00\x00$CAN:Victron      ')
2024-12-17 12:56:11.517 DEBUG (MainThread) [custom_components.bms_ble.plugins.seplos_v2_bms] BP00: RX BLE data (cnt.): bytearray(b'   1101-SP76 \x10\x06\x03\x01F\x02\x80\xc6\r')
2024-12-17 12:56:11.518 DEBUG (MainThread) [custom_components.bms_ble.plugins.seplos_v2_bms] BP00: address: 0x0, function: 0x51, return: 0x0
2024-12-17 12:56:11.924 DEBUG (MainThread) [custom_components.bms_ble.plugins.seplos_v2_bms] BP00: RX BLE data (start): bytearray(b'~\x14\x00b\x00\x000\x00\x00\x10\x0c\x8d\x0c/\x06\x0b\x87\x0bs\x0b\xb6\x0b\x90\x00\x15\x13\xe8\x05\xbd\x07 ')
2024-12-17 12:56:11.924 DEBUG (MainThread) [custom_components.bms_ble.plugins.seplos_v2_bms] BP00: RX BLE data (cnt.): bytearray(b'\xd0\x00\xae \xd0\x00J\x03\xe8\x13\xeb\x07\x00\x02\x03\x08\x00\x00\x00\x00\x00\x00\x00\x00c\xfc\r')
2024-12-17 12:56:11.924 DEBUG (MainThread) [custom_components.bms_ble.plugins.seplos_v2_bms] BP00: address: 0x0, function: 0x62, return: 0x0
2024-12-17 12:56:12.235 DEBUG (MainThread) [custom_components.bms_ble.plugins.seplos_v2_bms] BP00: RX BLE data (start): bytearray(b'~\x14\x00a\x00\x00j\x00\x00\x10\x0c[\x0cz\x0cg\x0cj\x0cj\x0c\x8b\x0c\x84\x0c\x87\x0c\x85\x0cz\x0ci\x0c|\x0cW\x0co\x0cQ')
2024-12-17 12:56:12.337 DEBUG (MainThread) [custom_components.bms_ble.plugins.seplos_v2_bms] BP00: RX BLE data (cnt.): bytearray(b'\x0cb\x06\x0b\x87\x0b~\x0b\x81\x0b\x85\x0b\xb6\x0b\x90\x00]\x13\xe7\x17\xbd\x06m`\x00\xd9m`\x00J\x03\xe8')
2024-12-17 12:56:12.338 DEBUG (MainThread) [custom_components.bms_ble.plugins.seplos_v2_bms] BP00: RX BLE data (cnt.): bytearray(b'\x13\xe9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x03\x08\x00\x00')
2024-12-17 12:56:12.338 DEBUG (MainThread) [custom_components.bms_ble.plugins.seplos_v2_bms] BP00: RX BLE data (cnt.): bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8b\xb5\r')
2024-12-17 12:56:12.339 DEBUG (MainThread) [custom_components.bms_ble.plugins.seplos_v2_bms] BP00: address: 0x0, function: 0x61, return: 0x0
2024-12-17 12:56:12.649 DEBUG (MainThread) [custom_components.bms_ble.plugins.seplos_v2_bms] BP00: RX BLE data (start): bytearray(b'~\x14\x01a\x00\x00j\x00\x01\x10\x0c[\x0cz\x0cg\x0cj\x0cj\x0c\x8b\x0c\x84\x0c\x87\x0c\x85\x0cz\x0ci\x0c')
2024-12-17 12:56:12.649 DEBUG (MainThread) [custom_components.bms_ble.plugins.seplos_v2_bms] BP00: RX BLE data (cnt.): bytearray(b'|\x0cW\x0co\x0cQ\x0cb\x06\x0b\x87\x0b~\x0b\x81\x0b\x85\x0b\xb6\x0b\x90\x00]\x13\xe7\x17\xbd\x06m`\x00')
2024-12-17 12:56:12.649 DEBUG (MainThread) [custom_components.bms_ble.plugins.seplos_v2_bms] BP00: RX BLE data (cnt.): bytearray(b'\xd9m`\x00J\x03\xe8\x13\xe9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
2024-12-17 12:56:12.697 DEBUG (MainThread) [custom_components.bms_ble.plugins.seplos_v2_bms] BP00: RX BLE data (cnt.): bytearray(b'\x00\x02\x03\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\x97\r')
2024-12-17 12:56:12.697 DEBUG (MainThread) [custom_components.bms_ble.plugins.seplos_v2_bms] BP00: address: 0x1, function: 0x61, return: 0x0
2024-12-17 12:56:12.955 DEBUG (MainThread) [custom_components.bms_ble.plugins.seplos_v2_bms] BP00: RX BLE data (start): bytearray(b'~\x14\x02a\x00\x00j\x00\x02\x10\x0c[\x0cz\x0cg\x0cj\x0cj\x0c\x8b\x0c\x84\x0c\x87\x0c\x85\x0cz\x0ci')
2024-12-17 12:56:12.995 DEBUG (MainThread) [custom_components.bms_ble.plugins.seplos_v2_bms] BP00: RX BLE data (cnt.): bytearray(b'\x0c|\x0cW\x0co\x0cQ\x0cb\x06\x0b\x87\x0b~\x0b\x81\x0b\x85\x0b\xb6\x0b\x90\x00]\x13\xe7\x17\xbd\x06m`')
2024-12-17 12:56:13.066 DEBUG (MainThread) [custom_components.bms_ble.plugins.seplos_v2_bms] BP00: RX BLE data (cnt.): bytearray(b'\x00\xd9m`\x00J\x03\xe8\x13\xe9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
2024-12-17 12:56:13.096 DEBUG (MainThread) [custom_components.bms_ble.plugins.seplos_v2_bms] BP00: RX BLE data (cnt.): bytearray(b'\x00\x00\x02\x03\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf5\xf1\r')
2024-12-17 12:56:13.097 DEBUG (MainThread) [custom_components.bms_ble.plugins.seplos_v2_bms] BP00: address: 0x2, function: 0x61, return: 0x0
2024-12-17 12:56:13.098 DEBUG (MainThread) [custom_components.bms_ble] BP00: BMS data sample {'voltage': 50.96, 'current': 2.1, 'cycle_charge': 146.9, 'cycles': 74, 'battery_level': 17.4, 'temperature': 22.85, 'cell_count': 16, 'pack_count': 2, 'temp_sensors': 6, 'cell#0': 3.163, 'cell#1': 3.194, 'cell#2': 3.175, 'cell#3': 3.178, 'cell#4': 3.178, 'cell#5': 3.211, 'cell#6': 3.204, 'cell#7': 3.207, 'cell#8': 3.205, 'cell#9': 3.194, 'cell#10': 3.177, 'cell#11': 3.196, 'cell#12': 3.159, 'cell#13': 3.183, 'cell#14': 3.153, 'cell#15': 3.17, 'delta_voltage': 0.058, 'cell#16': 3.163, 'cell#17': 3.194, 'cell#18': 3.175, 'cell#19': 3.178, 'cell#20': 3.178, 'cell#21': 3.211, 'cell#22': 3.204, 'cell#23': 3.207, 'cell#24': 3.205, 'cell#25': 3.194, 'cell#26': 3.177, 'cell#27': 3.196, 'cell#28': 3.159, 'cell#29': 3.183, 'cell#30': 3.153, 'cell#31': 3.17, 'cell#32': 3.163, 'cell#33': 3.194, 'cell#34': 3.175, 'cell#35': 3.178, 'cell#36': 3.178, 'cell#37': 3.211, 'cell#38': 3.204, 'cell#39': 3.207, 'cell#40': 3.205, 'cell#41': 3.194, 'cell#42': 3.177, 'cell#43': 3.196, 'cell#44': 3.159, 'cell#45': 3.183, 'cell#46': 3.153, 'cell#47': 3.17, 'cycle_capacity': 7486.024, 'power': 107.016, 'battery_charging': True}
2024-12-17 12:56:13.098 DEBUG (MainThread) [custom_components.bms_ble] Finished fetching BP00 data in 1.946 seconds (success: True)

@patman15
Copy link
Owner

patman15 commented Dec 17, 2024

Ok, seems that the BP00 unit simply ignores the address and always returns the same value. 😞 Looks like I need to reactivate the Bluetooth of the other unit, which makes it a bit tedious. This will consume one BT slot (out of 3 per proxy) for each battery pack.

@riogrande75
Copy link

Too bad. I thought all cell voltages are correct, but after a close look I had to realize that they really don't fit for BP01 and BP02.

@patman15
Copy link
Owner

Do you guys want them as separate batteries or as one? For Seplos V3 they are combined as only one device is exposed, but as we have here three separate BT devices, it is a bit more challenging in case you want them aggregated. Any thoughts?

@andreas-bulling
Copy link
Author

I personally would prefer to have them separate. Also because this is a common (and widely discussed) issue with the Seplos BMS: That individual packs cannot easily be monitored (some people run a mix of BT and an additional RS485) to achieve that.

@patman15
Copy link
Owner

ok, I just pushed an update that should present the packs individually as it was the easier fix. Not sure what data will be shown at the extension packs, but if you could provide me debug logs and let me know your observations that would be great to complete this topic.

@jambo1980
Copy link

Cell voltages seem to be correct now. Sensor values of slave batteries are wrong, but I am only interested in the cell voltages ;-).

2024-12-17 22:18:57.382 DEBUG (MainThread) [custom_components.bms_ble] BP00: BMS data update
2024-12-17 22:18:57.382 DEBUG (MainThread) [custom_components.bms_ble.plugins.seplos_v2_bms] BMS BP00 already connected
2024-12-17 22:18:57.689 DEBUG (MainThread) [custom_components.bms_ble.plugins.seplos_v2_bms] BP00: RX BLE data (start): bytearray(b'~\x14\x00Q\x00\x00$CAN:Victron   ')
2024-12-17 22:18:57.690 DEBUG (MainThread) [custom_components.bms_ble.plugins.seplos_v2_bms] BP00: RX BLE data (cnt.): bytearray(b'      1101-SP76 \x10\x06\x03\x01F\x02\x80\xc6\r')
2024-12-17 22:18:57.690 DEBUG (MainThread) [custom_components.bms_ble.plugins.seplos_v2_bms] BP00: address: 0x0, function: 0x51, return: 0x0
2024-12-17 22:18:57.890 DEBUG (MainThread) [custom_components.bms_ble.plugins.seplos_v2_bms] BP00: RX BLE data (start): bytearray(b'~\x14\x00b\x00\x000\x00\x00\x10\x0c&\x0b\x8d\x06\x0b\x86\x0bu\x0b\xae\x0b\x89\x00\x00\x13+\x05\x11\x07 \xd0\x00\x9a ')
2024-12-17 22:18:57.932 DEBUG (MainThread) [custom_components.bms_ble.plugins.seplos_v2_bms] BP00: RX BLE data (cnt.): bytearray(b'\xd0\x00J\x03\xe8\x13/\x07\x00\x10\x03\x08\x00\x00\x00\x00\x00\x00\x00\x00\xc6\xac\r')
2024-12-17 22:18:57.933 DEBUG (MainThread) [custom_components.bms_ble.plugins.seplos_v2_bms] BP00: address: 0x0, function: 0x62, return: 0x0
2024-12-17 22:18:58.110 DEBUG (MainThread) [custom_components.bms_ble.plugins.seplos_v2_bms] BP00: RX BLE data (start): bytearray(b'~\x14\x00a\x00\x00j\x00\x00\x10\x0b\xda\x0c\x0b\x0b\xec\x0b\xf0\x0b\xf3\x0c&\x0c\x1b\x0c \x0c\x1d\x0c\n\x0b\xf1\x0c')
2024-12-17 22:18:58.202 DEBUG (MainThread) [custom_components.bms_ble.plugins.seplos_v2_bms] BP00: RX BLE data (cnt.): bytearray(b'\x0e\x0b\xd1\x0b\xf9\x0b\xc7\x0b\xe4\x06\x0b\x86\x0b\x7f\x0b\x81\x0b\x84\x0b\xae\x0b\x89\x00\x00\x13+\x15z\x06m`')
2024-12-17 22:18:58.203 DEBUG (MainThread) [custom_components.bms_ble.plugins.seplos_v2_bms] BP00: RX BLE data (cnt.): bytearray(b'\x00\xc4m`\x00J\x03\xe8\x13,\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x03\x08\x00\x00\x00')
2024-12-17 22:18:58.240 DEBUG (MainThread) [custom_components.bms_ble.plugins.seplos_v2_bms] BP00: RX BLE data (cnt.): bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01^\r')
2024-12-17 22:18:58.241 DEBUG (MainThread) [custom_components.bms_ble.plugins.seplos_v2_bms] BP00: address: 0x0, function: 0x61, return: 0x0
2024-12-17 22:18:58.243 DEBUG (MainThread) [custom_components.bms_ble] BP00: BMS data sample {'voltage': 49.07, 'current': 0.0, 'cycle_charge': 129.7, 'cycles': 74, 'battery_level': 15.4, 'temperature': 22.15, 'cell_count': 16, 'pack_count': 2, 'temp_sensors': 6, 'cell#0': 3.034, 'cell#1': 3.083, 'cell#2': 3.052, 'cell#3': 3.056, 'cell#4': 3.059, 'cell#5': 3.11, 'cell#6': 3.099, 'cell#7': 3.104, 'cell#8': 3.101, 'cell#9': 3.082, 'cell#10': 3.057, 'cell#11': 3.086, 'cell#12': 3.025, 'cell#13': 3.065, 'cell#14': 3.015, 'cell#15': 3.044, 'delta_voltage': 0.095, 'cycle_capacity': 6364.379, 'power': 0.0, 'battery_charging': False}
2024-12-17 22:18:58.244 DEBUG (MainThread) [custom_components.bms_ble] Finished fetching BP00 data in 0.862 seconds (success: True)
2024-12-17 22:19:04.383 DEBUG (MainThread) [custom_components.bms_ble] BP01: BMS data update
2024-12-17 22:19:04.383 DEBUG (MainThread) [custom_components.bms_ble.plugins.seplos_v2_bms] BMS BP01 already connected
2024-12-17 22:19:04.582 DEBUG (MainThread) [custom_components.bms_ble.plugins.seplos_v2_bms] BP01: RX BLE data (start): bytearray(b'~\x14\x00Q\x00\x00$CAN:Victron        ')
2024-12-17 22:19:04.650 DEBUG (MainThread) [custom_components.bms_ble.plugins.seplos_v2_bms] BP01: RX BLE data (cnt.): bytearray(b' 1101-SP76 \x10\x04\x03\x01F\x00\xe4\x07\r')
2024-12-17 22:19:04.650 DEBUG (MainThread) [custom_components.bms_ble.plugins.seplos_v2_bms] BP01: address: 0x0, function: 0x51, return: 0x0
2024-12-17 22:19:04.863 DEBUG (MainThread) [custom_components.bms_ble.plugins.seplos_v2_bms] BP01: RX BLE data (start): bytearray(b'~\x14\x00b\x00\x00(\x00\x00\x10\x00\x00\x00\x00\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
2024-12-17 22:19:04.896 DEBUG (MainThread) [custom_components.bms_ble.plugins.seplos_v2_bms] BP01: RX BLE data (cnt.): bytearray(b'\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\nO\r')
2024-12-17 22:19:04.897 DEBUG (MainThread) [custom_components.bms_ble.plugins.seplos_v2_bms] BP01: address: 0x0, function: 0x62, return: 0x0
2024-12-17 22:19:05.164 DEBUG (MainThread) [custom_components.bms_ble.plugins.seplos_v2_bms] BP01: RX BLE data (start): bytearray(b'~\x14\x00a\x00\x00j\x00\x00\x10\x0c\x04\x0c\x19\x0c\x1a\x0b\x91\x0c\x1f\x0b\x8e\x0c\x19\x0c\x1c\x0c\t\x0b')
2024-12-17 22:19:05.164 DEBUG (MainThread) [custom_components.bms_ble.plugins.seplos_v2_bms] BP01: RX BLE data (cnt.): bytearray(b'\xa3\x0c\x0e\x0c\x15\x0c\x13\x0c\x12\x0c\n\x0c\x1b\x06\x0b\x84\x0b|\x0bw\x0b\x82\x0b\xaa\x0b\x83\x00\x00\x13')
2024-12-17 22:19:05.197 DEBUG (MainThread) [custom_components.bms_ble.plugins.seplos_v2_bms] BP01: RX BLE data (cnt.): bytearray(b'-\x17s\x06m`\x00\xd6m`\x00\xca\x03\xe8\x130\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
2024-12-17 22:19:05.198 DEBUG (MainThread) [custom_components.bms_ble.plugins.seplos_v2_bms] BP01: RX BLE data (cnt.): bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x03\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x8f\r')
2024-12-17 22:19:05.199 DEBUG (MainThread) [custom_components.bms_ble.plugins.seplos_v2_bms] BP01: address: 0x0, function: 0x61, return: 0x0
2024-12-17 22:19:05.199 DEBUG (MainThread) [custom_components.bms_ble] BP01: BMS data sample {'voltage': 0.0, 'current': 0.0, 'cycle_charge': 0.0, 'cycles': 0, 'battery_level': 0.0, 'temperature': -273.15, 'cell_count': 16, 'pack_count': 0, 'temp_sensors': 6, 'cell#0': 3.076, 'cell#1': 3.097, 'cell#2': 3.098, 'cell#3': 2.961, 'cell#4': 3.103, 'cell#5': 2.958, 'cell#6': 3.097, 'cell#7': 3.1, 'cell#8': 3.081, 'cell#9': 2.979, 'cell#10': 3.086, 'cell#11': 3.093, 'cell#12': 3.091, 'cell#13': 3.09, 'cell#14': 3.082, 'cell#15': 3.099, 'delta_voltage': 0.145, 'cycle_capacity': 0.0, 'power': 0.0, 'battery_charging': False}
2024-12-17 22:19:05.200 DEBUG (MainThread) [custom_components.bms_ble] Finished fetching BP01 data in 0.817 seconds (success: True)

@patman15
Copy link
Owner

Sensor values of slave batteries are wrong

New day, new push, values should be correct now. You will need to add up power and current from each pack.
@jambo1980 you have BP00 and BP01 so 2 packs, or is one log entry for BP02 missing?

@jambo1980
Copy link

@patman15 Thank you, all values seem to be correct now. My third pack has an older BMS version without bluetooth, so it doesn't show up when the packs are read out individually.

@riogrande75
Copy link

I can confirm that the cell voltages are ok for each BP0x block now.
But with latest branch from this morning, the overall energy and power have the decimal problem again. Obviously the protocol description fits for local polling, not when the slave packs are polled via BP00:
grafik
grafik

I do also have disconnects and reconnects with BP02. Dunno why, but maybe the log reveals the problem.
home-assistant_bms_ble_2024-12-18T09-17-36.474Z.log

@ebagnoli
Copy link

Thank you so much Patrick, after a lot of install/uninstall I think I had it working, now trying to have the individual cell voltage.

@patman15 patman15 reopened this Dec 18, 2024
@patman15
Copy link
Owner

But with latest branch from this morning, the overall energy and power have the decimal problem again.

Again, fixed. 😥 Thanks.

I do also have disconnects and reconnects with BP02.

You also have them for BP01. The signal strength looks a bit low so you may want to add a proxy or get it closer ...

@riogrande75
Copy link

You also have them for BP01. The signal strength looks a bit low so you may want to add a proxy or get it closer ...

Thx. Guess its related to the ammount of bms'. Need to install a 2nd proxy in my server room to have 2 JK's, 3 seplos v2 and one JBD online. In fact 6 connections or do I count incorrect?

@patman15
Copy link
Owner

You are right, since Seplos v2 won't let me query everything through one connection...
Each proxy can do at max 3 connections, so you will experience issues if you don't install enough.

@ebagnoli
Copy link

Nothing works anymore for me with version 11.3 and seplos 2. Yesterday was ok with 11.2

@patman15
Copy link
Owner

Between v1.11.0-beta.2...v1.11.0-beta.3 I only changed a divisor to correct current and charge value. It's unlikely that this causes a severe issue.
Can you please be a bit more specific than "nothing works"?

@rvdgaag
Copy link

rvdgaag commented Dec 22, 2024

Excellent work ! I have 3 Seplos V2 units and I can see them all 3.

However I request to see some more:

-State of Health (SOH)

@patman15
Copy link
Owner

patman15 commented Dec 22, 2024

SoH is something that only a few BMSs report. Due to maintainability reasons I only add new sensors for values that are either available to all BMS types or can be calculated from other existing ones.
If really needed I could probably add an attribute to the cycles sensor.

@patman15
Copy link
Owner

patman15 commented Dec 22, 2024

SoH is something that only a few BMSs report. Due to maintainability reasons I only add new sensors for values that are either available to all BMS types or can be calculated from other existing ones.
If really needed, I could probably add an attribute to the cycles sensor. In case you'd like to see this, please open a new feature request, thanks.

@patman15
Copy link
Owner

fixed with release v1.11.0

@andreas-bulling
Copy link
Author

@patman15 Finally - the latest version (suddenly) works perfect also for me. I can see both batteries just fine. The connection is a bit unreliable (the batteries become "unavailable" VERY frequently) but this is not a problem of the integration but the BT connection.

Thank you very much for implementing Seplos v2 support. I hope that many people will find this integration, as getting access to all values of all batteries is a key problem that many users of these BMS are facing. Usually, only aggregated data from BP00 is available.

@patman15
Copy link
Owner

Finally - the latest version (suddenly) works perfect also for me.

Probably just by accident due to your bad connection? The first initialization is a bit more critical compared to the others. If you have unavailability issues, try to monitor the link quality and the RSSI sensor to find some pattern. If you need more help, just raise a new issue! Happy New Year!

@Leecavturbo
Copy link

My BMS BT closes down after period of inactivity . The data is then unavailable unless I reload the config. Fix for this ?
Also I don’t see individual cell voltges

@patman15
Copy link
Owner

@Leecavturbo since this issue is already closed, please open a new one and provide debug logs so I can check what is happening. Thanks!

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

Successfully merging a pull request may close this issue.

7 participants