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
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?
Not as far as I know and I don’t believe it’s possible to root without disassembly.
It’s a pain as it’s the only robot in the range to have such great maps…
and mine crashed last week, my wife was using it and we have been swapping between floors using the backup maps. I think she left it looking for the docking station…which wasn’t there and it crashed in big style. I had to do a factory reset. Which meant finding the token again and re-finding all the relevant segment codes (took about 30mins). But would be great to just be able to carry out a restore function.
So alot info back and forth here,
What is the easiest way to get an s6 up and running now days? I guess that roborock app still is not supported, so going via mi home it is…?
Xiaomi app works with it, so does the roborock one, but you can’t use both at the same time.
To switch between them you have reset the WiFi, which resets the token I believe.
Personly prefer to use ours via homeasisstant. Its faster and more intuitive.
yeah i want to use it via homeassistant, but i cant get the token out of it if i have it connected to roborock now…?
i have to set it up with mi home, and then downgrade it with flolevac and get the token… or is it an easier way now?
Easiest way that I’ve found is to use the Xaomi mi home app version 5.4.49 and the token is in the txt file.
The roborock app gets the newer firmware quicker, but Mi home is more stable.