Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cant press Dreame app shortcuts when robot is Sleeping #749

Open
MKlitgaard2 opened this issue Oct 8, 2024 · 16 comments
Open

Cant press Dreame app shortcuts when robot is Sleeping #749

MKlitgaard2 opened this issue Oct 8, 2024 · 16 comments
Assignees
Labels
bug Something isn't working question Further information is requested

Comments

@MKlitgaard2
Copy link

Describe the bug
I have 2 Dreame l10s ultra robots. I have created some shortcuts in the Dreame app and use them from HA. They show up in HA as controls and I just have to invoke the press command. I find this i easier than creating the whole automation in HA.
But often when the machines go into Sleeping state I cant perform the command, why? It always works from the dreame app. But I cant figure what the apps does to "wake" the devices.

To Reproduce

  1. Create a shortcut in the dreame app
  2. Try the command from HA
  3. Let the robot go to Sleeping mode try the command again

Expected behavior
That HA can start the shortcut every time.

Screenshots
image

Additional Information (please complete the following information)

  • Model Name dreame.vacuum.r2228o
  • Firmware: 4.3.9_3204
  • v2.0.0b16
@MKlitgaard2 MKlitgaard2 added bug Something isn't working question Further information is requested labels Oct 8, 2024
@Tasshack
Copy link
Owner

Tasshack commented Oct 9, 2024

Probably related to this.
#721

@MaKin211
Copy link

MaKin211 commented Oct 18, 2024

Same issue with me. Installed the integration two days ago and I start the shortcut with an automation at 00:31 and the first night it worked, the second it does not. What I noticed is the following:

  • After triggering the shortcut in home assistant it becomes unavailable
  • After reloading the integration it becomes available
  • After triggering the shortcut in home assistant it becomes unavailable

Other entities also become unavailable, not sure whether it’s linked though.

IMG_1155

@Tasshack
Copy link
Owner

Same issue with me. Installed the integration two days ago and I start the shortcut with an automation at 00:31 and the first night it worked, the second it does not. What I noticed is the following:

  • After triggering the shortcut in home assistant it becomes unavailable
  • After reloading the integration it becomes available
  • After triggering the shortcut in home assistant it becomes unavailable

Other entities also become unavailable, not sure whether it’s linked though.

IMG_1155

Related to this
#721

@MKlitgaard2
Copy link
Author

Now I have had some time to test if this can be related to #721.

  • I have two L10s Ultra.
  • I use a single script to trigger the two shortcuts. Sometimes one of the shortcuts works, but not the other one.
  • The shortcuts always work from the Dreame app.
  • The shortcut buttons in HA are disabled when the shortcuts don’t work.
  • I can always use the Start Auto Empty button from HA.

I can’t see how this can be related to network issues. But unfortunately, I can't find a pattern on when the issue occurs. Seems pretty random, apart from the robot needing to be docked for an hour or so before the issue occurs.

@MaKin211
Copy link

I also run the latest build of the integration being v2.0.0b16 and my robot is on the latest firmware version. The robot is connected via the dreame cloud, not the xiaomi cloud. Unfortunately the local connection does not work at all. I was not able to connect locally (although I can ping it etc.) so I had to set the integration to "prefer cloud".

The following happened today after triggering the shortcut via HASS:

Before 02:47 it was unavailable
At 02:47 I reloaded the integration
At 02:56 I triggered the shortcut via HASS, the vacuum started cleaning and the shortcut became unavailable again
At 07:45 I started emptying the dust collector (via the Dreame app)
At 07:45 the shortcut switched from unavailable to unknown (becoming available again)

This does not only relate to the shortcuts but also other entities like Start Auto Empty, Self Clean etc.

Happy to provide logs if it helps. There are no network issues as no other devices (e.g. another robot that is connected to the Xiaomi cloud instead of the Dreame cloud) behave oddly.

@vanislman
Copy link

I have the same issue with shortcuts. My shortcuts worked fine in HA for many months (since I bought the vacuum). The non-working shortcuts started most likely after my last HA upgrade to 2024.10.1 or to 2024.10.2.
dreame.vacuum.r2228o
Firmware: 4.3.9_3204
Current HA version 2024.10.2

@MaKin211
Copy link

MaKin211 commented Oct 18, 2024

Do you guys access it via the dreame cloud or xiaomi?

It appears that reloading the integration / device does not bring back the entities as I falsely claimed. The robot is sleeping and the shortcuts are gone. However, I can start cleaning from HA.

This applies to my L20s. I have another L10s and the issue does not yet occur there…

IMG_1163

@vanislman
Copy link

I have an L10S Ultra, and I believe I'm using the Dreame cloud integration (I use the Dreamehome app on my phone and everything - including shortcuts - works fine in the app. Regular controls like start/stop/home etc. work fine in HA too.
My shortcuts in HA are ALWAYS disabled - not just when the robot is sleeping.

@vanislman
Copy link

... and just after I sent the message above I checked HA - and now the shortcuts are enabled and working again. This is the first time since about 1 1/2 weeks.
I upgraded HA to the latest version 2024.10.3 today. Not sure if that fixed this issue? I'll post another message tomorrow if the shortcuts remain stable, or if they "come and go".

@Tasshack
Copy link
Owner

Can you try downgrading to the v2.0.0b15 because I have made some changes about how shortcuts are processed on the latest Beta?

@MaKin211
Copy link

Hi @Tasshack , I just switched to v2.0.0b15 and will let you know. Thank you.

@vanislman
Copy link

I just downgraded to v2.0.0b15 as well. Shortcuts all show up and are operational.

@MKlitgaard2
Copy link
Author

Hi,

I downgraded to v2.0.0b15 3 days ago. I havent had any issues with shortcut since :)

@MaKin211
Copy link

Me neither. :)

@Tasshack
Copy link
Owner

So I guess the last update broke it, I will review the changes and try to fix it, thanks for the feedback.

@kbullet
Copy link

kbullet commented Oct 24, 2024

@Tasshack FYI not sure if its related but I'm constantly getting the "Unable to discover the device over cloud" error each time i reload the integration or restart HA. Though apart from the shortcuts everything else loads up just fine. Doesn't seem to happen on v2.0.0b15

2024-10-24 18:27:55.812 WARNING (SyncWorker_43) [custom_components.dreame_vacuum.dreame.map] Send request map failed: Unable to discover the device over cloud
2024-10-24 18:27:55.819 ERROR (Thread-16005 (_api_task)) [root] Uncaught thread exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/threading.py", line 1073, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.12/threading.py", line 1010, in run
    self._target(*self._args, **self._kwargs)
  File "/config/custom_components/dreame_vacuum/dreame/protocol.py", line 112, in _api_task
    item[0](self._api_call(item[1], item[2], item[3]))
  File "/config/custom_components/dreame_vacuum/dreame/protocol.py", line 388, in <lambda>
    lambda api_response: callback(
                         ^^^^^^^^^
  File "/config/custom_components/dreame_vacuum/dreame/protocol.py", line 1206, in cloud_callback
    raise DeviceException("Unable to discover the device over cloud") from None
custom_components.dreame_vacuum.dreame.exceptions.DeviceException: Unable to discover the device over cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

5 participants