andreasnuesslein / hass_teleco_daisy

Home Assistant custom component for Teleco Automation Daisy
MIT License
4 stars 3 forks source link

Shades not responding #13

Open Zappo-II opened 2 months ago

Zappo-II commented 2 months ago

Integration finds two devices, shades and light, none of them responds to user interaction (Lights on/off) (Shades Stop/Open)

Log just shows:

[140544049186560] 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 2763, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2806, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 999, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1071, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/cover/__init__.py", line 422, in async_stop_cover
    await self.hass.async_add_executor_job(ft.partial(self.stop_cover, **kwargs))
  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/teleco_daisy/cover.py", line 65, in stop_cover
    self._cover.stop_cover()
  File "/usr/local/lib/python3.12/site-packages/teleco_daisy.py", line 85, in stop_cover
    self._open_stop_close("stop")
  File "/usr/local/lib/python3.12/site-packages/teleco_daisy.py", line 97, in _open_stop_close
    return self.client.feed_the_commands(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/teleco_daisy.py", line 311, in feed_the_commands
    raise Exception(req_json)
Exception: {'MessageID': 'MQTT-000', 'MessageText': 'Errore Coda MQTT', 'MessageType': 'ERROR'}
Zappo-II commented 2 months ago

MQTT Error...??? Does your Integration require an MQTT Broker...???

osteward commented 2 months ago

I receive this error message also when trying to drive my cover - but it is intermittent. Sometimes it works, sometimes it doesn't. It seems to fail after I try and interact with the light (which always errors, for me - I am trying to troubleshoot this by adjusting the commands being sent.) A reboot typically fixes. My assumption is the light failure causes a broader error, which stops the cover working.

@Zappo-II I believe this error message is what is returned by the remote server, so nothing to do with the integration itself. It is just outputting the error code received

(As an example, when using Postman to interact with the API directly, I receive the following error for a different issue:

{
    "MessageID": "WS-100",
    "MessageText": "Body Error",
    "MessageType": "WARNING"
}

You may want to raise this issue in the underlying Python repository, here: https://github.com/andreasnuesslein/py-teleco-daisy

andreasnuesslein commented 2 months ago

MQTT Error...??? Does your Integration require an MQTT Broker...???

No????????. 🙄 Does your question require multiple questionmarks to be a question?

@Zappo-II please work on your netiquette. You're being rude. One questionmark suffices to signal a question.

The DaisyBox is an overall abysmal product. It often just doesn't work, also not with the official app, and on occasion it also does not understand the signals from the directly linked remote

Zappo-II commented 2 months ago

@osteward - Helpful, thank you...

@andreasnuesslein - Sorry, do always tripple period and tripple Questionmark things and was never considered to be rude before... BTW, I can not subscribe to your point of view that the DaisyBox behaves like you describe it but what I can say is that sometimes it reacts quite laggy...

andreasnuesslein commented 2 months ago

It was not just the questionmarks. It's also the extreme brevity of your message that painted that picture. But alright.

I've had the Daisy Box for a few months now and it works like 80-90% I'd say. so who knows. :shrug:

Can you go into that piece of code, and before the feed_the_command happens, have it print the actual payload? So around here . Beware that it might have sensitive information

AdamFiser commented 2 months ago

MQTT Error...??? Does your Integration require an MQTT Broker...???

Last week I accidentally encountered an MQTT error as well. But it occurred only in the mobile app. In HA it was functional.

We don't use mqtt = For me it's not a bug in the add-on

osteward commented 2 months ago

Even after fixing the issue with the lights I thought may have been the cause, I have continued to experience this issue intermittently. If I wait and try again a few seconds later, it sometimes will then work. Sometimes it takes several attempts.

I agree with @andreasnuesslein that the DaisyBox can be unstable. Using the vendor app, I sometimes receive the message 'cannot communicate with cloud' even though the connection is active and commands do not send. Others have reported similar behaviour on the app store. I wonder if the MQTT Error may be the same issue, just reported differently - i.e. with the raw error code, given interacting with the API. Resolving the issue in the app is similar - i.e. keep trying til it works, and it eventually will.

If so, there is likely nothing which can be done to solve, as it is a server issue.