Thanks for the work you have done here but I have to ask, in what files should I insert the code you have provided here?
input_select into your configuartion.yaml
shell_command into your configuration.yaml
automation into your automation.yaml
If your are using the “default” config…
Thank you @Dielee
Now I just need to figure out why I only can find 2 rooms with the miio command. 18 and 19 is the ones but should be 2 more.
Pls show me a screenshot from your mihome app.
Oh, okay, i don’t have an S6.
Maybe try and error could help.
Test 18 and 19. If they work, try 16,17,20,21 and so on.
My numbers are: 16,17,18,19,20,21,22
Robo did redraw the map and then I have all my rooms from number 1 and forward
Easy
I don’t think any of this works if you host home assistant within a docker container?
I tried installing miio command line with npm-get via BASH but I can’t work out how.
I have the token and the mirobo is working through BASH and HA. Just can’t use any of your scripts which I would really like to.
Any help would be great.
Thanks
I have installed HA with virtualenv, not with docker.
Can’t help you, sorry!
no problem, I’ll work it out eventually
For anyone else, I’m doing this on with home assistant installed in a docker container on a synology NAS
To install miio, first you need to install Node.js_v8 from package center. Then follow https://community.synology.com/enu/forum/14/post/124087
to make it usable from ssh into diskstation.
python-miio can be installed via terminal BASH
I can now use miio to clean rooms via cli
My next task is to get homeassistant to talk to diskstation out of the docker container…
Eventually I found a way of making it work within the docker container.
There is no need to use
shell_command: miio protocol call app_segment_clean
You can call it straight from a script using mirobo
vacuum_kitchen:
alias: "Vacuum Kitchen"
sequence:
- service: vacuum.send_command
data:
entity_id: vacuum.xiaomi_vacuum_cleaner
command: app_segment_clean
params: [19]
I’ve used the card designed by @gurbina93 (thank you, it’s great)
and just replaced the coordinates in the scripts with the above.
Thank you @Dielee for your work on this, it’s a nice easy feature to use.
Thanks for this info!
Switched to direct call from component, yet!
So, to clarify, the Roborock S6 is supported by miio which can be executed from shell command by Home Assistant, isn’t?
Yes.
I have this device and using the shell commands for cleaning. But I don’t use a docker container.
i am getting error when trying to send the command via npm:
“Method app_segment_clean
is not supported”
Hello everyone.
Has anyone been able to use zone cleanup within Home Assistant for an 1S, rather than area cleanup?
My idea would be to have an area for the whole room, but still be able to vacuum a smaller area by using coordinates the old way.
Thanks in advance for your help.
Hi @Dielee ,
I copied your automation code but I keep getting an error;
Nov 28 15:11:04 HomeAutomation systemd[1]: Started Home Assistant.
Nov 28 15:11:13 HomeAutomation hass[969]: 2019-11-28 15:11:13 ERROR (SyncWorker_0) [homeassistant.util.yaml.loader] mapping values are not allowed here
Nov 28 15:11:13 HomeAutomation hass[969]: in “/root/.homeassistant/automations.yaml”, line 3, column 17
Nov 28 15:11:13 HomeAutomation hass[969]: 2019-11-28 15:11:13 ERROR (MainThread) [homeassistant.bootstrap] Error loading /root/.homeassistant/configuration.yaml: mapping values are not allowed here
Nov 28 15:11:13 HomeAutomation hass[969]: in “/root/.homeassistant/automations.yaml”, line 3, column 17
Nov 28 15:11:13 HomeAutomation hass[969]: 2019-11-28 15:11:13 INFO (MainThread) [homeassistant.core] Starting Home Assistant
Nov 28 15:11:13 HomeAutomation hass[969]: 2019-11-28 15:11:13 INFO (MainThread) [homeassistant.core] Timer:starting
Below is my automation.yaml
automation:
name: zonedcleanup
initial_state: True
trigger:
- platform: state
entity_id: input_select.zone_cleanup
action:
- service_template: >
{% if trigger.to_state.state == 'Study' %}
shell_command.clean_study
{% elif trigger.to_state.state == 'Theatre' %}
shell_command.clean_theatre
{% elif trigger.to_state.state == 'Living Room' %}
shell_command.clean_living
{% elif trigger.to_state.state == 'Bedroom' %}
shell_command.clean_bedroom
{% elif trigger.to_state.state == 'Kitchen' %}
shell_command.clean_kitchen
{% elif trigger.to_state.state == 'Living Room + Kitchen' %}
shell_command.clean_livingkitch
{% elif trigger.to_state.state == 'Toilet'%}
shell_command.clean_toilet
{% elif trigger.to_state.state == 'House'%}
shell_command.clean_house
{% endif %}
- delay: '00:00:30'
- service: input_select.select_option
data:
entity_id: input_select.zone_cleanup
option: 'Select...'
I’m not using this script anymore.
Try this :
automation.yaml:
- alias: 'Raumzuweisung'
initial_state: True
trigger:
- platform: state
entity_id: input_select.zone_cleanup
action:
- service: script.turn_on
data_template:
entity_id: >
{% if trigger.to_state.state == 'Wohnzimmer' %}
script.clean_wohnzimmer
{% elif trigger.to_state.state == 'Küche' %}
script.clean_kuche
{% elif trigger.to_state.state == 'Badezimmer' %}
script.clean_badezimmer
{% elif trigger.to_state.state == 'Flur' %}
script.clean_flur
{% elif trigger.to_state.state == 'Schlafzimmer' %}
script.clean_schlafzimmer
{% elif trigger.to_state.state == 'Wohnzimmer + Küche'%}
script.clean_wohnkuche
{% elif trigger.to_state.state == 'Essecke + Küche'%}
script.clean_essekuche
{% elif trigger.to_state.state == 'Wohnbereich'%}
script.clean_essewohnkuche
{% elif trigger.to_state.state == 'Essecke'%}
script.clean_esse
{% elif trigger.to_state.state == 'Wohnzimmer + Essecke'%}
script.clean_essewohn
{% endif %}
- delay: '00:00:30'
- service: input_select.select_option
data:
entity_id: input_select.zone_cleanup
option: 'Wähle...'
script.yaml sample:
clean_wohnkuche:
sequence:
- service: vacuum.send_command
data:
entity_id: vacuum.xiaomi
command: app_segment_clean
params: [17,18]
Thanks mate! Its all working now.
Are you able to download map from Roborock S6 if it is not rooted?