Switchbot not working - still supported?

I get the distinct feeling that switchbot is no longer supported within Hassio. Is there any way to find out if this is the case?

I’m having issues with mine. This is the error. I have no idea where to start!

Thu Mar 07 2019 19:36:45 GMT+0000 (Greenwich Mean Time)
'NoneType' object has no attribute 'getServiceByUUID'
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/websocket_api/commands.py", line 148, in handle_call_service
    connection.context(msg))
  File "/usr/local/lib/python3.7/site-packages/homeassistant/core.py", line 1133, in async_call
    self._execute_service(handler, service_call))
  File "/usr/local/lib/python3.7/site-packages/homeassistant/core.py", line 1155, in _execute_service
    await handler.func(service_call)
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity_component.py", line 188, in handle_service
    self._platforms.values(), func, call, service_name
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/service.py", line 278, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/service.py", line 292, in _handle_service_platform_call
    await getattr(entity, func)(**data)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/switch/switchbot.py", line 48, in turn_on
    if self._device.turn_on():
  File "/usr/local/lib/python3.7/site-packages/switchbot/__init__.py", line 59, in turn_on
    return self._sendpacket(ON_KEY)
  File "/usr/local/lib/python3.7/site-packages/switchbot/__init__.py", line 45, in _sendpacket
    hand_service = self._device.getServiceByUUID(UUID)
AttributeError: 'NoneType' object has no attribute 'getServiceByUUID'

It lookes like you have an entry ‘getServiceByUUID’ that is invalid but was previously ignored. Fix your configuration.

mac and string are the only valid parameters.

This is my config for the switchbot:

switch:
  - platform: switchbot
    mac: 'MY:NN:NN:NN:NM:AC'
    name: Boiler bot

Pretty sure that I’m not doing anything wrong there.

I do not know if it matters, but their example uses lower case letters.

1 Like

Just reinstalled the switch, but using lower case letters for the mac (thought mac was case sensitive).

So far so good!

Still getting some errors in my log that it cant connect, but on the whole, seems more solid than it did before!

False alarm.

After a couple of restarts, I’m getting the same error again.

Shame - was working great for a couple of hours!

Just tried removing the name element too, but still no joy.

Getting this error on Hassio startup:

2019-03-08 14:23:44 ERROR (SyncWorker_14) [switchbot] Failed to connect to switchmate
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/switchbot/__init__.py", line 36, in _connect
    bluepy.btle.ADDR_TYPE_RANDOM)
  File "/usr/local/lib/python3.7/site-packages/bluepy/btle.py", line 353, in __init__
    self._connect(deviceAddr, addrType, iface)
  File "/usr/local/lib/python3.7/site-packages/bluepy/btle.py", line 402, in _connect
    "Failed to connect to peripheral %s, addr type: %s" % (addr, addrType))
bluepy.btle.BTLEException: Failed to connect to peripheral fe:f9:c3:5f:8f:f6, addr type: random

Something screwy is going on here.

I just updated Hassio from vsn 0.89.0 to 0.89.1 and switchbot is working again.

Just don’t understand what’s going on here!

A bug-fix in 0.89.1 likely.

I do not see 0.89.1 on the HA site.

Definitely there for me:

Hassio? I cannot check mine until this evening.

yup - Hassio

1 Like

This is absolutely messing with my noodle!

Just did a Hassio restart, and the switch is not working again! FFS

I’m getting the same error message on startup as above.

Well - I’ve given in!

I used the switchbot to turn my central heating on / off. TBH, it was never particularly the most reliable even when it was working.

I went and purchased a Hive Active Heating yesterday. Hopefully this will sort it…

I am also getting this issue with my 3 switchbots. It is very frustrating. any solutions?

Unfortunately, I gave up on mine. Just couldn’t get it working.

Can anyone else help with this?

I also have the Switchbot hub plus. Is there any way to use my three Switchbots with Home Assistant using their Hub then?

same problem here

and here

1 Like