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

New Daly Smart Bms Home Energy Storage #174

Open kitesurfer91 opened 6 months ago

kitesurfer91 commented 6 months ago

Hi, i have these new Daly bms for home storage:

https://www.dalybms.com/daly-smart-bms-home-energy-storage-lithium-battery-pack-8s-24v-16s-48v-100a150a-bms-product/

家储保护板_011

I can connect to bluetooth but it can't read the data. The bluetooth hardware is the same as common DALY BMS:

image

This is the log:

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/app/bmslib/models/daly.py", line 162, in _q sample = await self._fetch_futures.wait_for(command, self.TIMEOUT) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/bmslib/init.py", line 84, in wait_for raise asyncio.TimeoutError("timeout waiting for %s" % name) TimeoutError: timeout waiting for 147

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/app/bmslib/sampling.py", line 149, in call s = await self._sample_inner() ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/bmslib/sampling.py", line 222, in _sample_inner sample = await bms.fetch() ^^^^^^^^^^^^^^^^^ File "/app/bmslib/models/daly.py", line 176, in fetch status = await self._fetch_status() ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/bmslib/cache/mem.py", line 160, in _mem_cache_wrapper_async return await _inner_wrapper_async(cache_key_obj, args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/bmslib/cache/mem.py", line 131, in _inner_wrapper_async ret = await target(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/bmslib/models/daly.py", line 209, in _fetch_status response_data = await self._q(0x93) ^^^^^^^^^^^^^^^^^^^ File "/app/bmslib/models/daly.py", line 165, in _q raise TimeoutError( TimeoutError: timeout awaiting result 93, got 0/1 responses 15:04:10 INFO [sampling] battery1 bms debug data: {'r': None, 'buf': {}, 'rx': 17, 'tx': 15} 15:04:10 INFO [sampling] Bleak version 0.20.2 15:04:10 ERROR [main] 1 exceptions occurred fetching BMSs 15:04:10 ERROR [main] Error (num 2, max 200) reading BMS: timeout awaiting result 93, got 0/1 responses 15:04:10 ERROR [main] Stack: Traceback (most recent call last): File "/usr/lib/python3.11/asyncio/tasks.py", line 500, in wait_for return fut.result() ^^^^^^^^^^^^ asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/app/bmslib/init.py", line 81, in wait_for return await asyncio.wait_for(self._futures.get(name), timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/asyncio/tasks.py", line 502, in wait_for raise exceptions.TimeoutError() from exc TimeoutError

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/app/bmslib/models/daly.py", line 162, in _q sample = await self._fetch_futures.wait_for(command, self.TIMEOUT) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/bmslib/init.py", line 84, in wait_for raise asyncio.TimeoutError("timeout waiting for %s" % name) TimeoutError: timeout waiting for 147

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/app/main.py", line 43, in fetch_loop if await fn(): ^^^^^^^^^^ File "/app/main.py", line 357, in fn raise exceptions[0] File "/app/main.py", line 352, in fn await t() File "/app/bmslib/sampling.py", line 149, in call s = await self._sample_inner() ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/bmslib/sampling.py", line 222, in _sample_inner sample = await bms.fetch() ^^^^^^^^^^^^^^^^^ File "/app/bmslib/models/daly.py", line 176, in fetch status = await self._fetch_status() ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/bmslib/cache/mem.py", line 160, in _mem_cache_wrapper_async return await _inner_wrapper_async(cache_key_obj, args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/bmslib/cache/mem.py", line 131, in _inner_wrapper_async ret = await target(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/bmslib/models/daly.py", line 209, in _fetch_status response_data = await self._q(0x93) ^^^^^^^^^^^^^^^^^^^ File "/app/bmslib/models/daly.py", line 165, in _q raise TimeoutError( TimeoutError: timeout awaiting result 93, got 0/1 responses

15:04:11 INFO [main] fetch_loop <function main..fn at 0x7f866934c0> ends 15:04:11 INFO [main] All fetch loops ended. shutdown is already True 15:04:11 INFO [main] Disconnecting DalyBt(C7:7C:03:05:0A:82,battery1)

fl4p commented 6 months ago

Possibly related to https://github.com/fl4p/batmon-ha/issues/33