Xiaomi Robot Vacuum Binding

Tags: #<Tag:0x00007fc90dba73f8> #<Tag:0x00007fc90dba72b8> #<Tag:0x00007fc90dba7178>

haha… you can always learn… I did not know any java before OH :slight_smile:
yes, would be good to log an enhancement request on GH…

Hi Marcel,

thanks a lot for your amazing work on the binding :slight_smile:

I would like to use the room cleaning option described here, but I would like to set the repetitions to 2 or 3…

Is there any way to set the repeats when using segment cleaning?




I just added it into the my rules

I did not test it yet as everybody is asleep, but this is according to

… and up to now, everything written there was correct.



yes that I have also seen, but I would like to use the room cleaning :slight_smile: That would be the segment cleaning, but you talk about the zone cleaning!

Is there in the segment cleaning also the possibility to specify the repetitions?


It is just a thought…

Did you try using
instead of



Ohh man,

that would be to easy :smiley:
Will try…

after second coffe… I assume it will not work, but I would be pleased to be corrected.

Is not working… :frowning:
Does no one knows a way to use segment clean with more than one run?
Sure I could write a rule for that…

Only thing I can think of is using the repetition of the zone-cleaning. If you define zones covering the entire room but no other room - this should work.

I saw a post somewhere using zones to clean everything but the carpet. He just defined multiple zones around the carpet.

This is a working wireshark capture:


Is there any posibility to use this command with the binding?

Use the commands channel and send: app_segment_clean[{"segments":[17],"repeat":2,"clean_order_mode":0}]
in other words: first the command (method) and what is in the params goes right after it.

1 Like

Have someone done a Vacuum Widget for Main UI in OH3?

sorry if this is not the right thread…
I am using 3 yeelight rgb v1 lamps (with token) with this binding and everything works great (openhab2.5).I just want to know how can i send commands to the “execute command channel” and make use of the different yeelight sceens or the color flow feature?

Yes you can.
Google for yeelight spec and you find the scene command / color flow

ok i found the yeelight spec pdf and i read:

Method: set_power
Usage: This method is used to switch on or off the smart LED (software
managed on/off).
Parameters: 3.
 "power" can only be "on" or "off". "on" means turn on the smart LED,
"off" means turn off the smart LED.
 "effect": Refer to "set_ct_abx" method.
"duration": Refer to "set_ct_abx" method.
"mode" (optional):
 0: Normal turn on operation (default value)
 1: Turn on and switch to CT mode.
 2: Turn on and switch to RGB mode.
 3: Turn on and switch to HSV mode.
 4: Turn on and switch to color flow mode.
 5: Turn on and switch to Night light mode. (Ceiling light only).
Request Example: {"id":1,"method":"set_power","params":["on", "smooth", 500]}
Response Example: {"id":1, "result":["ok"]}

so i give to execute command channel {“id”:1,“method”:“set_power”,“params”:[“on”, “smooth”, 500]} but nothing happens ,what am i doing wrong here?

Read 4 posts up

Hello @marcel_verpaalen,

thank you very much for the great binding. I use it with several products and it works very reliably.

I have now bought a Qingping Air Monitor Lite (cgllc.airm.cgdn1) and would like to integrate it. This is not yet supported by the binding if I see it correctly. It also seems to work differently than cgllc.airmonitor.b1 or cgllc.airmonitor.s1, because it did not work to overwrite the model in the paper UI with cgllc.airmonitor.s1 or cgllc.airmonitor.b1.

Now I tried creating a cgllc.airm.cgdn1.json in the openhab configuration under ./misc/miio. I can see the file is used, because openhab creates the channels accordingly. Unfortunately no values arrive in the channels…

With a bit of googling I found that python-miio (GitHub - rytilahti/python-miio: Python library & console tool for controlling Xiaomi smart appliances) already supports the Qingping Air Monitor Lite (cgllc.airm.cgdn1). Here are the corresponding commits Add Qingping Air Monitor Lite support (cgllc.airm.cgdn1) (#900) · rytilahti/python-miio@78f8bee · GitHub

The Miot specs: https://miot-spec.org/miot-spec-v2/instance?type=urn:miot-spec-v2:device:air-monitor:0000A008:cgllc-cgdn1:1

Can you give me a hint how to proceed here to customize the database file in the Openhab binding?

Here is my current cgllc.airm.cgdn1.json:

"deviceMapping": {
	"id": [
	"propertyMethod": "get_value",
	"maxProperties": 6,
	"channels": [{
			"property": "battery",
			"friendlyName": "Battery",
			"channel": "battery",
			"channelType": "system:battery-level",
			"type": "Number",
			"refresh": true,
			"ChannelGroup": "Status",
			"actions": []
			"property": "pm2.5",
			"friendlyName": "PM2.5",
			"channel": "pm25",
			"channelType": "pm25",
			"type": "Number",
			"refresh": true,
			"ChannelGroup": "Status",
			"actions": []
			"property": "pm10",
			"friendlyName": "PM210",
			"channel": "pm10",
			"channelType": "pm10",
			"type": "Number",
			"refresh": true,
			"ChannelGroup": "Status",
			"actions": []
			"property": "carbonDioxide",
			"friendlyName": "CO2e",
			"channel": "co2",
			"channelType": "co2",
			"type": "Number",
			"refresh": true,
			"ChannelGroup": "Status",
			"actions": []
			"property": "humidity",
			"friendlyName": "Humidity",
			"channel": "humidity",
			"channelType": "humidity",
			"type": "Number",
			"refresh": true,
			"ChannelGroup": "Status",
			"actions": []
			"property": "temperature",
			"friendlyName": "Temperature",
			"channel": "temperature",
			"channelType": "temperatureC",
			"type": "Number:Temperature",
			"unit": "CELCIUS",
			"refresh": true,
			"ChannelGroup": "Status",
			"actions": [],
			"category": "temperature",
			"tags": [


Thank you very much.

kind regards Jörg

got it ,thnx

so i use at paperui :


and i get a nice color flow at my lamp.But when i try to use the same command in a rule


i get a rule error like

2021-02-14 17:59:46.126 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model 'livingroom_switch.rules' has errors, therefore ignoring it: [10,68]: missing ')' at 'cf'

[10,82]: mismatched input ',' expecting 'end'

what am i doing wrong?
edit: nevermind got it,i must use a \ before every "