Start Roborock (with Valetudo) via Alexa voice command?

Hello there,

currently I can start my Valetudo (Roborock S50) via MQTT from my HA Dashboard. I made a card with this code:

show_name: true
show_icon: true
type: button
tap_action:
  action: call-service
  service: mqtt.publish
  target: {}
  data:
    qos: '0'
    topic: valetudo/roborock_s5/MapSegmentationCapability/clean/set
    payload: '{"segment_ids": ["21"], "iterations": 1, "customOrder": true}'
entity: switch.kuche_saugen
name: Küche saugen
show_state: false

That is working. But now, I want my alexa to run this.

My first idea was putting it in the configuration.yaml under the emulated_hue section:

emulated_hue:
  type: alexa
  host_ip: 10.11.1.100
  listen_port: 80
  expose_by_default: false
  entities:
    switch.kuche_saugen:
      name: "Küche saugen"
      hidden: false

Unfortunately, Alexa says “device does not react”. But the “emulate_hue” does work for other devices.

Any suggestion what my mistake here is?

Thank you

I believe your switch is supposed to change its state after turning it on and Alexa cannot confirm the state.

I would create a script and expose the script entity to emulated hue.

Btw, there is an native integration for roborock, you can give it a try

Thanks for your advice, I will try the script approach.

Yes, I have heard of the native integration, but I have also heard that some things don’t work with that yet.

Scripts are exposed directly to Alexa as Scenes. That’s how I control Valetudo.

1 Like

There is also custom integration from same developer with more functionality

Would you be so kind and explain that in a little more detail please? Or myabe give an example from your code?

If you’re using Nabu, create a script. Restart HA (maybe not required). That script is now available in the Alexa app as a ‘scene’ that you can call with an Alexa routine.

I don’t use Nabu, I have a domain setup with Cloudflare

Why don’t you follow the previous advice? Create a script, restart your HA and check new devices on echo and see if the script is available as scene?

Then you’ll have to figure it out. Sorry, no idea. Nabu makes it easy.

Update: I am now able to get Alexa to start my robot via voice command. But I am still not sure that I set it up correctly, since Alexa detects it as a lamp (and not a scene) and I have to say “Alexa, clean kitchen ON” (instead of just “Alexa, clean kitchen”).

In my configuration.yaml I have to entries for this:

mqtt:
  scene:
    - unique_id: saugen_kueche
      name: "Clean kitchen"
      command_topic: "valetudo/roborock_s5/MapSegmentationCapability/clean/set"
      payload_on: "{\"segment_ids\": [\"21\"], \"iterations\": 1, \"customOrder\": true}"

[...]

emulated_hue:
  type: alexa
  host_ip: 10.11.1.100
  listen_port: 80
  expose_by_default: false
  entities:
    scene.kuche_saugen:
      name: "Clean kitchen"
      hidden: false

Any ideas why I cannot get Alexa to detect that as a “scene” (and not a light)?

Emulated hue is supposed to manage lights and switches nothing more, so scenes are not exposed as scenes.

You can go by cloud based alexa integration and everything will be visible in more natural way.

1 Like

Thanks for your feedback, but that is not an option for me :wink:

OK, I have to ask, why don’t you use Assist from the beginning? :slight_smile: I mean, you are using Alexa, so it already is “not local”, but on the other hand you try to go local?! :thinking: Wouldn’t it be just easier to work with Assist?

Just asking, I don’t use Alexa, because I don’t want others to listen to my highly personal conversations. :face_with_hand_over_mouth: I mean, I might have a plan to rule the world, why share it with Jeff? He already rules so many parts of the world… :rofl: :rofl:

What is the reason, if not personal? You have already cloud enabled domain

I just don’t want to pay for NabuCasa.

And in the meantime I managed to set up the AWS / Alexa Console way, so my problem is solved. (Amazon Alexa - Home Assistant)

Thanks for all your advice.