Page 12 of 16
Re: Blocky, ant mirobot state
Posted: Friday 07 June 2019 21:01
by Joep123
KiiB wrote: ↑Friday 07 June 2019 13:58
Maybe anyone tried to insert mi robot " State 12: 'In Error' " in blocky script?
Not Blockly but I use this script:
https://ehoco.nl/xiaomi-roborock-s5-aut ... tofzuigen/
Works fine!
Maybe you can adjust the code a bit to your wishes.
Re: Python plugin: Xiaomi Mi Robot Vacuum
Posted: Monday 10 June 2019 9:59
by KiiB
Thank You,
I will investigate this, but for now i'm useless with LUA

It's strange that it is impossible to read state value in blocky even if own event interface can read them
idx last update Name State Value
237 2019-06-10 09:54:04 Xiaomi Mi Robot Vacuum - Status Off 0/Charging
Re: Blocky, ant mirobot state
Posted: Monday 10 June 2019 13:09
by Joep123
KiiB wrote: ↑Friday 07 June 2019 13:58
pick up field do not work because "In error" have same state as "charging" or "paused". Thoose all statuses in domoticz are shown as state 0.
Value is shown as "0/In Error" but cant get it working with that syntax.
The status of the Robot Vacuum is On or Off (not Charging, In Error, Paused, etc.).
I guess you can only use On/Off in Blockly.
Try the LUA or dzVents scripts at
https://ehoco.nl/xiaomi-roborock-s5-aut ... tofzuigen/, it isn't that difficult...
Re: Python plugin: Xiaomi Mi Robot Vacuum
Posted: Monday 10 June 2019 14:02
by KiiB
Dear Joep,
Yes, as button there is only 2 states of switch. On and Off,
But there is more information about state.

- siurblio statusas.jpg (251.62 KiB) Viewed 5288 times
As You see in picture
Off 0/Paused
Off 0/Sleeping
Off 0/Charging
Off 0/In Error
On 1/Back to Home
On 1/Cleaning
These are states i saw until now. You even can find those values in "Status" button logs....
Hope someone could teach me how to use them in blocky script or at least dummy switch
EDIT:Looks like i can use that value with user variable.
Re: Python plugin: Xiaomi Mi Robot Vacuum
Posted: Monday 10 June 2019 15:55
by Joep123
KiiB wrote: ↑Monday 10 June 2019 14:02
Off 0/Paused
Off 0/Sleeping
Off 0/Charging
Off 0/In Error
On 1/Back to Home
On 1/Cleaning
These are states i saw until now. You even can find those values in "Status" button logs....
There is one more: "Off 0/Waiting".
Re: Python plugin: Xiaomi Mi Robot Vacuum
Posted: Saturday 22 June 2019 16:39
by hoeby
Last week the xiaomi vacuum 1s was delivered.
Today i followed the github instructions.
Most difficult thing was to get the token. The rest was just follow the instructions and i works. And not just it works, i works very good.
Thanks to everyone who made this possible, for all the hard work and documentation
Re: Python plugin: Xiaomi Mi Robot Vacuum
Posted: Friday 28 June 2019 22:36
by dobber
Installation broken on Raspbian Buster RPi4.
During installation there are lots of errors when using Rpi4 and Buster.
Errors occur after this:
Building wheels for collected packages: gevent, msgpack-python, greenlet
Building wheel for gevent (setup.py) ... \
End result is crash and burn. Installation does not work.
Re: Python plugin: Xiaomi Mi Robot Vacuum
Posted: Monday 22 July 2019 12:52
by DAVIZINHO
Hello,
Can someone configure this plugin in a docker instalation of domoticz?
im very interesting but i cant
thanks a lot!
-David-
Re: Python plugin: Xiaomi Mi Robot Vacuum
Posted: Thursday 10 October 2019 8:56
by henryco
Bonjour,
The Care-sensors indicator is always decreasing (now at 58%) even if i clean the sensors ... do you have the same behaviour and should we care about it ?
Re: Python plugin: Xiaomi Mi Robot Vacuum
Posted: Thursday 10 October 2019 10:32
by hoeby
henryco wrote: ↑Thursday 10 October 2019 8:56
The Care-sensors indicator is always decreasing (now at 58%) even if i clean the sensors ... do you have the same behaviour and should we care about it ?
They do decrease.
After cleaning go to "switch" devices in domoticz. There is a device to reset the sensors/filters.
Reset the care-sensor and it is back to 100%
The percentage is just counting down in the usage. It is not measured by the device. Therefor cleaning doesn't help.

Re: Python plugin: Xiaomi Mi Robot Vacuum
Posted: Thursday 07 November 2019 17:14
by airmarshall
Hi Guys,
Trying to install the python-miio but it’s throwing a minimum python version error, requesting version >3.6.
Thus doesn’t seem available for my pi stretch install which is on the latest python 3.5.3 which is the version mentioned in all the ‘guides’ for install.
Any advice?
Re: Python plugin: Xiaomi Mi Robot Vacuum
Posted: Friday 08 November 2019 11:17
by Hesmink
airmarshall wrote: ↑Thursday 07 November 2019 17:14
Hi Guys,
Trying to install the python-miio but it’s throwing a minimum python version error, requesting version >3.6.
Thus doesn’t seem available for my pi stretch install which is on the latest python 3.5.3 which is the version mentioned in all the ‘guides’ for install.
Any advice?
My plugin was broken a while ago, and I ran into similar problems when trying to reinstall.
What I did to make it work with 3.5.3, and support my Roborock, was change pip_req.txt to:
Code: Select all
pi@raspberrypi:~/domoticz/plugins/xiaomi-mirobot $ more pip_req.txt
android-backup==0.1.0
asn1crypto==0.23.0
attrs==17.2.0
cffi==1.11.2
click==6.7
construct==2.9.31
cryptography==2.1.3
enum-compat==0.0.2
gevent==1.2.2
greenlet==0.4.12
idna==2.6
msgpack-python==0.4.8
netifaces==0.10.6
pretty-cron==1.0.2
pycparser==2.18
pycrypto==2.6.1
python-miio==0.3.8
pytz==2017.3
six==1.11.0
typing==3.6.2
zeroconf==0.19.1
Before running 'pip3 install -r pip_req.txt'
For me, after this the plugin seemed to work again, apart from the fact that a firmware upgrade probably changed my access token, and I haven't got around to retrieving it again.
Re: Python plugin: Xiaomi Mi Robot Vacuum
Posted: Wednesday 13 November 2019 0:29
by airmarshall
Thanks, you set me on the right track. The current latest release of python-miio added the requirement for python 3.7.
By appending the version number 0.4.6 to the install scripts has it working fine.
Hesmink wrote: ↑Friday 08 November 2019 11:17
airmarshall wrote: ↑Thursday 07 November 2019 17:14
Hi Guys,
Trying to install the python-miio but it’s throwing a minimum python version error, requesting version >3.6.
Thus doesn’t seem available for my pi stretch install which is on the latest python 3.5.3 which is the version mentioned in all the ‘guides’ for install.
Any advice?
My plugin was broken a while ago, and I ran into similar problems when trying to reinstall.
What I did to make it work with 3.5.3, and support my Roborock, was change pip_req.txt to:
Code: Select all
pi@raspberrypi:~/domoticz/plugins/xiaomi-mirobot $ more pip_req.txt
android-backup==0.1.0
asn1crypto==0.23.0
attrs==17.2.0
cffi==1.11.2
click==6.7
construct==2.9.31
cryptography==2.1.3
enum-compat==0.0.2
gevent==1.2.2
greenlet==0.4.12
idna==2.6
msgpack-python==0.4.8
netifaces==0.10.6
pretty-cron==1.0.2
pycparser==2.18
pycrypto==2.6.1
python-miio==0.3.8
pytz==2017.3
six==1.11.0
typing==3.6.2
zeroconf==0.19.1
Before running 'pip3 install -r pip_req.txt'
For me, after this the plugin seemed to work again, apart from the fact that a firmware upgrade probably changed my access token, and I haven't got around to retrieving it again.
Android Mobile App Button Actions
Posted: Wednesday 13 November 2019 0:36
by airmarshall
So as per the screenshot the default button position is 'Clean'. If I reselect 'Clean' nothing happens to the robot. If I press 'Clean' in the webgui then the robot cleans as expected.
Anyone else experienced this?

Re: Python plugin: Xiaomi Mi Robot Vacuum
Posted: Friday 15 November 2019 21:16
by yahiko750
Currently having this error, but it only happens when I change a setting on the "Hardware" tab like interval. The script itself works just fine. Anyone has an idea to squish this last nasty bug?
Code: Select all
2019-11-15 21:11:29.273 Error: (xiaomi-mi-robot-vacuum) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/MiRobotVacuum/:/usr/lib/python37.zip:/usr/lib/python3.7:/usr/lib/python3.7/lib-dynload:/usr/local/lib/python3.7/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.7/dist-packages'.
2019-11-15 21:11:29.273 Error: (Roborock S55) Module Import failed, exception: 'AttributeError'
2019-11-15 21:11:29.273 Error: (Roborock S55) Error Line details not available.
Re: Python plugin: Xiaomi Mi Robot Vacuum
Posted: Sunday 24 November 2019 21:19
by RichardBokker
I want to add a second vacuum cleaner from same generation, what is de best solution for this?
Because the added hardware does not contain parameters like IP adres, ID and token.
Do a second clone, and rename clone-folder etc?
Other idea's?
Re: Python plugin: Xiaomi Mi Robot Vacuum
Posted: Monday 25 November 2019 9:06
by Prutsium
Hi as my S5 Max would be arriving this week started to read a bit about this plugin.
Now i noticed all is based round the Mi Home app but as far as i know the S5 Max uses the Roborock app.
Is the guide then the same or wouldn't it work?
Re: Python plugin: Xiaomi Mi Robot Vacuum
Posted: Monday 25 November 2019 22:35
by avgays
RichardBokker wrote: ↑Sunday 24 November 2019 21:19
I want to add a second vacuum cleaner from same generation, what is de best solution for this?
Because the added hardware does not contain parameters like IP adres, ID and token.
Make copy of file miio_server.sh e.g. miio_server2.sh
Update IP and TOKEN for new robot and change PORT (--port 22223) in this file.
Then repeat steps 3-4 from installation instruction, changing miio_server to miio_server2 on each step
In Domoticz create Hardware with new PORT (22223)
Re: Python plugin: Xiaomi Mi Robot Vacuum
Posted: Tuesday 26 November 2019 9:25
by RichardBokker
avgays wrote: ↑Monday 25 November 2019 22:35
RichardBokker wrote: ↑Sunday 24 November 2019 21:19
I want to add a second vacuum cleaner from same generation, what is de best solution for this?
Because the added hardware does not contain parameters like IP adres, ID and token.
Make copy of file miio_server.sh e.g. miio_server2.sh
Update IP and TOKEN for new robot and change PORT (--port 22223) in this file.
Then repeat steps 3-4 from installation instruction, changing miio_server to miio_server2 on each step
In Domoticz create Hardware with new PORT (22223)
Hmm, good one! Thnx. This should work, awesome! Gonna try it.
Re: Python plugin: Xiaomi Mi Robot Vacuum
Posted: Thursday 28 November 2019 9:49
by RichardBokker
i added me second vacuum with succes!
But after that, i resetted wifi of both my cleaners. To add them in de app on diferent server (netherlands instead someting chinese).
But now i can't control them anymore?
Yes, IP is the same, that is fixed on router based on MAC-Adres.
I had them on chinese server to get my token on old MiHome app + adb procedure.
Does the ID or Token change on new server? Should i keep the cleaners on chinese server?