Open pooooom2 opened 1 year ago
Log when BMS disconnect
19:36:27 INFO [sampling] battery1: BmsSampl(93.8%,U=56.0V,I=16.04A,P=899W,q=219.6Ah/234,mos=0.0°C)
19:36:27 INFO [sampling] battery1 volt=4008,4006,4004,4007,4007,4006,4002,3996,4001,4002,3999,3999,4001,4006 temp=[32.5, 32.5]
19:36:28 INFO [sampling] battery1: BmsSampl(93.8%,U=56.0V,I=16.04A,P=899W,q=219.6Ah/234,mos=0.0°C)
19:36:28 INFO [sampling] battery1 volt=4008,4003,4002,4003,4003,4004,4002,3999,4003,4008,3997,3998,4004,4006 temp=[32.5, 32.5]
19:36:30 INFO [sampling] battery1: BmsSampl(93.8%,U=56.0V,I=16.04A,P=899W,q=219.6Ah/234,mos=0.0°C)
19:36:30 INFO [sampling] battery1 volt=4008,4003,4002,4003,4003,4004,4002,3999,4003,4008,3997,3998,4004,4006 temp=[32.5, 32.5]
19:36:36 WARNING [bt] BMS JKBt(C8:47:8C:E9:0B:B0) disconnected after 35297.2s!
19:36:36 INFO [sampling] battery1 bms debug data: {3: bytearray(b'U\xaa\xeb\x90\x03\\JK_B1A24S15P\x00\x00\x00\x0011.XW\x00\x00\x0011.25\x00\x00\x00\\\xe9n\x00\x0c\x00\x00\x00JK_B1A24S15P\x00\x00\x00\x001234\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00230209\x00\x002092401204\x000000\x00Input Userdata\x00\x000850753323\x00\x00\x00\x00\x00\x00Input Userdata\x00\x00|\xf8\xff\xff\x1f\r\x00\x00\x00\x00\x00\x00\x90\x0f\x00\x00\x00\x00\xc0\xd8\x03\x00\x00\x00\x00\x01\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\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\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfe/\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8a'), 1: bytearray(b'U\xaa\xeb\x90\x01\\X\x02\x00\x00H\r\x00\x00\xac\r\x00\x00\x04\x10\x00\x00\xef\x0f\x00\x00\n\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb8\x0b\x00\x00\xf0I\x02\x00\x1e\x00\x00\x00<\x00\x00\x00\xf0I\x02\x00,\x01\x00\x00<\x00\x00\x00<\x00\x00\x00\xe8\x03\x00\x00\xbc\x02\x00\x00X\x02\x00\x00\xbc\x02\x00\x00X\x02\x00\x008\xff\xff\xff\x9c\xff\xff\xff\xe8\x03\x00\x00 \x03\x00\x00\x0e\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x10\x92\x03\x00\xdc\x05\x00\x00\xb8\x0b\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\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\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\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\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\xb0q\x0b\x00\x00\x00\x00\x00\x00|\xf8\xff\xff\x1f\r\x00\x00\x00\x00\x00\x00\xaf'), 2: bytearray(b'U\xaa\xeb\x90\x02\x9e\xa8\x0f\xa3\x0f\xa2\x0f\xa3\x0f\xa3\x0f\xa4\x0f\xa2\x0f\x9f\x0f\xa3\x0f\xa8\x0f\x9d\x0f\x9e\x0f\xa4\x0f\xa6\x0f\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\x00\x00\x00\x00\xff?\x00\x00\xa3\x0f\x0b\x00\x00\n\x1e\x00\x1f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x89\x01\x00\x00\x00\x00\xeb\xda\x00\x00\x1e\xb8\r\x00U\xc1\xff\xffE\x01E\x01\x00\x00\x00\x00@\xfc\x02]\xb8Y\x03\x00\x10\x92\x03\x00\x1d\x00\x00\x00\xc0-i\x00d\x00\x00\x00\xebso\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\x00\x01\x00\x00\x00<\x04\x00\x00J\x00\x19\x8e@@\xd0\x00\x00\x00\xe4\x15\xa7\x1e\x00\x01\x00\x01\x00\x05\x00\x00\xf80y\x00\x00\x00\x00\x00\x89\x01\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\xfe\xff\x7f\xdc\x0f\x01\x00\x00\x00\x00\x00\x00\x9d')}
Traceback (most recent call last):
File "/app/main.py", line 266, in main
await fetch_loop(fn, period=sample_period, max_errors=max_errors)
File "/app/main.py", line 36, in fetch_loop
await fn()
File "/app/main.py", line 259, in fn
await t()
File "/app/bmslib/sampling.py", line 67, in __call__
return await self.sample()
File "/app/bmslib/sampling.py", line 92, in sample
sample = await bms.fetch()
File "/app/bmslib/jikong.py", line 222, in fetch
await self._fetch_futures.wait_for(0x02, self.TIMEOUT)
File "/app/bmslib/__init__.py", line 48, in wait_for
return await asyncio.wait_for(self._futures.get(name), timeout)
File "/usr/lib/python3.10/asyncio/tasks.py", line 445, in wait_for
return fut.result()
asyncio.exceptions.CancelledError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/app/main.py", line 296, in <module>
asyncio.run(main())
File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
return future.result()
asyncio.exceptions.CancelledError
19:36:36 INFO [main] exit signal handler... (), {}, shutdown already False
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
Log when restart
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
22:55:17 INFO [bt] BT Discovery:
22:55:22 INFO [bt] BT Device Petkit_W5 address=A4:C1:38:FC:19:C8
22:55:22 INFO [bt] BT Device 65-D9-97-4F-00-39 address=65:D9:97:4F:00:39
22:55:22 INFO [bt] BT Device 4D-70-D2-A3-DD-E3 address=4D:70:D2:A3:DD:E3
22:55:22 INFO [bt] BT Device 54-43-4A-FF-73-03 address=54:43:4A:FF:73:03
22:55:22 INFO [bt] BT Device 14-BF-E5-9C-7F-73 address=14:BF:E5:9C:7F:73
22:55:22 INFO [bt] BT Device 56-E3-32-02-B0-0F address=56:E3:32:02:B0:0F
22:55:22 INFO [bt] BT Device EE-34-53-3D-2D-59 address=EE:34:53:3D:2D:59
22:55:22 INFO [bt] BT Device 56-05-57-46-39-E3 address=56:05:57:46:39:E3
22:55:22 INFO [bt] BT Device CB-20-58-55-39-6F address=CB:20:58:55:39:6F
22:55:22 INFO [bt] BT Device 24-A9-84-A1-92-70 address=24:A9:84:A1:92:70
22:55:22 INFO [bt] BMS JKBt(C8:47:8C:E9:0B:B0) keep alive enabled
22:55:22 INFO [main] connecting mqtt mqtt-admin@core-mosquitto
22:55:22 INFO [main] Fetching 1 BMS + 0 others serially, period=1.00s, keep_alive=True
22:55:22 INFO [sampling] connecting bms JKBt(C8:47:8C:E9:0B:B0)
22:55:22 INFO [main] mqtt watchdog loop started with timeout 900.0s
22:55:26 INFO [jikong] normal connect failed (Device with address C8:47:8C:E9:0B:B0 was not found.), connecting with scanner
22:55:36 ERROR [sampling] battery1 error: Device C8:47:8C:E9:0B:B0 not discovered. Make sure it in range and is not being controled by another application. ({'CB:20:58:55:39:6F', '4D:70:D2:A3:DD:E3', '56:E3:32:02:B0:0F', 'D8:38:F5:33:A8:59', '14:BF:E5:9C:7F:73', 'EE:34:53:3D:2D:59', '65:D9:97:4F:00:39', 'E9:AD:82:22:E4:4C', '56:05:57:46:39:E3', '24:A9:84:A1:92:70', 'A4:C1:38:FC:19:C8', 'C4:CD:82:08:14:12'})
22:55:36 INFO [sampling] connecting bms JKBt(C8:47:8C:E9:0B:B0)
22:55:40 INFO [jikong] normal connect failed (Device with address C8:47:8C:E9:0B:B0 was not found.), connecting with scanner
22:55:49 ERROR [sampling] battery1 error: Device C8:47:8C:E9:0B:B0 not discovered. Make sure it in range and is not being controled by another application. ({'CB:20:58:55:39:6F', '56:E3:32:02:B0:0F', '14:BF:E5:9C:7F:73', '58:7E:61:4C:FD:E0', '04:B9:E3:4C:44:93', 'C4:CD:82:08:14:12', 'EE:34:53:3D:2D:59', '65:D9:97:4F:00:39', 'E9:AD:82:22:E4:4C', '56:05:57:46:39:E3', '24:A9:84:A1:92:70', '4D:70:D2:A3:DD:E3', 'A4:C1:38:FC:19:C8'})
22:55:49 ERROR [main] 1 exceptions occurred fetching BMSs
22:55:49 ERROR [main] Error (num 1, max 200) reading BMS: Device C8:47:8C:E9:0B:B0 not discovered. Make sure it in range and is not being controled by another application. ({'CB:20:58:55:39:6F', '56:E3:32:02:B0:0F', '14:BF:E5:9C:7F:73', '58:7E:61:4C:FD:E0', '04:B9:E3:4C:44:93', 'C4:CD:82:08:14:12', 'EE:34:53:3D:2D:59', '65:D9:97:4F:00:39', 'E9:AD:82:22:E4:4C', '56:05:57:46:39:E3', '24:A9:84:A1:92:70', '4D:70:D2:A3:DD:E3', 'A4:C1:38:FC:19:C8'})
22:55:49 ERROR [main] Stack: Traceback (most recent call last):
File "/app/bmslib/jikong.py", line 120, in connect
await super().connect(timeout=4)
File "/app/bmslib/bt.py", line 113, in connect
await self._connect_client(timeout=timeout)
File "/app/bmslib/bt.py", line 81, in _connect_client
await self.client.connect(timeout=timeout)
File "/usr/lib/python3.10/site-packages/bleak/__init__.py", line 531, in connect
return await self._backend.connect(**kwargs)
File "/usr/lib/python3.10/site-packages/bleak/backends/bluezdbus/client.py", line 135, in connect
raise BleakDeviceNotFoundError(
bleak.exc.BleakDeviceNotFoundError: Device with address C8:47:8C:E9:0B:B0 was not found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/app/main.py", line 36, in fetch_loop
await fn()
File "/app/main.py", line 264, in fn
raise exceptions[0]
File "/app/main.py", line 259, in fn
await t()
File "/app/bmslib/sampling.py", line 67, in __call__
return await self.sample()
File "/app/bmslib/sampling.py", line 86, in sample
async with bms:
File "/app/bmslib/bt.py", line 207, in __aenter__
await self.connect()
File "/app/bmslib/jikong.py", line 123, in connect
await self._connect_with_scanner(timeout=timeout)
File "/app/bmslib/bt.py", line 133, in _connect_with_scanner
raise Exception('Device %s not discovered. Make sure it in range and is not being controled by '
Exception: Device C8:47:8C:E9:0B:B0 not discovered. Make sure it in range and is not being controled by another application. ({'CB:20:58:55:39:6F', '56:E3:32:02:B0:0F', '14:BF:E5:9C:7F:73', '58:7E:61:4C:FD:E0', '04:B9:E3:4C:44:93', 'C4:CD:82:08:14:12', 'EE:34:53:3D:2D:59', '65:D9:97:4F:00:39', 'E9:AD:82:22:E4:4C', '56:05:57:46:39:E3', '24:A9:84:A1:92:70', '4D:70:D2:A3:DD:E3', 'A4:C1:38:FC:19:C8'})
22:55:50 INFO [sampling] connecting bms JKBt(C8:47:8C:E9:0B:B0)
I have issue about connection. After use with keep_alive function 1day or half day batmon cannot connect to BMS. Then I restart batmon, LED indicator of BMS like BMS is connected to batmon but from log it find a BMS bluetooth (that it cannot find BMS) then i disconnect bluetooth dongle from HA for 5 sec and plug in again sometime it work.