-
Notifications
You must be signed in to change notification settings - Fork 63
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
JK BMS Error after connected (Resolved with 0.0.61 version and HA 10.1) #83
Comments
My error was with prrvious version of Home Assistant. After upgrade to 10.0 same error. |
@albertomontoro2023 The interesting part from your logs is
I'll release an update that tries to refer the Characteristics by handle soon |
Hello, |
Ok i restarted the BMS, i can confirm that if i let Batmon connect to it .. it will connect once... then the bluetooth device is kind killed, i can't access it anymore till à restart the BMS. So, the way the bluetooth device is handled in Batmon/HA, "kill" the device |
@Honusnap you can dowgrade to this version and see if it changes anything: https://github.com/fl4p/batmon-ha/releases/tag/release0.0.46 |
Any guideline to downgrade while keeping settings ? Or do i ned to uninstall and reinstall 0.0.46 |
Not sure if this keeps the settings. You can backup it using the YAML Editor.
You can also try this version, which uses the latest bleak: |
Just try with the NEW version 0.0.60 19:53:08 ERROR [bt] [Characteristic] 0000ffe1-0000-1000-8000-00805f9b34fb (Handle: 4): Vendor specific (read,notify), Value: Multiple Characteristics with this UUID, refer to your desired characteristic by the This is the complete LOG: s6-rc: info: service fix-attrs successfully started I hope this can help for next version. |
Same as you Honusnap !!!!! With HA 10 and the last Batmon version 0.0.61 all is working fine @fl4p I will pay you a pair of beers with paypal. |
this was the initial problem: |
Hi all,
I see all issues and dont see any similar.
I have a JK-B1A20S15P
Hardware Ver: V10.XW
Soft Ver: V10.07
Manuf. Date: 2022-02-20
Version: V4.11.0
Its working fine for more than 1 year and now I just discover Home Assistant and I would like to connect my BMS with HA, but I dont understand where is my problem
My Home Assistant is version:
Home Assistant 2023.4.5
Supervisor 2023.04.0
Operating System 10.0
Frontend 20230411.1 - latest
MQTT is well configured and working fine with other components,
Configuration in Batmon (Version 0.0.57)
type: jk
alias: JK-B1A20S15P
debug: true
I try with PIN, without PIN, enabling and disabling keep alive, etc.....
Because I am not a progrmmer, can anyone help me with the next log?
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
19:26:13 INFO [main] BT Discovery:
19:26:18 INFO [main] BT Device JK-B1A20S15P address=20:21:11:28:18:CE
19:26:18 INFO [main] BT Device 09-D0-C6-BF-57-65 address=09:D0:C6:BF:57:65
19:26:18 INFO [main] BT Device 5B-5E-31-AC-66-E9 address=5B:5E:31:AC:66:E9
19:26:18 INFO [main] BT Device 6C-5D-CF-20-91-06 address=6C:5D:CF:20:91:06
19:26:18 INFO [main] BT Device 49-CD-CF-DF-10-1B address=49:CD:CF:DF:10:1B
19:26:18 INFO [main] BT Device 43-6E-50-51-AE-C9 address=43:6E:50:51:AE:C9
19:26:18 INFO [main] BT Device Mi Smart Band 6 address=C6:77:22:7A:07:AE
19:26:18 INFO [main] BT Device 7F-7D-55-9E-BE-97 address=7F:7D:55:9E:BE:97
19:26:18 INFO [main] Verbose logging enabled
19:26:18 INFO [main] Verbose log for 20:21:11:28:18:CE enabled
19:26:18 INFO [bt] BMS JKBt(20:21:11:28:18:CE) keep alive enabled
19:26:18 INFO [main] connecting mqtt mqttuser@core-mosquitto
19:26:18 DEBUG [client] Sending CONNECT (u1, p1, wr0, wq0, wf0, c1, k60) client_id=b''
19:26:18 DEBUG [client] Received CONNACK (0, 0)
19:26:18 INFO [main] Fetching 1 BMS + 0 others serially, period=20.00s, keep_alive=True
19:26:18 INFO [sampling] connecting bms JKBt(20:21:11:28:18:CE)
19:26:18 DEBUG [client] Connecting to device @ 20:21:11:28:18:CE with hci0
19:26:18 INFO [main] mqtt watchdog loop started with timeout 120.0s
19:26:18 DEBUG [scanner] cached devices: {'/org/bluez/hci0/dev_7F_7D_55_9E_BE_97': {'Address': '7F:7D:55:9E:BE:97', 'AddressType': 'random', 'Alias': '7F-7D-55-9E-BE-97', 'Paired': False, 'Bonded': False, 'Trusted': False, 'Blocked': False, 'LegacyPairing': False, 'Connected': False, 'UUIDs': [], 'Adapter': '/org/bluez/hci0', 'ManufacturerData': {76: b'\x10\x05\x02\x18>\xd6\x8a'}, 'ServicesResolved': False, 'AdvertisingFlags': b'\x1a'}, '/org/bluez/hci0/dev_C6_77_22_7A_07_AE': {'Address': 'C6:77:22:7A:07:AE', 'AddressType': 'public', 'Name': 'Mi Smart Band 6', 'Alias': 'Mi Smart Band 6', 'Paired': False, 'Bonded': False, 'Trusted': False, 'Blocked': False, 'LegacyPairing': False, 'Connected': False, 'UUIDs': ['0000fee0-0000-1000-8000-00805f9b34fb'], 'Adapter': '/org/bluez/hci0', 'ManufacturerData': {343: b'\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x03\xc6w"z\x07\xae'}, 'ServicesResolved': False, 'AdvertisingFlags': b'\x06'}, '/org/bluez/hci0/dev_5B_5E_31_AC_66_E9': {'Address': '5B:5E:31:AC:66:E9', 'AddressType': 'random', 'Alias': '5B-5E-31-AC-66-E9', 'Paired': False, 'Bonded': False, 'Trusted': False, 'Blocked': False, 'LegacyPairing': False, 'Connected': False, 'UUIDs': [], 'Adapter': '/org/bluez/hci0', 'ManufacturerData': {76: b'\x10\x05\x02\x1c<\x91U'}, 'ServicesResolved': False, 'AdvertisingFlags': b'\x1a'}, '/org/bluez/hci0/dev_20_21_11_28_18_CE': {'Address': '20:21:11:28:18:CE', 'AddressType': 'public', 'Name': 'JK-B1A20S15P', 'Alias': 'JK-B1A20S15P', 'Paired': False, 'Bonded': False, 'Trusted': True, 'Blocked': False, 'LegacyPairing': False, 'Connected': False, 'UUIDs': ['0000ffe0-0000-1000-8000-00805f9b34fb'], 'Adapter': '/org/bluez/hci0', 'ManufacturerData': {19274: b'\x00\x01'}, 'ServicesResolved': False, 'AdvertisingFlags': b'\x06'}}
19:26:18 DEBUG [scanner] received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_20_21_11_28_18_CE): ['org.bluez.Device1', {'RSSI': <dbus_next.signature.Variant ('n', -73)>}, []]
19:26:18 DEBUG [scanner] received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0): ['org.bluez.Adapter1', {'Discovering': <dbus_next.signature.Variant ('b', True)>}, []]
19:26:18 DEBUG [scanner] received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_20_21_11_28_18_CE): ['org.bluez.Device1', {'RSSI': <dbus_next.signature.Variant ('n', -78)>}, []]
19:26:18 DEBUG [scanner] received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_20_21_11_28_18_CE): ['org.bluez.Device1', {}, ['RSSI']]
19:26:18 DEBUG [scanner] received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0): ['org.bluez.Adapter1', {'Discovering': <dbus_next.signature.Variant ('b', False)>}, []]
19:26:18 DEBUG [client] received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_20_21_11_28_18_CE): ['org.bluez.Device1', {'RSSI': <dbus_next.signature.Variant ('n', -78)>}, []]
19:26:18 DEBUG [client] received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_20_21_11_28_18_CE): ['org.bluez.Device1', {'Connected': <dbus_next.signature.Variant ('b', True)>}, []]
19:26:19 DEBUG [client] Connection successful (/org/bluez/hci0/dev_20_21_11_28_18_CE)
19:26:19 DEBUG [client] Waiting for ServicesResolved (/org/bluez/hci0/dev_20_21_11_28_18_CE)
19:26:19 DEBUG [client] received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_20_21_11_28_18_CE): ['org.bluez.Device1', {'ServicesResolved': <dbus_next.signature.Variant ('b', True)>}, []]
19:26:19 ERROR [sampling] JK-B1A20S15P error: Multiple Characteristics with this UUID, refer to your desired characteristic by the
handle
attribute instead.19:26:19 ERROR [main] 1 exceptions occurred fetching BMSs
19:26:19 ERROR [main] Error (num 1, max 200) reading BMS: Multiple Characteristics with this UUID, refer to your desired characteristic by the
handle
attribute instead.19:26:19 ERROR [main] Stack: Traceback (most recent call last):
File "/app/main.py", line 45, in fetch_loop
await fn()
File "/app/main.py", line 240, in fn
raise exceptions[0]
File "/app/main.py", line 235, in fn
await t
File "/app/bmslib/sampling.py", line 51, in call
return await self.sample()
File "/app/bmslib/sampling.py", line 70, in sample
async with bms:
File "/app/bmslib/bt.py", line 172, in aenter
await self.connect()
File "/app/bmslib/jikong.py", line 122, in connect
await self.client.start_notify(self.UUID_RX, self._notification_handler)
File "/usr/lib/python3.10/site-packages/bleak/backends/bluezdbus/client.py", line 1041, in start_notify
characteristic = self.services.get_characteristic(char_specifier)
File "/usr/lib/python3.10/site-packages/bleak/backends/service.py", line 185, in get_characteristic
raise BleakError(
bleak.exc.BleakError: Multiple Characteristics with this UUID, refer to your desired characteristic by the
handle
attribute instead.The text was updated successfully, but these errors were encountered: