Xiaomi Lydsto R1

I am unable to find any documentation if Xiaomi lydsto R1 can be integrated to HA or of it uses miio/miot. It’s the cheapest self emptying vacuum that I saw and reviews are good.
Edit: still planning to buy, I can see it on the mi home app but not sure if uses the miio protocol

Hi! Yes you can integrate Lydsto R1 to Home Assistant using Xiaomi MIoT

Here is a video guide (it’s in russian but you can use subtitles)
Also, I wasn’t able to make send commands to clean some selected areas or rooms. Works only for “Clean all home”, “Return to base”…

But there is a hack how to make it clean selected area using your phone + traffic sniffer (like Charles Proxy)
Instruction can be found here: https://neatho.me/uk/community/f-automation/lydsto-r1-vacuum-cleaner-prybyrannya-vyznachenoyi-zony/

I wasn’t able to add my vacuum to the mihome app. Is it possible that it doesn’t work for the lydsto R1 that was sent to US?
The scan never get the vacuum and when I chose the manual option it asks me to connect to the wifi “zhimi-vacuum-x1a_miapxxxx” but the name of the wifi generated by the vacuum is “Lydsto-STJ0X-xxxx”
Does any one else have this problem?

2 Likes

Maybe you should check the region you have selected in the app Depending on the region the vacuum is made for it’ll depend if it will connect or not.
Try changing app region to Chinese (or others if Chinese is chosen)

I have the same issue on my US Lydsto R1 from amazon. I tested different regions with no luck but this was on the original firmware from a few months ago.

After pressing down for some second, the robot announces Wifi Reset, don’t let go yet but keep pressing for 5 more seconds, the robot’s wifi will change to “zhimi…”. But I still can’t add to Mi Home app yet.

Hi
I’ve found a new way to send comment to the vacuum to clean areas that were set up in Xiaomi MiHome app

Here’s the command:

    - service: xiaomi_miot_raw.call_action
      data:
        entity_id: vacuum.xa1_cloud_864575
        siid: 12
        aiid: 1
        inn: [2, '{"mapId":1640275330,"segmentId":[4]}']

The biggest question for me was:

  • Where to get the correct siid, aiid, inn?
  • In what format should I send data in the inn field?
  1. On my Android device I installed from vevs.me. (Maybe it’ll work with app from Play Market)
  2. I had Developer Mode = ON on my Android device. And also “USB debugging” in Developer options
  3. Install and set up Android Studio on your PC
  4. Connect device to PC and launch Android Studio → Start debugging logs
  5. In MiHome app I selected ‘Area cleaning’ → selected the room I wanted → ‘Start’
  6. After that plug off the cable from your phone (just for Android studio to stop spamming with logs)
  7. In Android Studio search for siid → there won’t be too much output results
  8. And in these results you’ll find the required data you need: siid, aiid, inn?

Now just copy them to your script in Home Assistant and it’ll work )
Hope this will help you

Holding for 5 additional seconds doesn’t work for me to enter distribution mode. I only get the Lydsto stx ssid. Am I doing something wrong?

1 Like

I have the same problem, the R1 won’t enter distribution mode :frowning:

1 Like

I managed to get this connect to Google assistant.
I paired the device with smart life app.
Search for small home alliance and WiFi vacuum.
Select AP mode.
It found the divice and pulled over the maps and all settings.
Then added smart life to Google assistant.

1 Like

Thanks for the tip. I had same problems being unable to connect the vacuum to mi home app, but smart life app works.

Though I got the vacuum connected to smart home app and connected that to home assistant using tuya, I found that the vacuum status was always unknown and had pretty much no details besides the cleaning mode.

I tried using local tuya and was able to find most of data with a bunch of trial and error. But it doesn’t quite fit the API structure of local tuya. I tried all the different DPs and the combo of start, pause, and stop buttons never quite did what I wanted.

So I created a virtual vacuum that overrides some commands and now it works pretty much perfectly. Sharing my details for any other folks:

Local Tuya Config in core.config_entries
NOTE: “chargring” is supposed to be mispelled

"entities": [
	{
	  "friendly_name": "Upstairs Vacuum Internal",
	  "idle_status_value": "idle",
	  "powergo_dp": 101,
	  "docked_status_value": "chargring,fullcharge",
	  "returning_status_value": "tocharge",
	  "battery_dp": 106,
	  "mode_dp": 104,
	  "modes": "backcharge,pose,selectroom,smart,zone",
	  "return_mode": "backcharge",
	  "fan_speed_dp": 109,
	  "fan_speeds": "quiet,auto,strong,max",
	  "clean_time_dp": 116,
	  "clean_area_dp": 117,
	  "clean_record_dp": 118,
	  "fault_dp": 122,
	  "paused_state": "pause",
	  "stop_status": "null",
	  "id": 105,
	  "platform": "vacuum"
	},
	{
	  "friendly_name": "Upstairs Vacuum Mop Water Regulation",
	  "select_options": "low;mid;high",
	  "select_options_friendly": "Low;Medium;High",
	  "restore_on_reconnect": false,
	  "is_passive_entity": true,
	  "id": 110,
	  "platform": "select"
	},
	{
	  "friendly_name": "Upstairs Vacuum Volume",
	  "min_value": 0.0,
	  "max_value": 10.0,
	  "step_size": 1.0,
	  "restore_on_reconnect": false,
	  "is_passive_entity": true,
	  "id": 114,
	  "platform": "number"
	}
],

Script for locating the vacuum:

locate_lydsto_vacuum:
  description: Locate Lydsto Vacuum
  fields:
    device_id:
      name: Tuya Device ID
      required: true
      selector:
        text:
    original_volume:
      name: Original Volume
      required: true
      selector:
        number:
          min: 1
          max: 10
          step: 1
  sequence:
    - alias: Locate at max volume
      service: localtuya.set_dp
      data:
        device_id: "{{ device_id }}"
        dp: 114
        value: 10
    - delay:
        seconds: 2
    - alias: Reset to original volume
      service: localtuya.set_dp
      data:
        device_id: "{{ device_id }}"
        dp: 114
        value: "{{ original_volume }}"

Then the template vacuum. Replace <tuya_device_id> with the correct device ID. You can find it by looking at the list of devices in core.config_entries for the local tuya config.

vacuum:
  - platform: template
    vacuums:
      upstairs:
        friendly_name: Upstairs Vacuum
        unique_id: <tuya_device_id>
        value_template: >-
          {{ states('vacuum.upstairs_vacuum_internal') }}
        battery_level_template: >-
          {{ state_attr('vacuum.upstairs_vacuum_internal', 'battery_level') }}
        fan_speed_template: >-
          {{ state_attr('vacuum.upstairs_vacuum_internal', 'fan_speed') }}
        fan_speeds:
          - quiet
          - auto
          - strong
          - max
        attribute_templates:
          cleaning_mode: >-
            {{ state_attr('vacuum.upstairs_vacuum_internal', 'cleaning_mode') }}
          cleaning_mode_list: >-
            {{ state_attr('vacuum.upstairs_vacuum_internal', 'cleaning_mode_list') }}
          clean_area: >-
            {{ state_attr('vacuum.upstairs_vacuum_internal', 'clean_area') }}
          clean_record: >-
            {{ state_attr('vacuum.upstairs_vacuum_internal', 'clean_record') }}
          clean_time: >-
            {{ state_attr('vacuum.upstairs_vacuum_internal', 'clean_time') }}
        start:
          service: localtuya.set_dp
          data:
            device_id: <tuya_device_id>
            dp: 101
            value: true
        pause:
          service: localtuya.set_dp
          data:
            device_id: <tuya_device_id>
            # 103 is docking value, 102 is cleaning value
            dp: "{{ iif(is_state('vacuum.upstairs', 'returning'), 103, 102) }}"
            value: false
        stop:
          service: localtuya.set_dp
          data:
            device_id: <tuya_device_id>
            dp: 101
            value: false
        return_to_base:
          service: vacuum.return_to_base
          target:
            entity_id: vacuum.upstairs_vacuum_internal
        set_fan_speed:
          service: vacuum.set_fan_speed
          target:
            entity_id: vacuum.upstairs_vacuum_internal
          data:
            fan_speed: "{{ fan_speed }}"
        locate:
          service: script.locate_lydsto_vacuum
          data:
            device_id: <tuya_device_id>
            original_volume: "{{ states('number.upstairs_vacuum_volume') | int(5) }}"

2 Likes

I just got the same vacuum in Europe.
MCU: h245v44_0
Firmware: 2755
SN: SCL1052202102000xxxx
Panel: l2ew_0.1.4-5.23

While according to some Chinese manual keeping the buttons pressed for 2 more seconds after the WiFi reset should trigger the Mijia distribution mode, my vacuum simply doesn’t do this.
Even tricking the Mi Home app into seeing the correct SSID doesn’t work, as the vacuum doesn’t enter MiIO setup mode. So I fear with the firmware we have for non CN-robots, adding it to Mi Home is simply not implemented.

Greetings everyone!
I also watched the video from the second post on youtube. I decided to buy this cleaner. I couldn’t connect the robot to mihome. I searched for information on the Internet for a year. I found the most information here. Therefore, I want to share my experience.
My robot:


Firmware: 5.2.1_2755
the mode of connection to mihome - YES (wifi “zhimi-vacuum-x1a_miapxxxx”)
All further actions apply only to devices that have a MiHome connection mode.
So, my first mistake (probably) is that I first connected the robot to the Lydsto (the original application). I looked at the functions and possibilities, checked my language. Without deleting from the original application, I started connecting to Mihome.

Meehome correctly allocated my model and began to connect it. The first 2 steps passed instantly. At the third step (about 39%) the robot reported the start of the connection…and did not report completion. I tried to repeat the procedure many times. Tried to switch regions (servers) to Mihome. Everything is in vain. The robot did not report the success of the connection, the device card did not appear in Mihome.
I also tried the tandem: Tuya Smart-Google Home. Smart Life also did not see the robot and did not connect it.
In Tuya (in the Android application), the smart robot perfectly integrated, pulled up the map, all functions worked. Google Home pulled only a button from Tuya Smart. She didn’t work.
In XA: the integration of Local Tuya was not automatically recognized by the robot. There was no model in the proposed list. Tuya pulled only the on/off button from the cloud. I have been trying to select endpoints manually for several weeks to no avail. Tuya - a fiasco.
I’ve been trying to join Mihome again and again…One day I noticed that my robot’s card appeared in Mihome…I was able to do it!
Now the tips:

  1. Delete the robot from another application (Leadstro or otherwise). Delete from wipe data. When connected to another application, the robot does not reset to factory settings. It remembers the map, language and all settings.
  2. (maybe it doesn’t matter) Switch the language to English.
  3. Further according to the original instructions…
  4. At the last step, when you receive a failure message, try one of the combinations (dances with a tambourine):
    a). in Android, click “close all programs”. Do not agree to cancel the setting. Just close all programs. Next, hold down the robot’s power button to turn it off. After a minute, turn on the robot. After another minute, open the application - there should be a card of the device)
    b). first disable the robot, then the manipulations with the application. Then we turn on the robot. Then turn on the application.
    There will be no message about the success of the connection.
    We get the desired:

    I was able to connect my cleaner to different regions (not iron bound to region) DE, ru, SG, CN.
    Everything works great. In HA, of course, through hass-xiaomi-miot. Works locally (not from the cloud).
    Only one thing does not work: in Mihome it is not possible to change the language - only English.