Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Roborock S7 - Command to auto-empty in Dock #57

Closed
serotonie opened this issue Feb 1, 2022 · 6 comments
Closed

Roborock S7 - Command to auto-empty in Dock #57

serotonie opened this issue Feb 1, 2022 · 6 comments

Comments

@serotonie
Copy link

Hi,

I have the S7+ (with auto-empty dock) and i'm looking for the command to start the emptying.

Could you guide me in the process of reverse engineering it (if the command is not allready known) ?

Thanks for the great work !

@marcelrv
Copy link
Owner

marcelrv commented Feb 5, 2022

Don't think all commands are all documented yet, but the known (to me) commands for the S7 are

I would start with testing e.g. set_dust_collection_mode

The simplest way to reverse engineer is to install a hacked mihome app, (e.g. vevs version) that can log the commands send to the device. Then e.g. start your emptying in the app, and then check what commands were used. You can than replay those commands with other apps (e.g. openhab/python-miio etc)

            "set_clean_motor_mode",
            "set_camera_status",
            "set_ignore_carpet_zone",
            "set_clean_sequence",
            "set_homesec_password",
            "set_child_lock_status",
            "set_carpet_clean_mode",
            "set_ignore_identify_area",
            "set_dust_collection_switch_status",
            "set_map_beautification_status",
            "set_fan_motor_work_timeout",
            "set_mop_motor_status",
            "set_collision_avoid_status",
            "set_flow_led_status",
            "set_dust_collection_mode",
            "set_custom_mode",
            "set_water_box_custom_mode",
            "set_timer",
            "set_dnd_timer",
            "set_timezone",
            "set_app_timezone",
            "set_carpet_mode",
            "set_lab_status",
            "set_server_timer",
            "set_fds_endpoint",
            "set_led_status",
            "set_customize_clean_mode",
            "set_mop_mode",
            "set_airdry_hours",
            "set_timer_dup",
            "set_map_name",
            "set_multi_map_timer_different_map_tip",
            "set_multi_map_timer_switch_different_map_tip",
            "set_multi_map_timer_different_map_save_tip"

or the similar model

            "set_custom_mode",
            "set_water_box_custom_mode",
            "set_timer",
            "set_dnd_timer",
            "set_timezone",
            "set_app_timezone",
            "set_carpet_mode",
            "set_lab_status",
            "set_server_timer",
            "set_fds_endpoint",
            "set_led_status",
            "set_customize_clean_mode",
            "set_clean_motor_mode",
            "set_camera_status",
            "set_ignore_carpet_zone",
            "set_clean_sequence",
            "set_homesec_password",
            "set_child_lock_status",
            "set_carpet_clean_mode",
            "set_ignore_identify_area",
            "set_dust_collection_switch_status",
            "set_map_beautification_status",
            "set_fan_motor_work_timeout",
            "set_mop_motor_status",
            "set_collision_avoid_status",
            "set_flow_led_status",
            "set_dust_collection_mode",
            "set_mop_mode",
            "set_airdry_hours",
            "set_timer_dup",
            "set_map_name",
            "set_multi_map_timer_different_map_tip",
            "set_multi_map_timer_switch_different_map_tip",
            "set_multi_map_timer_different_map_save_tip",
            "get_clean_motor_mode",
            "get_prop",
            "get_status",
            "get_map",
            "get_map_v1",
            "get_map_v2",
            "get_custom_mode",
            "get_water_box_custom_mode",
            "get_clean_summary",
            "get_clean_record",
            "get_clean_record_map",
            "get_clean_record_map_v2",
            "get_consumable",
            "get_timer",
            "get_dnd_timer",
            "get_serial_number",
            "get_log_upload_status",
            "get_sound_progress",
            "get_current_sound",
            "get_timezone",
            "get_carpet_mode",
            "get_sound_volume",
            "get_fw_features",
            "get_fresh_map",
            "get_persist_map",
            "get_room_mapping",
            "get_recover_maps",
            "get_recover_map",
            "get_map_status",
            "get_segment_status",
            "get_server_timer",
            "get_network_info",
            "get_led_status",
            "get_customize_clean_mode",
            "get_multi_maps_list",
            "get_multi_map",
            "get_photo",
            "get_camera_status",
            "get_timer_summary",
            "get_timer_detail",
            "get_testid",
            "get_clean_sequence",
            "get_turn_server",
            "get_device_sdp",
            "get_device_ice",
            "get_homesec_connect_status",
            "get_child_lock_status",
            "get_carpet_clean_mode",
            "get_random_pkey",
            "get_dust_collection_switch_status",
            "get_map_beautification_status",
            "get_fan_motor_work_timeout",
            "get_mop_motor_status",
            "get_collision_avoid_status",
            "get_flow_led_status",
            "get_dust_collection_mode"

@exeljb
Copy link

exeljb commented Feb 5, 2022

I'm trying to figure this feature out too. Looks like I'm now gonna look into this hacked app route.

@exeljb
Copy link

exeljb commented Feb 5, 2022

After some more googling, i found it... app_start_collect_dust starts the auto-empty and app_stop_collect_dust stops it. Found the info from this page here > https://giters.com/rytilahti/python-miio/issues/1107

edit: also wanted to note that the dock turns off after about 20 seconds after it receives the start command

@rytilahti
Copy link
Contributor

rytilahti commented Feb 5, 2022

The feature has also some configurable parameters, see the set_ methods in this PR: rytilahti/python-miio#1188 - to summarize:

  • set_dust_collection_switch_status with {"status": 1/0} can be used to enable/disable the feature
  • set_dust_collection_mode with {"mode": 0-4} can be used to control the behavior. 0: Smart, 1: Quick, 2: Daily, 3: Strong, and 4: Max (whatever those descriptions mean :-)

@marcelrv
Copy link
Owner

marcelrv commented Feb 5, 2022

yes, seems indeed i did not include the app cmds... but I think you got it now incl the parameters
"app_sdp",
"app_ice",
"app_start_collect_dust",
"app_stop_collect_dust",
"app_url",
"app_vesion_info",
"app_start",
"app_pause",
"app_stop",
"app_spot",
"app_charge",
"app_rc_move",
"app_rc_start",
"app_rc_end",
"app_zoned_clean",
"app_goto_target",
"app_wakeup_robot",
"app_get_locale",
"app_segment_clean",
"app_get_init_status",
"app_stat",
"app_get_status",
"app_rc_stop"

@serotonie
Copy link
Author

serotonie commented Feb 6, 2022

It's working flawlessly with app_start_collect_dust and app_stop_collect_dust.
I also could test set_dust_collection_switch_status with succes.

Now I still have to find why the robot is disconnecting/reconnecting itself when its internet acces is blocked, but it's another subject.

Thanks a lot :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants