rand256 / valetudo

Valetudo RE - experimental vacuum software, cloud free
Apache License 2.0
667 stars 73 forks source link

1 Gen. Zonal cleaning via MQTT #308

Closed DivanX10 closed 3 years ago

DivanX10 commented 3 years ago

Vacuum Model: Gen1

Valetudo Version: Valetudo RE 0.9.8

Additional context I have a MajorDoMo platform. How can I use MQTT to start zonal cleaning? Which path should be registered in MQTT so that zonal cleaning can be started? When I specified the path valetudo/rockrobo/command in MQTT and sent the locale command, the vacuum cleaner tells me where I am, but how to do the same, but with the insertion of coordinates or the name of the zone? The instructions on the WiKi do not contain this information. Please explain as a teapot with examples and clearly.

rand256 commented 3 years ago

See example here.

Send command "zoned_cleanup" to "custom_command" path. You can either use registered zone name as a string ("Foobar") to clean corresponding zone, or as a object ({id: "Baz", repeats: 2}) if you wish to also specify the number of iterations for the chosen zone. And to be able to select more than 5 zones at once on Gen1 devices, it is required to install version 0.9.8.1 of Valetudo RE.

DivanX10 commented 3 years ago

Thanks. I found the answer in the Valetudo telegram. How do I start zonal cleaning in Valetudo?

In MQTT, create valetudo/rockrobo/custom_command. In the custom_command property, insert this code {"command": "zoned_cleanup", "zone_ids": ["zone name"]}. If you need to remove several zones. Comma-separated ["Zone 1","Zone 2","Zone 3","Zone 4","Zone 5"].

For example:

If you need to remove 1 zone: {"command": "zoned_cleanup", "zone_ids": ["zone name"]}

If you need to remove 2 zones: {"command": "zoned_cleanup", "zone_ids": ["zone 1 name","zone 2 name"]}

If you need to remove 3 zones: {"command": "zoned_cleanup", "zone_ids": ["zone 1 name","zone 2 name","zone 3 name"]}

If you need to remove 4 zones: {"command": "zoned_cleanup", "zone_ids": ["zone 1 name","zone 2 name","zone 3 name","zone 4 name"]}

If you need to remove 5 zones: {"command": "zoned_cleanup", "zone_ids": ["zone 1 name","zone 2 name","zone 3 name","zone 4 name","zone 5 name"]}