libdyson-wg / ha-dyson

Home Assistant custom integration for Wi-Fi connected Dyson devices
MIT License
208 stars 23 forks source link

Can’t turn on/off Dyson Pure #161

Closed oneseventhree closed 3 weeks ago

oneseventhree commented 1 month ago

I keep getting this error when I try and turn it off and on even though all the sensors are working:

image

Log shows:

Log details (ERROR)

Logger: homeassistant.components.websocket_api.http.connection
Source: components/websocket_api/commands.py:241
integration: Home Assistant WebSocket API ([documentation](https://www.home-assistant.io/integrations/websocket_api), [issues](https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+websocket_api%22))
First occurred: 10:52:43 PM (5 occurrences)
Last logged: 10:55:22 PM

[140040329476800] Unexpected exception
[140040332143936] Unexpected exception
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 241, in handle_call_service
    response = await hass.services.async_call(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2741, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2784, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 977, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1049, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/fan/__init__.py", line 328, in async_handle_turn_on_service
    await self.async_turn_on(percentage, preset_mode, **kwargs)
  File "/usr/src/homeassistant/homeassistant/components/fan/__init__.py", line 337, in async_turn_on
    await self.hass.async_add_executor_job(
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/dyson_local/fan.py", line 166, in turn_on
    self._device.turn_on()
  File "/config/custom_components/dyson_local/vendor/libdyson/dyson_pure_cool_link.py", line 52, in turn_on
    self._set_configuration(fmod="FAN")
  File "/config/custom_components/dyson_local/vendor/libdyson/dyson_device.py", line 324, in _set_configuration
    raise DysonNotConnected
custom_components.dyson_local.vendor.libdyson.exceptions.DysonNotConnected
son1cn commented 1 month ago

I am having the same issue as of this morning, but none of the sensors are working either. Seems the integration is having issues

dotvezz commented 1 month ago

@son1cn are you also seeing the same errors in the logs?

The error in the log that @oneseventhree shared is... interesting, it only happens when the device is no longer connected to wifi, or no longer reachable over the network.

son1cn commented 1 month ago

@dotvezz I saw the same thing pop up on the bottom of the screen but can't find anything similar in the logs.

After you mentioned Wifi, I tried the Dyson app and my fan was not appearing either. I then checked my network controller and it was not getting an address for whatever reason.

Simple power reset, it has an address again, and it is back online. Thanks!

shamasis commented 4 weeks ago

Something is off in past 1-2 weeks. All Dyson entities simply stop responding - some unknown error.

Restarting HA solves the problem.

oneseventhree commented 3 weeks ago

I deleted the integration - and readded it but WITHOUT the MyDyson credentials. I just used the Wifi Sticker on the fan and it seems to all work now :)