nqkdev / home-assistant-vacuum-styj02ym

163 stars 134 forks source link

Service Clean Zone and Clean Point #3

Closed JeedHome44 closed 4 years ago

JeedHome44 commented 4 years ago

Hello, Can we have more detail what we have to write if we want to do script with vacuum.xiaomi_clean_point and vacuum.xiaomi_clean_zone service? I don't know what i have to write for it's work :) Thank you

JeedHome44 commented 4 years ago

Hello! I found it!

for the zone, you must set the zone and repeat parameter. for the point just the point parameter.

But I tested a lot of different coordinates but nothing works. The robot always goes to the wall behind its base. so I think it doesn’t work like other robots for coordinates.

Ciubas commented 4 years ago

How you send coommad?

`test_vacuum: alias: Test Vacuum sequence:

Unable to send command to the vacuum: No response from the device 10:03 PM custom_components/miio2/vacuum.py (ERROR) - message first occurred at 9:44 PM and shows up 7 times

Ciubas commented 4 years ago

`test_vacuum: alias: Test Vacuum sequence:

JeedHome44 commented 4 years ago

vacuum.xiaomi_clean_point

{ "entity_id": "vacuum.robot_laveur", "point": [25500, 25500] }

OR

vacuum.xiaomi_clean_zone

{ "entity_id": "vacuum.robot_laveur", "zone": [[25000, 25000, 26500, 26500]], "repeats": 1 }

But this 2 services start the robot but it goes to a false point or zone. So, i do'nt know how we can have the good coordonate to this bot!

Ciubas commented 4 years ago

I read somewhere now it is in meters. Not like the s5 or s6.

JeedHome44 commented 4 years ago

oh ok! but where is the point 0? The bot Home is 0?

JeedHome44 commented 4 years ago

but if we want to be precise in centimeters, how do we do it?

JeedHome44 commented 4 years ago

I found!!!! point 0, 0 is the base! 1, 0 = 1 meter on the right. 0, 1 = 1 meter at the top. and so you have to do -1, -1 to make 1 meter down and 1 meter to the left! More than doing the zones!

Ciubas commented 4 years ago

Can you write all script code?

JeedHome44 commented 4 years ago

It’s ok! It’s work with a script in Hassio! Like that: Service: vacuum.xiaomi_clean_zone

{ "entity_id": "vacuum.robot_laveur", "zone": [[1, 2, 0, 3]], "repeats": 1 }

But the fonction repeats don’t work! With 2 or 3, the bot do only one.

Ciubas commented 4 years ago

My robot just rotate the map... and room has been change too... :/

Its work for me too:

test_vacuum: alias: Test Vacuum sequence:

sr-as2 commented 4 years ago

Hi there, Is it possible to send a command with the room number like the roborock ?

Ciubas commented 4 years ago

Hi there, Is it possible to send a command with the room number like the roborock ?

Yes, this is in polish but code is that same: https://hejdom.pl/blog/22-home-assistant/129-xiaomi-styj02ym-obsluga-przez-home-assistant.html

sr-as2 commented 4 years ago

Great thank you!

JeedHome44 commented 4 years ago

i close it's work!