Roborock Q7 Integration using Node Red

Hi all -

I’m having an issue getting NodeRed to trigger my vac.

What I’m looking to do is have a keypress on my Inovelli switches in each room (i.e. double click) call the Roborock Q7 Max to the room and clean that room only.

I was able to to all the initial steps (get room numbers via logs, etc.) and was able to make this happen via Developer Tools → Call Service using "app_segment_clean with the following YAML output.

service: vacuum.send_command
target:
  entity_id: vacuum.roborock_q7_max
data:
  command: app_segment_clean
  params: 27

This works.

So then moving this into Node Red, I have the following:

And the Data field looks like this:

{
  "service": "vacuum.send_command",
  "target": {
    "entity_id": "vacuum.roborock_q7_max"
  },
  "data": {
    "command": "app_segment_clean",
    "params": 27
  }
}

But produces this error:

image

The best I can find on this error is a mismatch between NR and HA versions, but everything seems to be up to date. I’ve deleted the “service” lines and that didn’t work.

I’m assuming something is wrong with my JSON code. Can anyone offer any assistance?

So below I’ve highlighted what NR is seeing as extra keys

image

In yellow you already have the service defined in the drop down, so service in the data section is extra.

In blue you also have already definded the entity, so target: - entity is extra.

Finally in orange, data, this is also defined data

So what we are left with is

{
   "command":"app_segment_clean",
   "params": 27
}

And that is all you need in the data section.

That worked, thank you very much.