Xiaomi Robot Vacuum Binding

hey, could you add a working link please? your link brings me to the search page of openhab with a bunch of different topics, but not no a related problem solving help… many thanks!

Sorry try this

I have added th following thing to .things:

Thing miio:vacuum:0XXXXXXX “Xiaomi Robot Vaccum Cleaner” [ host=“192.168.0.xxx”, token=“xxxxxxxxxxxxxxxx” ]

Currently I am getting “Configuration Error”. The token i used worked for me, but now I have change to this binding, update the Mi Home App and updated the robot software. Might be that the token is no more valid?

Also,

Should I use miio:vacuum or miio:generic?

[Edited]

1. It was an issue with the token. I have extracted the token again and now it works
2. I use miio:vacuum and it seems to work fine

Thx for any help

Thank you for this great binding,
I’m using it for the Xiaomi PHILIPS Zhirui Smart LED Bulb E14 Candle Lamp.
https://www.gearbest.com/candle-bulbs/pp_1645206.html

can you please add the device string philips.light.candle so it isnt detected as unsupported device ?

I’ve set it up as basic device with device model string philips.light.bulb and can confirm all channels are working.

Edit:
Ok not all channels are working DV and SwitchScene return

Error received: {"code":-10000,"message":"Method not found."}

Thank @Ilias as it is somewhat different, I’ll make a copy and remove those properties.
I’m on holidays at the moment, will do when I’m back

Hi, can someone give me example of miio.thinks file for Philips ZhiRui bedside lamp?
I tryed

Thing miio:lumi-gateway-v3_miio80945609:0444589 “Philips ZhiRui bedside lamp” [ host=“192…”, token=“xxx” ]

Thing miio:generic:0444589 “Philips ZhiRui bedside lamp” [ host=“192…”, token=“xxx” ]

but seems not working …

or

Thing miio:unsupported:0444589 “Philips ZhiRui bedside lamp” [ host=“192…”, token=“xxx” ]
(with this “unsupported” show online but only items power and command …)

The number is MAC of the lamp wifi internaface or something else?

also miio.items file will be handy :slight_smile:

Thnx

Your device is not yet supported.
Try as thing miio:basic
Than change in the config the model to philips.light.bulb

For example item file look in the readme

Hi Marcel, you are so good, reply even from holifday :slight_smile:

Means:

Thing miio:basic:ZZZ “Philips ZhiRui bedside lamp” [ host=“192…”, token=“xxx” ]

what to use as ZZZ? random 7digit number?

What you mean by changing model in config? Means add items into miio.items file like this?

Switch power “Power” {channel=“miio:basic:ZZZ:power”}
Number brightness “Brightness” {channel=“miio:basic:ZZZ:brightness”}
Number cct “Correlated Color Temperature” {channel=“miio:basic:ZZZ:cct”}
Number scene “Scene” {channel=“miio:basic:ZZZ:scene”}
Number dv “DV” {channel=“miio:basic:ZZZ:dv”}
Switch switchscene “Switch Scene” {channel=“miio:basic:ZZZ:switchscene”}
Switch delayoff “Delay Off” {channel=“miio:basic:ZZZ:delayoff”}
Switch toggle “Toggle” {channel=“miio:basic:ZZZ:toggle”}

In Inbox I see 2 items (after i added binding and try discovery - without items and thinks files)

Xiaomi Mi IO Device 04D37F89 (80969609) lumi-gateway-v3_miio80969609 (miio:unsupported:04D37F89)

and

Xiaomi Mi IO Device 0533726B (87257707) (miio:generic:0533726B)

Readme is very vell done!
If I like you help add this lamp into your Binding, what you need from me to investigate?

Enjoy holiday!

Based on what your discovery have I guess
Device 0533726B is your light (unless you have other Xiaomi devices as well)

When adding by file I think you can give it any Id, not even need to be 0533726B. This is is just the Id the device gives itself.

Any way with model I mean something like this

Thing miio:basic:0533726B “Philips ZhiRui bedside lamp” [ host=“192…”, token=“xxx” ,model="philips.light.bulb"]

To add it as supported device, please check if it is like any of the existing Phillips light devices (by testing the various Phillips lamp model strings)
Than let me know what is your model  and which device it is similar to. I can then add it to the database. If too different, a new database needs to be created... You'll need than to scout the internet for info for for device

I have an issue with the Yeelight LED Ceiling Lamp v4 (JIAOYUE 650 RGB)

When I want to change the brightness of the lamp it does not work.
Changing ambient brightness works and changing night brightness works only the normal brightness channel is not working. (miio:generic:0456E259:brightness)
I can change the value of the item attached to it to what ever I want but there is no reaction, also there is nothing in the logs when turning on the lamp. Normally it should log the change in brightness value then right ?

What can I do to fix it?

@marcel_verpaalen could you advise on that?

Is there a full list of error states? Want to use a german map transformation for the “error string”.

For status string i use:

String statusStatus “Status [MAP(xiaomistatus.map):%s]” (gVacStat) {channel=“miio:vacuum:XXX:status#state”}

xiaomistatus.map

Idle=Einsatzbereit
Sleeping=Ruhemodus
Cleaning=am Saugen
Paused=Pause
Returning Dock=zurück zum Dock
Charging=Lädt

But not sure if this is really the full list.

For the list of errors see here

However I think you need this list

1 Like

Shame on me… I could have found myself :wink:

Thx @marcel_verpaalen

If someone needs a german translation:

xiaomi_error.map

No\ error=keine Fehler
Laser\ distance\ sensor\ error=Fehler Laserdistanzsensor
Collision\ sensor\ error=Fehler Kollisionssensor
Wheels\ on\ top\ of\ void,\ move\ robot=Räder ohne Haftung, Roboter bewegen
Clean\ hovering\ sensors,\ move\ robot=Schwebesensoren reinigen
Clean\ main\ brush=Hauptbürste reinigen
Clean\ side\ brush=Seitenbürste reinigen
Main\ wheel\ stuck?=Hauptrad blockiert?
Device\ stuck,\ clean\ area=Staubsauger festgefahren
Dust\ collector\ missing=Staubbehälter fehlt
Clean\ filter=Filter reinigen
Stuck\ in\ magnetic\ barrier=in Magnetschranke festgefahren
Low\ battery=Akkustand niedrig
Charging\ fault=Ladefehler
Battery\ fault=Akkufehler
Wall\ sensors\ dirty,\ wipe\ them=Wandsensoren verschmutzt
Place\ me\ on\ flat\ surface=auf flachem Untergrund platzieren
Side\ brushes\ problem,\ reboot\ me=Fehler Seitenbürste
Suction\ fan\ problem=Fehler Sauggebläse
Unpowered\ charging\ station=Ladestation ohne Strom
Unknown\ Error=unbekannter Fehler

xiaomi_status.map

Unknown=unbekannt
Initiating=Initiiere
Remote\ Control=Fernbedienung
Manual\ Mode= manueller Modus
Charging\ Error=Ladefehler
Idle=Einsatzbereit
Sleeping=Ruhemodus
Cleaning=am Saugen
Paused=Pause
Returning\ Dock=zurück zum Dock
Charging=am Laden
Spot\ Cleaning=punktuelle Reinigung
In\ Error=Fehler
Shutting\ Down=Herunterfahren
Updating=Aktualisierung
Docking=Andocken
Zone\ Clean=Zonenreinigung
Full=Voll
1 Like

@salexes sorry no direct advice.

You may need to change the colormode in order to have the light respond to brightness.

The challenging part of yeelight is that depending on the colormode different parameters are updatable.
E.g this can be seen with brightness Vs on/off.
You would expect brightness 0 = off but it does not respond that way.

If changing the colormode does not help…The only other advice I can give… Try it you can find the right command in a forum or e.g with python-miio. Than we can maybe improve the database file for your light

I’ve added (experimental) support for your light. Please update your binding and give it a try.

This device is added as well

1 Like

Marcel, Thanks a lot, I am not sure If I doing it correctly …

I got new file https://openhab.jfrog.io/openhab/libs-pullrequest-local/org/openhab/binding/org.openhab.binding.miio/2.4.0-SNAPSHOT/org.openhab.binding.miio-2.4.0-SNAPSHOT.jar

And instead of
Thing miio:basic:0533726B “Philips ZhiRui bedside lamp” [ host=“1xxxx”, token=“xxx”, model=“philips.light.bulb” ]

I did
Thing miio:basic:0533726B “Philips ZhiRui bedside lamp” [ host=“1xxxx”, token=“xxx”, model=“philips.light.moonlight” ]

In first I got power and other stuff and I was able switch on off
Second with binding update I see only Items Network and Action - Execute Command

even with my items file:

// Philips ZhiRui bedside lamp WIFI
Switch power “Power” {channel=“miio:basic:0533726B:power”}
Dimmer brightness “Brightness” {channel=“miio:basic:0533726B:brightness”}
Dimmer cct “Correlated Color Temperature” {channel=“miio:basic:0533726B:cct”}
Number scene “Scene” {channel=“miio:basic:0533726B:scene”}
Number dv “DV” {channel=“miio:basic:0533726B:dv”}
Switch switchscene “Switch Scene” {channel=“miio:basic:0533726B:switchscene”}
Switch delayoff “Delay Off” {channel=“miio:basic:0533726B:delayoff”}
Switch toggle “Toggle” {channel=“miio:basic:0533726B:toggle”}

----- EDIT

When I do miio.things like

Thing miio:basic:0533726B “Philips ZhiRui bedside lamp” [ host=“1xxxx”, token=“xxx” ]

I get messages:
Mi IO model philips.light.moonlight identified as: Xiaomi Philips ZhiRui bedside lamp (philips.light.moonlight). Matches thingtype miio:basic
and then
Database entry for model ‘philips.light.moonlight’ cannot be found.

Thank you :slight_smile:

@CoolTom :frowning: my bad… I made a typo in the database entry (entered philips.light.moon instead of philips.light.moonlight ) I fixed it now…