Hi Everyone,
I use the switchbot integration and have my home-assistant connect directly to bots over bluetooth. As of the latest home-assistant or hassio update, none of the bots work. They’ve always been a bit a flaky (takes several attempts, sometimes fails). But as of this update, all the bots fail all the time. Any suggestions? Any help much appreciated.
Here are the versions:
arch armv7l
chassis embedded
dev false
docker true
docker_version 19.03.11
hassio true
host_os HassOS 4.14
installation_type Home Assistant OS
os_name Linux
os_version 4.19.127-v7
python_version 3.8.5
supervisor 247
timezone America/Los_Angeles
version 0.116.4
virtualenv false
Here’s the config:
- platform: switchbot
mac: 'C1:C8:XX:XX:XX:XX'
name: Living Room Light Switch
- platform: switchbot
mac: 'F2:D2:XX:XX:XX:XX'
name: Dining Room Light Switch
- platform: switchbot
mac: 'EF:5D:XX:XX:XX:XX'
name: Kitchen Light Switch
- platform: switchbot
mac: 'FB:AF:XX:XX:XX:XX'
name: Counter Light Switch
All the mac addresses are correct, they were unchanged since they were working. I also confirmed the bots work fine with the Switchbot app (which also connects directly over bluetooth).
Here are the logs:
2020-10-17 12:11:52 DEBUG (SyncWorker_20) [switchbot] Sending command to switchbot 570101
2020-10-17 12:11:52 DEBUG (SyncWorker_20) [switchbot] Connecting to Switchbot...
2020-10-17 12:11:53 DEBUG (SyncWorker_20) [switchbot] Failed connecting to Switchbot.
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/switchbot/__init__.py", line 45, in _connect
self._device = bluepy.btle.Peripheral(self._mac,
File "/usr/local/lib/python3.8/site-packages/bluepy/btle.py", line 391, in __init__
self._connect(deviceAddr, addrType, iface)
File "/usr/local/lib/python3.8/site-packages/bluepy/btle.py", line 439, in _connect
raise BTLEDisconnectError("Failed to connect to peripheral %s, addr type: %s" % (addr, addrType), rsp)
bluepy.btle.BTLEDisconnectError: Failed to connect to peripheral XX:XX:XX:XX:XX:XX, addr type: random
2020-10-17 12:11:53 WARNING (SyncWorker_20) [switchbot] Error talking to Switchbot.
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/switchbot/__init__.py", line 92, in _sendcommand
self._connect()
File "/usr/local/lib/python3.8/site-packages/switchbot/__init__.py", line 45, in _connect
self._device = bluepy.btle.Peripheral(self._mac,
File "/usr/local/lib/python3.8/site-packages/bluepy/btle.py", line 391, in __init__
self._connect(deviceAddr, addrType, iface)
File "/usr/local/lib/python3.8/site-packages/bluepy/btle.py", line 439, in _connect
raise BTLEDisconnectError("Failed to connect to peripheral %s, addr type: %s" % (addr, addrType), rsp)
bluepy.btle.BTLEDisconnectError: Failed to connect to peripheral XX:XX:XX:XX:XX:XX, addr type: random
2020-10-17 12:11:53 WARNING (SyncWorker_20) [switchbot] Cannot connect to Switchbot. Retrying (remaining: 3)...
2020-10-17 12:11:53 DEBUG (SyncWorker_20) [switchbot] Sending command to switchbot 570101
2020-10-17 12:11:53 DEBUG (SyncWorker_20) [switchbot] Connecting to Switchbot...
2020-10-17 12:11:53 DEBUG (SyncWorker_20) [switchbot] Failed connecting to Switchbot.
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/switchbot/__init__.py", line 45, in _connect
self._device = bluepy.btle.Peripheral(self._mac,
File "/usr/local/lib/python3.8/site-packages/bluepy/btle.py", line 391, in __init__
self._connect(deviceAddr, addrType, iface)
File "/usr/local/lib/python3.8/site-packages/bluepy/btle.py", line 439, in _connect
raise BTLEDisconnectError("Failed to connect to peripheral %s, addr type: %s" % (addr, addrType), rsp)
bluepy.btle.BTLEDisconnectError: Failed to connect to peripheral XX:XX:XX:XX:XX:XX, addr type: random
2020-10-17 12:11:53 WARNING (SyncWorker_20) [switchbot] Error talking to Switchbot.
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/switchbot/__init__.py", line 92, in _sendcommand
self._connect()
File "/usr/local/lib/python3.8/site-packages/switchbot/__init__.py", line 45, in _connect
self._device = bluepy.btle.Peripheral(self._mac,
File "/usr/local/lib/python3.8/site-packages/bluepy/btle.py", line 391, in __init__
self._connect(deviceAddr, addrType, iface)
File "/usr/local/lib/python3.8/site-packages/bluepy/btle.py", line 439, in _connect
raise BTLEDisconnectError("Failed to connect to peripheral %s, addr type: %s" % (addr, addrType), rsp)
bluepy.btle.BTLEDisconnectError: Failed to connect to peripheral XX:XX:XX:XX:XX:XX, addr type: random