Open
Description
some log tail
14:03:49 INFO [sampling] connecting bms JKBt(C8:47:80:51:F7:9B,battery1)
14:03:52 INFO [sampling] connected bms JKBt(C8:47:80:51:F7:9B,battery1)!
14:03:58 INFO [sampling] battery1: BmsSampl(97.6%,U=29.1V,I=0.00A,P=0W,Q=103/105Ah,mos=22°C)
14:03:58 INFO [sampling] battery1 volt=[3637,3641,3641,3641,3640,3640,3640,3638] temp=[17.5, 17.8, nan, nan]
14:04:58 INFO [sampling] battery1: BmsSampl(97.6%,U=29.1V,I=0.00A,P=0W,Q=103/105Ah,mos=22°C)
14:04:58 INFO [sampling] battery1 volt=[3642,3641,3640,3641,3640,3640,3636,3641] temp=[17.5, 17.75, nan, nan]
14:04:58 INFO [sampling] Sending HA discovery for battery1 (num_samples=272)
14:05:48 WARNING [bt] BMS JKBt(C8:47:80:51:F7:9B,battery1) disconnected after 117.8s!
14:05:48 INFO [sampling] connecting bms JKBt(C8:47:80:51:F7:9B,battery1)
14:05:48 INFO [jikong] battery1 normal connect failed ([org.bluez.Error.Failed] Input/output error), connecting with scanner
14:05:48 ERROR [sampling] battery1 error (#1): No powered Bluetooth adapters found.
Traceback (most recent call last):
File "/app/bmslib/models/jikong.py", line 129, in connect
await super().connect(timeout=6)
File "/app/bmslib/bt.py", line 240, in connect
await self._connect_client(timeout=timeout)
File "/app/bmslib/bt.py", line 189, in _connect_client
await asyncio.wait_for(self.client.connect(timeout=timeout), timeout=timeout + 1)
File "/usr/lib/python3.12/asyncio/tasks.py", line 520, in wait_for
return await fut
^^^^^^^^^
File "/app/venv/lib/python3.12/site-packages/bleak/__init__.py", line 531, in connect
return await self._backend.connect(**kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/venv/lib/python3.12/site-packages/bleak/backends/bluezdbus/client.py", line 244, in connect
assert_reply(reply)
File "/app/venv/lib/python3.12/site-packages/bleak/backends/bluezdbus/utils.py", line 22, in assert_reply
raise BleakDBusError(reply.error_name, reply.body)
bleak.exc.BleakDBusError: [org.bluez.Error.Failed] Input/output error
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/app/bmslib/sampling.py", line 155, in __call__
s = await self._sample_inner()
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/bmslib/sampling.py", line 229, in _sample_inner
async with bms:
^^^
File "/app/bmslib/bt.py", line 348, in __aenter__
await self.connect()
File "/app/bmslib/models/jikong.py", line 132, in connect
await self._connect_with_scanner(timeout=timeout)
File "/app/bmslib/bt.py", line 264, in _connect_with_scanner
await scanner.start()
File "/app/venv/lib/python3.12/site-packages/bleak/__init__.py", line 182, in start
await self._backend.start()
File "/app/venv/lib/python3.12/site-packages/bleak/backends/bluezdbus/scanner.py", line 179, in start
adapter_path = manager.get_default_adapter()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/venv/lib/python3.12/site-packages/bleak/backends/bluezdbus/manager.py", line 307, in get_default_adapter
raise BleakError("No powered Bluetooth adapters found.")
bleak.exc.BleakError: No powered Bluetooth adapters found.
14:05:48 INFO [sampling] battery1 bms debug data: {'resp': {3: (bytearray(b"U\xaa\xeb\x90\x03\xa5JK_B2A8S30P\x00\x00\x00\x00\x0015A\x00\x00\x00\x00\x0015.26\x00\x00\x00\xcc\xe4\x11\x01\x04\x00\x00\x00404304A0025\x00\x00\x00\x00\x001234\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00240724\x00\x00404304A0025\x00000\x00JK-BMS\x00\x00\x00\x00\x00\x00\x00\x00\x00\x005696\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00JK-BMS\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfe\xff\xff\xff\x9f\xe9\x07\x02\x00\x00\x00\x00\x90\x1f\x00\x00\x00\x00\xc0\xd8\xe7\xf7<\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdf\'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdf\x0f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xdf\'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\t\x08\x00\x01d\x00\x00\x00_\x00\x00\x00<\x00\x00\x002\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x0e\x00\x0022\x01\x1e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfe\x9fi\x9f\x0f\x00\x00\x00\x00\x00\x00\x00\x10"), 1739790231.376003), 1: (bytearray(b'U\xaa\xeb\x90\x01\xbf\xac\r\x00\x00\x14\n\x00\x00<\n\x00\x00B\x0e\x00\x00\xfc\r\x00\x00\x03\x00\x00\x00\x06\x0e\x00\x00(\n\x00\x00\x10\x0e\x00\x00\xac\r\x00\x00\xc4\t\x00\x00@\x9c\x00\x00<\x00\x00\x00<\x00\x00\x00\xe0\x93\x04\x00,\x01\x00\x00<\x00\x00\x00\x05\x00\x00\x00\xd0\x07\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\x08\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00(\x9a\x01\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\x00\x9f$\x00\x90\x00<2d\xfe\xff\xff\xff\x9f\xe9\x07\x02\x00\x00\x00\x00\xdd'), 1739790231.076826), 2: (bytearray(b'U\xaa\xeb\x90\x02\x949\x0e8\x0e4\x0e:\x0e;\x0e:\x0e8\x0e9\x0e\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\xff\x00\x00\x008\x0e\x07\x00\x00\x022\x004\x003\x003\x003\x002\x002\x004\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\xdf\x00\x00\x00\x00\x00\xc3q\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\xb2\x00\x00\x00\x00\x00\xcb\xf7\x02bs\x90\x01\x00(\x9a\x01\x00\x19\x00\x00\x00R\x1f(\x00d\x00\x00\x00\xda\xe5\x11\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\x00\x01\x00\x00\x00\x18\x04\x00\x00\x00\x00\xe5\xb0B@\xb1\x00\x00\x00`\x0b\x00\x00\x00\x01\x01\x01\x00\x06\x01\x00h\x94\xc0\x07\x00\x00\x00\x00\xdf\x000\xf80\xf8&\x04=u\xc6\x00{\x04\x00\x00@~\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfe\xff\x7f\xdc/\x01\x01\x81\x07\x00\x00\x00\xb4'), 1739790348.1187325)}, 'char_w': <bleak.backends.bluezdbus.characteristic.BleakGATTCharacteristicBlueZDBus object at 0x7fde37261070>, 'char_r': <bleak.backends.bluezdbus.characteristic.BleakGATTCharacteristicBlueZDBus object at 0x7fde3721e8a0>}
14:05:48 INFO [sampling] battery1 device info: DeviceInfo(JK_B2A8S30P,hw-15A,sw-15.26,404304A0025,#404304A0025)
14:05:48 INFO [sampling] Bleak version 0.20.2
14:05:48 ERROR [main] Error (num 1, max 200) reading BMS: No powered Bluetooth adapters found.
14:05:48 ERROR [main] Stack: Traceback (most recent call last):
File "/app/bmslib/models/jikong.py", line 129, in connect
await super().connect(timeout=6)
File "/app/bmslib/bt.py", line 240, in connect
await self._connect_client(timeout=timeout)
File "/app/bmslib/bt.py", line 189, in _connect_client
await asyncio.wait_for(self.client.connect(timeout=timeout), timeout=timeout + 1)
File "/usr/lib/python3.12/asyncio/tasks.py", line 520, in wait_for
return await fut
^^^^^^^^^
File "/app/venv/lib/python3.12/site-packages/bleak/__init__.py", line 531, in connect
return await self._backend.connect(**kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/venv/lib/python3.12/site-packages/bleak/backends/bluezdbus/client.py", line 244, in connect
assert_reply(reply)
File "/app/venv/lib/python3.12/site-packages/bleak/backends/bluezdbus/utils.py", line 22, in assert_reply
raise BleakDBusError(reply.error_name, reply.body)
bleak.exc.BleakDBusError: [org.bluez.Error.Failed] Input/output error
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/app/main.py", line 37, in fetch_loop
if await fn():
^^^^^^^^^^
File "/app/bmslib/sampling.py", line 155, in __call__
s = await self._sample_inner()
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/bmslib/sampling.py", line 229, in _sample_inner
async with bms:
^^^
File "/app/bmslib/bt.py", line 348, in __aenter__
await self.connect()
File "/app/bmslib/models/jikong.py", line 132, in connect
await self._connect_with_scanner(timeout=timeout)
File "/app/bmslib/bt.py", line 264, in _connect_with_scanner
await scanner.start()
File "/app/venv/lib/python3.12/site-packages/bleak/__init__.py", line 182, in start
await self._backend.start()
File "/app/venv/lib/python3.12/site-packages/bleak/backends/bluezdbus/scanner.py", line 179, in start
adapter_path = manager.get_default_adapter()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/venv/lib/python3.12/site-packages/bleak/backends/bluezdbus/manager.py", line 307, in get_default_adapter
raise BleakError("No powered Bluetooth adapters found.")
bleak.exc.BleakError: No powered Bluetooth adapters found.
14:05:49 INFO [sampling] connecting bms JKBt(C8:47:80:51:F7:9B,battery1)
14:05:51 INFO [sampling] connected bms JKBt(C8:47:80:51:F7:9B,battery1)!
14:06:59 INFO [sampling] battery1: BmsSampl(97.6%,U=29.1V,I=0.00A,P=0W,Q=103/105Ah,mos=22°C)
14:06:59 INFO [sampling] battery1 volt=[3638,3642,3645,3638,3637,3642,3641,3641] temp=[17.5, 17.7, nan, nan]
14:07:48 WARNING [bt] BMS JKBt(C8:47:80:51:F7:9B,battery1) disconnected after 118.0s!
14:07:48 INFO [sampling] connecting bms JKBt(C8:47:80:51:F7:9B,battery1)
14:07:50 INFO [sampling] connected bms JKBt(C8:47:80:51:F7:9B,battery1)!
Not that it bothers me much, but it might be useful for developers (I'm not good at this)
Metadata
Assignees
Labels
No labels
Activity