Trying to write a "gotolocation" automation for my Dreame Z10 Pro vacuum

I have a z10 Pro running valetudo. I’ve pretty much gotten it working, but I’m trying to figure out how to send the robot to a specific location. The docs state that this is accomplished by using the GoToLocationCapability over mqtt along with specific coordinates. I’ve been trying to figure out a script to accomplish this, but I’m having no luck (pretty new to HA). Here is the script I’m attempting:

alias: Send Vacuum to location
sequence:
  - service: mqtt.publish
    data:
      topic: valetudo/myvacuumidentifier/GoToLocationCapability/go/set 
      payload: "{
                   \"coordinates\": {
                       \"x\": 3264, 
                       \"y\": 3392 
                   } 
      }"
mode: single

If I had to guess, I think I’m maybe missing this portion mentioned in the docs:

Command response topic: <TOPIC PREFIX>/<IDENTIFIER>/GoToLocationCapability/go

but I couldn’t figure out how I was supposed to implement it after extensive googling and trying the few things that came into my head.

The “myvacuumidentifier” is just a stand in for the name set in valetudo mqtt settings. I’ve tried it camelcase and all lowercase. Any help with why this isn’t working would be greatly appreciated. Thanks

1 Like

Your script looks correct from an HA point of view - have you checked the logs on the vacuum to see if any command is actually reaching it at all? It will record a malformed payload fro example.

In my case, I just use the command topic as guided by the Valetudo MQTT Connectivity page in the robot’s settings menu, and it works for me:

in this case valetudo/valetudo_landing/GoToLocationCapability/go/set.

This may be irrelevant, but personally I would also avoid the headache of dealing with trying to escape the double-quotes by making the payload yaml multi-line, eliminating the need to surround it all in quotation marks:

payload: >
  {"coordinates": {"x": 3264, "y": 3392}}
1 Like

Do you know how to check if the vacuum received the command? Nothing showed up in the logs on the valetudo web interface, but I’m not sure if they would or not.

Thanks!

Looks like what I’m trying to do is supported by Valetduo, but not my Dreame Robot (according to this discussion), so looks like now way to make this work. Thanks for your help though!