Python plugin: Xiaomi Mi Robot Vacuum Topic is solved
Moderator: leecollings
-
- Posts: 56
- Joined: Tuesday 22 August 2017 20:50
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Belarus
- Contact:
Python plugin: Xiaomi Mi Robot Vacuum
Plugin for Xiaomi Vacuum (based on python-miio)
Can be found here: https://github.com/mrin/domoticz-mirobot-plugin
Provide sub devices:
- Status (polls by interval)
- Control
- Fan Level
- Battery
- Care Main Brush, Side Brush, Filter, Sensor
- Care reset control
Can be found here: https://github.com/mrin/domoticz-mirobot-plugin
Provide sub devices:
- Status (polls by interval)
- Control
- Fan Level
- Battery
- Care Main Brush, Side Brush, Filter, Sensor
- Care reset control
Last edited by mrinner on Sunday 12 November 2017 17:26, edited 6 times in total.
-
- Posts: 56
- Joined: Tuesday 22 August 2017 20:50
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Belarus
- Contact:
Re: Python plugin: Xiaomi Mi Robot Vacuum
Added "Fan Level" subdevice.
-
- Posts: 51
- Joined: Friday 18 September 2015 21:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python plugin: Xiaomi Mi Robot Vacuum
Thx, didn't tried it yet, because i have the lua scripts.
-
- Posts: 99
- Joined: Friday 10 March 2017 22:27
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Germany
- Contact:
Re: Python plugin: Xiaomi Mi Robot Vacuum
Great work!
Working flawlessy and is replacing my current bash + cronjob solution.
Working flawlessy and is replacing my current bash + cronjob solution.

Migration done, hello Home Assistant.
-
- Posts: 56
- Joined: Tuesday 22 August 2017 20:50
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Belarus
- Contact:
Re: Python plugin: Xiaomi Mi Robot Vacuum
"Battery level" moved in new device. Before was an issue with status log change when just battery level updated, was floods in history log for "Status device".
-
- Posts: 13
- Joined: Saturday 26 August 2017 21:50
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python plugin: Xiaomi Mi Robot Vacuum
As i see here, more devices using the same protocol are suppported:
https://github.com/rytilahti/python-mirobo
i have two power strips but i have been not able to make it work
https://github.com/rytilahti/python-mirobo
i have two power strips but i have been not able to make it work

-
- Posts: 26
- Joined: Thursday 04 February 2016 13:06
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.530
- Location: Emmen, Drenthe
- Contact:
Re: Python plugin: Xiaomi Mi Robot Vacuum
As I read it, the script does not support the other "supported" devices:
Although this library (and tool) currently only supports the vacuum cleaner, some other Xiaomi products use the same underlying communication protocol (another source for vacuum-specific documentation), so patches for supporting other Xiaomi devices using the same protocol are welcome!
-
- Posts: 56
- Joined: Tuesday 22 August 2017 20:50
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Belarus
- Contact:
Re: Python plugin: Xiaomi Mi Robot Vacuum
Seems it should work, because I see strip.py in lib which is extended from basic "Device", so it should work, but not as CLI tool, just need some code to write.
-
- Posts: 784
- Joined: Wednesday 10 December 2014 13:06
- Target OS: Linux
- Domoticz version: beta
- Location: Bordeaux France
- Contact:
Re: Python plugin: Xiaomi Mi Robot Vacuum
Nice work !
Maybe as you have seen mi-robo can now drive xiaomi philips ball bulb (i put some element on the issue, was isn't working), it use miceil command, does it will be hard to add for you ?
Maybe as you have seen mi-robo can now drive xiaomi philips ball bulb (i put some element on the issue, was isn't working), it use miceil command, does it will be hard to add for you ?
Domoticz stable 3.5877 for real & Domoticz beta for test
Rfxtrxe / RFLink / Milight / Yeelight / Tasmota / MQTT / BLE / Zigate
http://domo-attitude.fr
Rfxtrxe / RFLink / Milight / Yeelight / Tasmota / MQTT / BLE / Zigate
http://domo-attitude.fr
-
- Posts: 13
- Joined: Saturday 26 August 2017 21:50
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python plugin: Xiaomi Mi Robot Vacuum
I'm sure it is hard to do. Im trying to write some code for the strip as i have the hardware, but i need some time to figure out how it works. Without the hardware is almost impossible to make it.
-
- Posts: 60
- Joined: Sunday 20 September 2015 17:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2.3072
- Location: Sweden
- Contact:
Re: Python plugin: Xiaomi Mi Robot Vacuum
Ive done as the page said, but when ill try to add the hardware, the type dont show only the Xaiomi gateway and no Vacuum
Running beta 3.8369

Running beta 3.8369
Last edited by cattoo on Tuesday 29 August 2017 15:29, edited 1 time in total.
-
- Posts: 56
- Joined: Tuesday 22 August 2017 20:50
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Belarus
- Contact:
Re: Python plugin: Xiaomi Mi Robot Vacuum
It works on stable release currently. Since beta 3.8367 python plugin system disabled for some period of time by developers of Domoticz. (ref. to issue viewtopic.php?f=6&t=19122)
-
- Posts: 784
- Joined: Wednesday 10 December 2014 13:06
- Target OS: Linux
- Domoticz version: beta
- Location: Bordeaux France
- Contact:
Re: Python plugin: Xiaomi Mi Robot Vacuum
Looking how this plugin is made.Martins80 wrote:I'm sure it is hard to do. Im trying to write some code for the strip as i have the hardware, but i need some time to figure out how it works. Without the hardware is almost impossible to make it.
Looks like it use a wrapper file to speak to the vaccum.
Wrapper is a good idea for all device supported by mirobo lib.
Also pip3 install mirobo is installing an old version for me, i have to gitclone and manual instt pyrhon-murobo to retieve miceil and other files missing
Domoticz stable 3.5877 for real & Domoticz beta for test
Rfxtrxe / RFLink / Milight / Yeelight / Tasmota / MQTT / BLE / Zigate
http://domo-attitude.fr
Rfxtrxe / RFLink / Milight / Yeelight / Tasmota / MQTT / BLE / Zigate
http://domo-attitude.fr
-
- Posts: 60
- Joined: Sunday 20 September 2015 17:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2.3072
- Location: Sweden
- Contact:
Re: Python plugin: Xiaomi Mi Robot Vacuum
Well im back on stable och the Hardware is added, but now it shows me, what do ill need to change?mrinner wrote: ↑Tuesday 29 August 2017 14:10It works on stable release currently. Since beta 3.8367 python plugin system disabled for some period of time by developers of Domoticz. (ref. to issue viewtopic.php?f=6&t=19122)
Code: Select all
2017-08-29 17:05:13.215 Error: (xiaomi-mi-robot-vacuum) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/xiaomi-mirobot/:/usr/lib/python3.4/:/usr/lib/python3.4/plat-arm-linux-gnueabihf:/usr/lib/python3.4/lib-dynload'.
2017-08-29 17:05:13.215 Error: (Inga) Module Import failed, exception: 'SystemError'
2017-08-29 17:06:30.029 Error: Inga hardware (37) thread seems to have ended unexpectedly
-
- Posts: 56
- Joined: Tuesday 22 August 2017 20:50
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Belarus
- Contact:
Re: Python plugin: Xiaomi Mi Robot Vacuum
Hmm.. for testing purpose open the plugin folder and file plugin.py, then try comment lines and restart domoticz.
Possible one of the system lib cannot be import, but it should work as it is python system libs... As I remember I got some error like you, but restart solved this issue.
Code: Select all
import Domoticz
#import subprocess
#import os
#import json
-
- Posts: 13
- Joined: Saturday 26 August 2017 21:50
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python plugin: Xiaomi Mi Robot Vacuum
yesterday i installed miio libraries and now i have the tokens for the power strips.
I think that we should group the wifi xiaomi devices in one develop thread as they share communications protocol...
-
- Posts: 13
- Joined: Wednesday 27 September 2017 23:32
- Target OS: Linux
- Domoticz version:
- Contact:
Re: Python plugin: Xiaomi Mi Robot Vacuum
Hi guys. I've run into a problem that I hope you guys can help with please.
So I've git cloned this and installed mirobo in the .vendor directory with all the requisites, and restarted Domoticz multiple times.
But, when I go to the Setup > Hardware screen, I'm not seeing the parameters for this plugin. Clicking on the Add button also does nothing.
It is as if Domoticz can't read the plugin.py correctly. This is no errors in the log, even with -verbose 2.
The PluginSystem is definitely started - "PluginSystem: Started, Python version '3.5.2'."
Any ideas please?

This is the latest stable Domoticz v3.8153, on an Orange Pi Zero, with Ubuntu Server 16 LTS.
Apt update and upgrade were performed prior to installing this.
Many thanks!
So I've git cloned this and installed mirobo in the .vendor directory with all the requisites, and restarted Domoticz multiple times.
But, when I go to the Setup > Hardware screen, I'm not seeing the parameters for this plugin. Clicking on the Add button also does nothing.
It is as if Domoticz can't read the plugin.py correctly. This is no errors in the log, even with -verbose 2.
The PluginSystem is definitely started - "PluginSystem: Started, Python version '3.5.2'."
Any ideas please?

This is the latest stable Domoticz v3.8153, on an Orange Pi Zero, with Ubuntu Server 16 LTS.
Apt update and upgrade were performed prior to installing this.
Many thanks!
-
- Posts: 24
- Joined: Tuesday 12 September 2017 14:39
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python plugin: Xiaomi Mi Robot Vacuum
Ho to check a status of the vacuum ? I installed plugin, everything works just fine. I was trying to define a blockly with notification when vacuum is comming back to home but without luck.
Blocky is not working
Blocky
Code: Select all
if vacuum-status = "Back to home" then ....
........................................................................................
RPi2 + sonoff + 433MHz + Xiaomi Gateway + EQ-3 MAX!
RPi2 + sonoff + 433MHz + Xiaomi Gateway + EQ-3 MAX!
Who is online
Users browsing this forum: No registered users and 1 guest