SSMCD / bluetti2mqtt

Home Assistant Add-on for bluetti_mqtt
Apache License 2.0
35 stars 11 forks source link

Trouble on Installation #13

Closed Alox-K closed 1 year ago

Alox-K commented 1 year ago

Hi, im new to Mqtt, sorry for basic question… I installed mosquitto and your add-on. In your config, i left The First Field emoty since it is mosquitto, as you mentioned there, First, I enabled “scan”, in the log tab my AC200M was shown after start. I copied the MAC address from there to config-tap. But every time I start the add on, I get

21:56:22] INFO: Reading configuration settings... [21:56:24] INFO: Starting bluetti-mqtt... Could not find the given devices to connect to 2023-03-08 21:56:32 ERROR Crashing with uncaught exception: Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/bluetti_mqtt/server_cli.py", line 87, in start

What did I do wrong?

Alox-K commented 1 year ago

Meanwhile I realised, that I need to enter mosquitto host and port in the configuration, unless there is said, you don’t need to. After entering both it went further but came to another error. any idea?

WARNING Could not determine BlueZ version, bluetoothctl not available, assuming 5.51+

SSMCD commented 1 year ago

That's not an error. Please post the entire log output from start to finish. What system are you running home assistant on?

Alox-K commented 1 year ago

Thanks for response. Here is the full log. Home Assistant is running on a Rasperry Pi, with this version: Home Assistant 2023.3.4 Supervisor 2023.03.1 Operating System 9.5 Frontend 20230309.0 - latest

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 cont-init: info: running /etc/cont-init.d/00-banner.sh

Add-on: Bluetti to MQTT MQTT bridge between Bluetti and Home Assistant

Add-on version: 1.2.1 You are running the latest version of this add-on. System: Home Assistant OS 9.5 (aarch64 / raspberrypi4-64) Home Assistant Core: 2023.3.4 Home Assistant Supervisor: 2023.03.1

Please, share the above information when looking for help or support in, e.g., GitHub, forums or the Discord chat.

cont-init: info: /etc/cont-init.d/00-banner.sh exited 0 cont-init: info: running /etc/cont-init.d/01-log-level.sh cont-init: info: /etc/cont-init.d/01-log-level.sh exited 0 s6-rc: info: service legacy-cont-init successfully started s6-rc: info: service legacy-services: starting s6-rc: info: service legacy-services successfully started [17:41:40] INFO: Reading configuration settings... [17:41:42] INFO: Starting bluetti-mqtt... 2023-03-14 17:41:50 INFO Connecting to MQTT broker... 2023-03-14 17:41:50 INFO Starting to poll clients... 2023-03-14 17:41:50 INFO Connecting to clients: ['E4:00:00:48:FC:F4'] 2023-03-14 17:41:50 WARNING Could not determine BlueZ version, bluetoothctl not available, assuming 5.51+ 2023-03-14 17:41:51 INFO Connected to MQTT broker 2023-03-14 17:41:51 INFO Sent discovery message of AC200M-2243002190757 to Home Assistant 2023-03-14 17:41:51 WARNING filtered_messages() is deprecated and will be removed in a future version. Use messages() together with Topic.matches() instead. 2023-03-14 17:42:10 ERROR Error connecting to device E4:00:00:48:FC:F4: Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/client.py", line 172, in connect reply = await self._bus.call( File "/usr/local/lib/python3.10/site-packages/dbus_fast/aio/message_bus.py", line 371, in call await future asyncio.exceptions.CancelledError During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/bluetti_mqtt/bluetooth/client.py", line 40, in run await self.client.connect() File "/usr/local/lib/python3.10/site-packages/bleak/init.py", line 471, in connect return await self._backend.connect(**kwargs) File "/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/client.py", line 171, in connect async with async_timeout.timeout(timeout): File "/usr/local/lib/python3.10/site-packages/async_timeout/init.py", line 129, in aexit self._do_exit(exc_type) File "/usr/local/lib/python3.10/site-packages/async_timeout/init.py", line 212, in _do_exit raise asyncio.TimeoutError asyncio.exceptions.TimeoutError 2023-03-14 17:42:11 INFO Retrying connection to E4:00:00:48:FC:F4 2023-03-14 17:42:24 ERROR Error connecting to device E4:00:00:48:FC:F4:

SSMCD commented 1 year ago

Please update to version 1.3.0. I added the bluez package to the image.

Alox-K commented 1 year ago

So great, thank you! I'ts working now!

Actually, there is still something wrong - here is the log. But after one or another login attempt, it's working!

Here is the latest 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 cont-init: info: running /etc/cont-init.d/00-banner.sh

Add-on: Bluetti to MQTT MQTT bridge between Bluetti and Home Assistant

Add-on version: 1.3.0 You are running the latest version of this add-on. System: Home Assistant OS 9.5 (aarch64 / raspberrypi4-64) Home Assistant Core: 2023.3.4 Home Assistant Supervisor: 2023.03.1

Please, share the above information when looking for help or support in, e.g., GitHub, forums or the Discord chat.

cont-init: info: /etc/cont-init.d/00-banner.sh exited 0 cont-init: info: running /etc/cont-init.d/01-log-level.sh cont-init: info: /etc/cont-init.d/01-log-level.sh exited 0 s6-rc: info: service legacy-cont-init successfully started s6-rc: info: service legacy-services: starting s6-rc: info: service legacy-services successfully started [18:19:10] INFO: Reading configuration settings... [18:19:13] INFO: Starting bluetti-mqtt... 2023-03-15 18:19:21 INFO Connecting to MQTT broker... 2023-03-15 18:19:21 INFO Starting to poll clients... 2023-03-15 18:19:21 INFO Connecting to clients: ['E4:00:00:48:FC:F4'] 2023-03-15 18:19:22 INFO Connected to MQTT broker 2023-03-15 18:19:22 INFO Sent discovery message of AC200M-2243002190757 to Home Assistant 2023-03-15 18:19:22 WARNING filtered_messages() is deprecated and will be removed in a future version. Use messages() together with Topic.matches() instead. 2023-03-15 18:19:37 ERROR Error connecting to device E4:00:00:48:FC:F4: Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/client.py", line 172, in connect reply = await self._bus.call( File "/usr/local/lib/python3.10/site-packages/dbus_fast/aio/message_bus.py", line 371, in call await future asyncio.exceptions.CancelledError During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/bluetti_mqtt/bluetooth/client.py", line 40, in run await self.client.connect() File "/usr/local/lib/python3.10/site-packages/bleak/init.py", line 471, in connect return await self._backend.connect(kwargs) File "/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/client.py", line 171, in connect async with async_timeout.timeout(timeout): File "/usr/local/lib/python3.10/site-packages/async_timeout/init.py", line 129, in aexit self._do_exit(exc_type) File "/usr/local/lib/python3.10/site-packages/async_timeout/init.py", line 212, in _do_exit raise asyncio.TimeoutError asyncio.exceptions.TimeoutError 2023-03-15 18:19:38 INFO Retrying connection to E4:00:00:48:FC:F4 2023-03-15 18:19:50 ERROR Error connecting to device E4:00:00:48:FC:F4: Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/client.py", line 172, in connect reply = await self._bus.call( File "/usr/local/lib/python3.10/site-packages/dbus_fast/aio/message_bus.py", line 371, in call await future asyncio.exceptions.CancelledError During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/bluetti_mqtt/bluetooth/client.py", line 40, in run await self.client.connect() File "/usr/local/lib/python3.10/site-packages/bleak/init.py", line 471, in connect return await self._backend.connect(kwargs) File "/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/client.py", line 171, in connect async with async_timeout.timeout(timeout): File "/usr/local/lib/python3.10/site-packages/async_timeout/init.py", line 129, in aexit self._do_exit(exc_type) File "/usr/local/lib/python3.10/site-packages/async_timeout/init.py", line 212, in _do_exit raise asyncio.TimeoutError asyncio.exceptions.TimeoutError 2023-03-15 18:19:51 INFO Retrying connection to E4:00:00:48:FC:F4 2023-03-15 18:19:56 INFO Connected to device: E4:00:00:48:FC:F4

Alox-K commented 1 year ago

Do you have some way to give a donation for your work?

SSMCD commented 1 year ago

Actually, there is still something wrong - here is the log. But after one or another login attempt, it's working!

If you enable Debug mode in the configuration tab it will display the RSSI in the log tab. Device might have poor signal strength.

Do you have some way to give a donation for your work?

Not at this time

Eyesupper commented 1 year ago

I have had issues connecting and found for me, do not use app on phone prior to trying to connect and unbind bluetti device if logged in via the app on phone, then restart bluetti device this may help with connection issues.