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

Victron smart shunt connection error #159

Closed coil1002 closed 7 months ago

coil1002 commented 8 months ago

Can not get my smart shunt to connect same error every time. I have GAT enabled and am using the pin in configuration

20:28:22 ERROR [main] 1 exceptions occurred fetching BMSs 20:28:22 ERROR [main] Error (num 115, max 200) reading BMS: [org.bluez.Error.Failed] le-connection-abort-by-local 20:28:22 ERROR [main] Stack: Traceback (most recent call last): File "/app/main.py", line 38, in fetch_loop await fn() File "/app/main.py", line 315, in fn raise exceptions[0] File "/app/main.py", line 310, in fn await t() File "/app/bmslib/sampling.py", line 85, in __call__ return await self.sample() ^^^^^^^^^^^^^^^^^^^ File "/app/bmslib/sampling.py", line 107, in sample async with bms: File "/app/bmslib/bt.py", line 316, in __aenter__ await self.connect() File "/app/bmslib/models/victron.py", line 73, in connect await super().connect(timeout=timeout) File "/app/bmslib/bt.py", line 212, in connect await self._connect_client(timeout=timeout) File "/app/bmslib/bt.py", line 171, in _connect_client await asyncio.wait_for(self.client.connect(timeout=timeout), timeout=timeout + 1) File "/usr/lib/python3.11/asyncio/tasks.py", line 489, in wait_for return fut.result() ^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/bleak/backends/bluezdbus/client.py", line 359, in connect assert_reply(reply) File "/usr/lib/python3.11/site-packages/bleak/backends/bluezdbus/utils.py", line 23, in assert_reply raise BleakDBusError(reply.error_name, reply.body) bleak.exc.BleakDBusError: [org.bluez.Error.Failed] le-connection-abort-by-local

fl4p commented 8 months ago

Are you running this as a home assistant add-on inside a docker container?

coil1002 commented 8 months ago

I am running the generic x86 on a pc platform my jk and jbd both connect just not the victron

On Tue, Nov 7, 2023 at 4:48 AM Fabian @.***> wrote:

Are you running this as a home assistant add-on inside a docker container?

— Reply to this email directly, view it on GitHub https://github.com/fl4p/batmon-ha/issues/159#issuecomment-1798436782, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVDLDXUM33NQAECRAPFCVI3YDIU3LAVCNFSM6AAAAAA66A4PIKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJYGQZTMNZYGI . You are receiving this because you authored the thread.Message ID: @.***>

fl4p commented 7 months ago

what bleak version is it (you find it in the logs)

Bear30 commented 7 months ago

I have the same problem. My bleak version is 0.13.1a1

coil1002 commented 7 months ago

Sorry I missed that question I am running 0.13.1a1

fl4p commented 7 months ago

does it help if you enable install_newer_bleak in the batmon config?

Bear30 commented 7 months ago

with

- address: XX:XX:XX:XX:XX:XX
  type: victron
  alias: victron shunt
  pin: "000000"
  install_newer_bleak: True

it works. Thank you!!!

coil1002 commented 7 months ago

That did it thank you !!