core: Error Connecting Switchbot Devices

The problem

After time, Bluetooth can’t connect switchbot devices.

What version of Home Assistant Core has the issue?

2022.9.0b0

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Core

Integration causing the issue

Switchbot

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.components.websocket_api.http.connection
Source: components/switchbot/switch.py:55
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 01:08:29 (8 occurrences)
Last logged: 01:10:25

[139869049714624] WoHand (D3:74:BD:C8:93:D8): Sending command failed (rssi=-71)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 200, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1738, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1775, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
    await service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 676, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 931, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 713, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/switchbot/switch.py", line 55, in async_turn_on
    self._last_run_success = bool(await self._device.turn_on())
  File "/usr/local/lib/python3.10/site-packages/switchbot/devices/bot.py", line 35, in turn_on
    return self._check_command_result(result, 0, {1, 5})
  File "/usr/local/lib/python3.10/site-packages/switchbot/devices/device.py", line 426, in _check_command_result
    raise SwitchbotOperationError(
switchbot.devices.device.SwitchbotOperationError: WoHand (D3:74:BD:C8:93:D8): Sending command failed (rssi=-71)

Additional information

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 46 (17 by maintainers)

Commits related to this issue

Most upvoted comments

All it’s ok now. I deleted ble integration and now works fine. No disconnects.

Thank you for your support.

For me is ok now untill the problem will be solved. I created an automation to recharge the Bluetooth integration when switchbot devices are unavailable. Runs ok.

I am gonna wait because 2022.9. beta 1 installed and from several hours its ok for now. If falls again I will try.