SSMCD / bluetti2mqtt

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

Error with last update #17

Closed denisb88 closed 1 year ago

denisb88 commented 1 year ago

2023-03-21 18:37:43 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 loop.run_forever() File "/usr/local/lib/python3.10/asyncio/base_events.py", line 600, in run_forever self._run_once() File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1896, in _run_once handle._run() File "/usr/local/lib/python3.10/asyncio/events.py", line 80, in _run self._context.run(self._callback, *self._args) File "/usr/local/lib/python3.10/site-packages/bluetti_mqtt/server_cli.py", line 100, in run sys.exit('Could not find the given devices to connect to')

Dengor1984 commented 1 year ago

And me too...

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.4.0 You are running the latest version of this add-on. System: Debian GNU/Linux 11 (bullseye) (aarch64 / raspberrypi4-64) Home Assistant Core: 2023.3.5 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 [20:44:45] INFO: Reading configuration settings... [20:44:47] INFO: Starting bluetti-mqtt... Scanning.... Found AC200M2242000434992: address DD:7B:53:EB:53:7B 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

SSMCD commented 1 year ago

Could not find the given devices to connect to

This happens sometimes, I think when the BT connection isn't closed cleanly. It will eventually reconnect, sometimes after a while. You can reset Bluetooth manually if you have access to the HAOS console with the command systemctl restart bluetooth or just reboot the host. Working on a solution.

@Dengor1984 Turn scan off in the configuration tab. Scanning is meant to be toggled on for initial configuration to find the bt mac address, then turned off. With the latest update, the addon is shutdown after the scan is performed.

PortInnovator commented 1 year ago

"With the latest update, the addon is shutdown after the scan is performed."

Thanks for your work and this additional information. I was wondering why it was stopping after upgrading tó 1.4.0. Now anything is working fine again. :-)

Dengor1984 commented 1 year ago

Could not find the given devices to connect to

This happens sometimes, I think when the BT connection isn't closed cleanly. It will eventually reconnect, sometimes after a while. You can reset Bluetooth manually if you have access to the HAOS console with the command systemctl restart bluetooth or just reboot the host. Working on a solution.

@Dengor1984 Turn scan off in the configuration tab. Scanning is meant to be toggled on for initial configuration to find the bt mac address, then turned off. With the latest update, the addon is shutdown after the scan is performed.

Thanks it's solved my issue!