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

Unsupported model ijai.vacuum.v19 #1394

Closed
Revyen opened this issue Apr 12, 2022 · 24 comments · Fixed by #1581
Closed

Unsupported model ijai.vacuum.v19 #1394

Revyen opened this issue Apr 12, 2022 · 24 comments · Fixed by #1581

Comments

@Revyen
Copy link

Revyen commented Apr 12, 2022

Before submitting a new request, use the search to see if there is an existing issue for the device.

Device information:

Use miiocli device --ip <ip address> --token <token>.

  • Model: ijai.vacuum.v19
  • Hardware version:
  • Firmware version: 4.1.8_0076
@garritfra
Copy link

I just got a Mop 2s and was bummed to see that it wasn't supported by home assistant.

Please do let me know if anyone is working on supporting this device. If that's not the case, I'm happy to give it a try.

@Revyen
Copy link
Author

Revyen commented Jun 11, 2022

So far I found no working solution or work around. I myself are fairly new to this an la King proper knowledge to implementiert this myself.

If you @garritfra would give it a try I would be gratefull

@garritfra
Copy link

@Revyen fyi: after digging around a bit I found out that the Mop 2s is actually not based on miio as this tool implies, but it's built on top of the newer miot protocol/API/software product. I got my vacuum into Homeassistant using this extension in the HACS store:

https://github.com/al-one/hass-xiaomi-miot

Triggering individual functions of the robot is extremely finicky, but once you got the hang of how miot works, you can throw together a script that you can reuse. Let me know if you need any help.

@danichispa
Copy link

@Revyen fyi: after digging around a bit I found out that the Mop 2s is actually not based on miio as this tool implies, but it's built on top of the newer miot protocol/API/software product. I got my vacuum into Homeassistant using this extension in the HACS store:

https://github.com/al-one/hass-xiaomi-miot

Triggering individual functions of the robot is extremely finicky, but once you got the hang of how miot works, you can throw together a script that you can reuse. Let me know if you need any help.

Can u post an example of your scripts? I want to integrate my Mop 2S in HA

@garritfra
Copy link

Sure. This is a script that cleans a single room:

alias: Clean Kitchen
sequence:
  - service: xiaomi_miot.call_action
    data:
      entity_id: vacuum.ijai_v19_9a2c_robot_cleaner. 
      siid: 7   # Service ID for 'sweep'
      aiid: 3   # Action ID for 'set-room-clean'
      params:
        - '10'   # Room ID to clean. I brute forced these IDs to map it to the rooms, but I'm sure there is a working endpoint for this somewhere. 
        - 0      # 0 = 'Global'
        - 1      # 1 = 'start'
mode: single
icon: mdi:sofa-single

For the siids and aiids, you can refer to the spec.

I'm planning on writing this down in more detail on my blog, but you should be able to get started with this.

You might also be interested in this card. I found that the (probably way superior) vacuum map card didn't work for me out of the box, since extracting the map requires the Vacuum to be on the same LAN as the HA box, which isn't the case for me.

@danichispa
Copy link

I'm planning on writing this down in more detail on my blog, but you should be able to get started with this.

You might also be interested in this card. I found that the (probably way superior) vacuum map card didn't work for me out of the box, since extracting the map requires the Vacuum to be on the same LAN as the HA box, which isn't the case for me.

Thank you! Will take a look on your blog to see more detailed instructions.
Now I need to figure out how to get room IDs

@drunkly
Copy link

drunkly commented Jun 15, 2022

I found that the (probably way superior) vacuum map card didn't work for me out of the box, since extracting the map requires the Vacuum to be on the same LAN as the HA box

Are you sure about this? I have vacuum on same Lan than HA, have tried but no luck.
PiotrMachowski/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor#259 (comment)

In the other hand do you know some documentation about how to use the API to retrieve room ids?

@garritfra
Copy link

garritfra commented Jun 15, 2022

Are you sure about this? I have vacuum on same Lan than HA, have tried but no luck.

I at least thought it would be this way. I wasn't aware that ijai vacuums are not supported yet.

In the other hand do you know some documentation about how to use the API to retrieve room ids?

I'm afraid I can't point to anything specifically. AFAIK room IDs start at 10 and go up from there. For me, it was a matter of sending the command with a room id, seeing where the robot went and taking note.

There is the room_ids property (service 2, property 10), but it's neither readable (green badge with chinese text) nor writable (blue badge), so it's more or less useless. I'd love to hear if you get this working though.

@drunkly
Copy link

drunkly commented Jun 24, 2022

About rooms I maded it work same way like you. just trying numnbers, in my case were (10,11,12).
About map extractor was impossible for me. So give up with the map.

@brancooo1
Copy link

brancooo1 commented Jun 28, 2022

Thanks @garritfra for keeping us posted. I want to integrate the Mop 2 Pro to HomeBridge as well. Current plugin seems to be using older version miio.

Update: I found new MIOT homebridge plugin which allegedly supports new Mop 2 devices -> homebridge-miot. It may help you with implementation to HA.

@sirprince95
Copy link

It's possible to have other scripts? Like Sweep and Mop function or set water level? Thanks

@garritfra
Copy link

It's possible to have other scripts? Like Sweep and Mop function or set water level? Thanks

You should be able to figure out the commands by looking at the spec mentioned in this comment:

#1394 (comment)

@sirprince95
Copy link

It's possible to have other scripts? Like Sweep and Mop function or set water level? Thanks

You should be able to figure out the commands by looking at the spec mentioned in this comment:

#1394 (comment)

sequence:

  • service: xiaomi_miot.set_miot_property
    data:
    entity_id: vacuum.ijai_v19_7e89_robot_cleaner
    siid: 2
    piid: 4
    value: 1
  • delay:
    hours: 0
    minutes: 0
    seconds: 3
    milliseconds: 0
  • service: xiaomi_miot.call_action
    data:
    entity_id: vacuum.ijai_v19_7e89_robot_cleaner
    siid: 7
    aiid: 3
    params:
    - '12'
    - 0
    - 1
    mode: single
    icon: mdi:fireplace-off
    alias: Clean Living Room

I've made this script for set the sweep and mop function and then clean the selected room but doesn't work 🥺

@almudawi
Copy link

@garritfra Thanks for the tips. 🥇 Got more control on my ijai.vacuum.v3 thanks to you. The card works well too. Now, if I could only distinguish between the three functions of (Sweeping, Sweeping & Mopping, and Moping only) to deploy on scripts. I would be fully integrated.

Seems the siid: 7 command does both (yesterday was Sweeping & Mopping while today its sweeping only). Not sure why. :/

@MacVille
Copy link

MacVille commented Nov 4, 2022

Sure. This is a script that cleans a single room:

alias: Clean Kitchen
sequence:
  - service: xiaomi_miot.call_action
    data:
      entity_id: vacuum.ijai_v19_9a2c_robot_cleaner. 
      siid: 7   # Service ID for 'sweep'
      aiid: 3   # Action ID for 'set-room-clean'
      params:
        - '10'   # Room ID to clean. I brute forced these IDs to map it to the rooms, but I'm sure there is a working endpoint for this somewhere. 
        - 0      # 0 = 'Global'
        - 1      # 1 = 'start'
mode: single
icon: mdi:sofa-single

For the siids and aiids, you can refer to the spec.

I'm planning on writing this down in more detail on my blog, but you should be able to get started with this.

You might also be interested in this card. I found that the (probably way superior) vacuum map card didn't work for me out of the box, since extracting the map requires the Vacuum to be on the same LAN as the HA box, which isn't the case for me.

Hello garritfra,

i have a short question:
You have on the params - '10' is that the actual Room (e.g. Livingroom, Kitchen), or is it that the Vacuum will start for all Rooms and the Room ID is the - '0'?

Form my point of View the Specs you mentioned is not so clear from my side.

@garritfra
Copy link

garritfra commented Nov 4, 2022 via email

@MacVille
Copy link

MacVille commented Nov 4, 2022

AFAIK

Ahhh know I understand why you wrote "Brute-forced" the Rooms ☜(゚ヮ゚☜)
Thank you for the quick responce!

Best Regards from Southern Germany
Stefan

@MacVille
Copy link

MacVille commented Nov 4, 2022

AFAIK it's the first room. My apartment only has 3 rooms in total. Not sure why it's "10", and not "0".

Maybe an stupid Question, did you know how to active the vacuum for two room? Do I need to use - “10,11“ or

  • “11“
  • “12“

@garritfra
Copy link

I couldn't figure that out either. My solution was to call the routine twice. The downside being that the robot drives back to the station in between rooms. Do keep me posted if you find something out though!

@srodighiero
Copy link

Are you sure about this? I have vacuum on same Lan than HA, have tried but no luck.

I at least thought it would be this way. I wasn't aware that ijai vacuums are not supported yet.

In the other hand do you know some documentation about how to use the API to retrieve room ids?

I'm afraid I can't point to anything specifically. AFAIK room IDs start at 10 and go up from there. For me, it was a matter of sending the command with a room id, seeing where the robot went and taking note.

There is the room_ids property (service 2, property 10), but it's neither readable (green badge with chinese text) nor writable (blue badge), so it's more or less useless. I'd love to hear if you get this working though.

I tried to send the robot from room "10" and up to "12", but it is always cleaning the same room, very strange. Any suggestion appreciated.

@chocomega
Copy link

chocomega commented Nov 23, 2022

@MacVille @garritfra @srodighiero this syntax works for me:
params: ['11,13', 0, 1] (11 and 13 being room ids)

It may or may not be equivalent to: (not tested)

params:
  - '11,13'
  - 0
  - 1

@MacVille
Copy link

@MacVille @garritfra @srodighiero this syntax works for me: params: ['11,13', 0, 1] (11 and 13 being room ids)

It may or may not be equivalent to: (not tested)

params:
  - '11,13'
  - 0
  - 1

That sounds great! I will give it a try.
Than the big question is how to implement that into the HA GUI and start the Script.

Something like that:
n- input_bools for the rooms
dropdown for the Sweaping or Mopping --> Possible and defined
dropdown for Vaccum power --> Possible and defined
and a dropdown for Water amount --> Possible and defined

But i think the rooms to define is a bit hard and define and bring into the Script.

like:
if input_boolean_kitchen is true
12
end
if input_boolean_hallway is true
14
end

and the result should be than ['12,14']

But this could be an new project to test ;)

@raviteja9494
Copy link

Hello ,
Sorry its a closed post . but the above instructions are still valid ?
because after adding the device i am getting the device unavailable .
can some one help me ?

thanks

@TioBundy
Copy link

Hi. Today it's possible to extract de Map with any addon or HACS extractor?. I have been able to integrate "vacuum.ijai_v19" with Xiaomi Miot Auto only.

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

Successfully merging a pull request may close this issue.