Xiaomi Robot Vacuum Binding

binding
vacuum
xiaomi
Tags: #<Tag:0x00007f182a4a9680> #<Tag:0x00007f182a4a93d8> #<Tag:0x00007f182a4a9298>

(Andrew Pawelski) #303

What is the rule for? the switch for the vacuum channel sets the Vac to vaccum and off sets it to dock


(Andrew Pawelski) #304

Does anyone know if this binding would support a Xaiomi Mi Camera?


(marcel) #305

I don’t expect it. Also the other implementations for miio have not included the cameras.


(Rohnny Swennen) #306

The model you showed probably not but this one seems to work with the gateway and actually functions as a ZigBee version gateway if I’m not mistaking. So I would place my bets on this model if you look for compatibility
https://nl.aliexpress.com/item/In-voorraad-Xiaomi-mijia-aqara-smart-camera-180-Graden-FOV-Aqara-Camera-1080-P-HD-Voor/32841441849.html?spm=a2g0z.search0104.3.13.JHPeQT&ws_ab_test=searchweb0_0%2Csearchweb201602_3_10152_10151_10065_10344_10068_10345_10342_10343_10340_10341_10541_10562_10084_10083_10304_10307_10177_10302_10539_10312_10059_10313_10314_10534_10533_100031_10603_10103_10594_10557_10596_10595_10142_10107%2Csearchweb201603_14%2CppcSwitch_2&btsid=c29d294c-e080-420b-b47b-94ea71779ca6&algo_expid=6ac9bb63-bfcf-4347-8429-701a325e19a8-2&algo_pvid=6ac9bb63-bfcf-4347-8429-701a325e19a8&rmStoreLevelAB=5


(Andy Wolff) #307

Oh sorry, the channel link is false. My Item “StartVacuum” has no link.
I wrote the items and rules out of my head.


(Igor) #308

Hi Marcel,
Thanks for this binding!
While using it, I can’t figure out how properly set up items for Philips Ceeling Light.
2.2.0-SNAPSHOT Build #1080 and 2.2.0.201711192121 binding
My items file:

Switch PhilipsCeiling "PhilipsCeiling"  <light>  { channel="miio:basic:84e8805c:power" }
Number PhilipsCeilingBright "PhilipsCeiling brightness [%.0f]" <dimmablelight> { channel="miio:basic:84e8805c:brightness" }
Number PhilipsCeilingCCT "PhilipsCeiling color temp [%.0f]" <dimmablelight> { channel="miio:basic:84e8805c:cct" }
Number PhilipsCeilingScene "Scene [MAP(scene.map):%s]" { channel="miio:basic:84e8805c:scene" }
Switch PhilipsCeilingSwitchScene "SwitchScene" { channel="miio:basic:84e8805c:switchscene" }
Switch PhilipsCeilingToggle "Toggle"{ channel="miio:basic:84e8805c:toggle" }

sitemap:

	Switch item=PhilipsCeiling
	Slider item=PhilipsCeilingBright 
	Slider item=PhilipsCeilingCCT
	Text item= PhilipsCeilingScene
	Switch item=PhilipsCeilingSwitchScene 	
	Switch item=PhilipsCeilingToggle

When trying to use “Toggle” I am getting these error:

2017-11-25 10:15:02.594 [WARN ] [nal.transport.MiIoAsyncCommunication] - Send command 'set_mode' with parameters [toggle][] -> 192.168.1.243 (Device: 0360EC9D) gave error com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 10 path $
==> /var/log/openhab2/events.log <==
2017-11-25 10:15:02.599 [vent.ItemStateChangedEvent] - PhilipsCeilingToggle changed from OFF to ON
==> /var/log/openhab2/openhab.log <==
2017-11-25 10:15:02.599 [ERROR] [nternal.profiles.ProfileCallbackImpl] - Exception occurred while calling handler: com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 10 path $

And cannot figure out how to select scene using PhilipsCeilingScene switch and using is just to show current scene.
My scene.map contains: 0=Manual, 1=Sun, 2=TV, 3=Warm, 4=Night
Here is some info about this lamp https://github.com/aholstenson/miio/issues/57
Any help?
Thanks!


(marcel) #309

Looks indeed like an error in the database.
I’ll take a look @ it.
In the mean time you can send the command via the command channel toggle[]
That should give the right result


(marcel) #310

@ip-ua pls update the binding to the latest version.
I made an update for the toggle error you see

wrt to the scene, what happens if you send just a a number 1, 2 3 or 4 without the mapping. Does that work for you?


(semaf) #311

I built up to turn of the Lights by an Amazon Dash Button but the log show me several Errors. The Dash Button is doing his job by toggle on off. I have installed the Addon today over OpenHab2

My item:

Switch RoomLight "Toggle"{ channel="miio:generic:039AB2C5:toggle" }

My rule:

rule "Dash button pressed"
    when
        Channel "amazondashbutton:dashbutton:0a-47-d9-0e-bb-d3:press" triggered
    then
        if (RoomLight.state!=ON)      // item OFF or uninitialized
                RoomLight.sendCommand(ON)
        else
                RoomLight.sendCommand(OFF)
end

The LOG:

22:11:58.750 [INFO ] [marthome.event.ChannelTriggeredEvent] - amazondashbutton:dashbutton:0a-47-d9-0e-bb-d3:press triggered 
22:11:58.917 [INFO ] [smarthome.event.ItemCommandEvent    ] - Item 'PhilipsCeilingToggle' received command OFF
22:11:58.924 [DEBUG] [inding.miio.handler.MiIoBasicHandler] - Locating action for channel toggle:OFF
22:11:58.924 [DEBUG] [inding.miio.handler.MiIoBasicHandler] - Sending command toggle[]
22:11:58.926 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":19,"method":"toggle","params":[]} -> 192.168.0.31 (Device: 039AB2C5 token: FB31FD9EC54D3808E9626B3BC1F8EE12 Queue: 1)
22:11:58.926 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Sending Ping 039AB2C5 (192.168.0.31)
22:11:59.040 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Ping 039AB2C5 (192.168.0.31) success
22:11:59.042 [DEBUG] [inding.miio.handler.MiIoBasicHandler] - Periodic update for 'miio:generic:039AB2C5' (miio:basic)
22:11:59.047 [DEBUG] [ing.miio.handler.MiIoAbstractHandler] - Received response for 039AB2C5 type: UNKNOWN, result: null, fullresponse: {"id":19,"error":{"code":-30001,"message":"Resp invalid json."}}
22:11:59.048 [DEBUG] [ing.miio.handler.MiIoAbstractHandler] - Error received: {"code":-30001,"message":"Resp invalid json."}
22:11:59.049 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Sending Ping 039AB2C5 (192.168.0.31)
22:11:59.053 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Ping 039AB2C5 (192.168.0.31) success
22:11:59.055 [ERROR] [ore.internal.events.OSGiEventManager] - Dispatching/filtering event for subscriber 'org.eclipse.smarthome.core.events.EventSubscriber' failed: java.lang.NoSuchMethodError: com.google.gson.JsonArray.add(Ljava/lang/String;)V
java.util.concurrent.ExecutionException: java.lang.NoSuchMethodError: com.google.gson.JsonArray.add(Ljava/lang/String;)V
	at java.util.concurrent.FutureTask.report(FutureTask.java:122)[:1.8.0_65]
	at java.util.concurrent.FutureTask.get(FutureTask.java:206)[:1.8.0_65]
	at org.eclipse.smarthome.core.common.SafeMethodCaller.callAsynchronous(SafeMethodCaller.java:194)[98:org.eclipse.smarthome.core:0.9.0.b5]
	at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:83)[98:org.eclipse.smarthome.core:0.9.0.b5]
	at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:67)[98:org.eclipse.smarthome.core:0.9.0.b5]
	at org.eclipse.smarthome.core.internal.events.OSGiEventManager.dispatchESHEvent(OSGiEventManager.java:188)[98:org.eclipse.smarthome.core:0.9.0.b5]
	at org.eclipse.smarthome.core.internal.events.OSGiEventManager.handleEvent(OSGiEventManager.java:163)[98:org.eclipse.smarthome.core:0.9.0.b5]
	at org.eclipse.smarthome.core.internal.events.OSGiEventManager.handleEvent(OSGiEventManager.java:146)[98:org.eclipse.smarthome.core:0.9.0.b5]
	at org.apache.felix.eventadmin.impl.handler.EventHandlerProxy.sendEvent(EventHandlerProxy.java:415)[6:org.apache.karaf.services.eventadmin:4.0.8]
	at org.apache.felix.eventadmin.impl.tasks.HandlerTask.run(HandlerTask.java:90)[6:org.apache.karaf.services.eventadmin:4.0.8]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_65]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_65]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_65]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_65]
	at java.lang.Thread.run(Thread.java:745)[:1.8.0_65]
Caused by: java.lang.NoSuchMethodError: com.google.gson.JsonArray.add(Ljava/lang/String;)V
	at org.openhab.binding.miio.handler.MiIoBasicHandler.refreshProperties(MiIoBasicHandler.java:175)
	at org.openhab.binding.miio.handler.MiIoBasicHandler.updateData(MiIoBasicHandler.java:164)
	at org.openhab.binding.miio.handler.MiIoBasicHandler.handleCommand(MiIoBasicHandler.java:138)
	at org.eclipse.smarthome.core.thing.internal.ThingManager$4.call(ThingManager.java:377)
	at org.eclipse.smarthome.core.thing.internal.ThingManager$4.call(ThingManager.java:1)
	at org.eclipse.smarthome.core.common.SafeMethodCaller.executeDirectly(SafeMethodCaller.java:218)
	at org.eclipse.smarthome.core.common.SafeMethodCaller.callAsynchronous(SafeMethodCaller.java:189)
	at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:83)
	at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:67)
	at org.eclipse.smarthome.core.thing.internal.ThingManager.receiveCommand(ThingManager.java:374)
	at org.eclipse.smarthome.core.items.events.AbstractItemEventSubscriber.receive(AbstractItemEventSubscriber.java:47)
	at org.eclipse.smarthome.core.internal.events.OSGiEventManager$1.call(OSGiEventManager.java:192)
	at org.eclipse.smarthome.core.internal.events.OSGiEventManager$1.call(OSGiEventManager.java:1)
	at org.eclipse.smarthome.core.common.SafeMethodCaller$CallableWrapper.call(SafeMethodCaller.java:181)
	... 4 more
22:13:06.400 [INFO ] [marthome.event.ChannelTriggeredEvent] - amazondashbutton:dashbutton:0a-47-d9-0e-bb-d3:press triggered 
22:13:06.422 [INFO ] [smarthome.event.ItemCommandEvent    ] - Item 'PhilipsCeilingToggle' received command OFF
22:13:06.426 [DEBUG] [inding.miio.handler.MiIoBasicHandler] - Locating action for channel toggle:OFF
22:13:06.427 [DEBUG] [inding.miio.handler.MiIoBasicHandler] - Sending command toggle[]
22:13:06.430 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":20,"method":"toggle","params":[]} -> 192.168.0.31 (Device: 039AB2C5 token: FB31FD9EC54D3808E9626B3BC1F8EE12 Queue: 1)
22:13:06.432 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Sending Ping 039AB2C5 (192.168.0.31)
22:13:06.436 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Ping 039AB2C5 (192.168.0.31) success
22:13:06.439 [DEBUG] [inding.miio.handler.MiIoBasicHandler] - Periodic update for 'miio:generic:039AB2C5' (miio:basic)
22:13:06.440 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Sending Ping 039AB2C5 (192.168.0.31)
22:13:06.446 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Ping 039AB2C5 (192.168.0.31) success
22:13:06.451 [ERROR] [ore.internal.events.OSGiEventManager] - Dispatching/filtering event for subscriber 'org.eclipse.smarthome.core.events.EventSubscriber' failed: java.lang.NoSuchMethodError: com.google.gson.JsonArray.add(Ljava/lang/String;)V
java.util.concurrent.ExecutionException: java.lang.NoSuchMethodError: com.google.gson.JsonArray.add(Ljava/lang/String;)V
	at java.util.concurrent.FutureTask.report(FutureTask.java:122)[:1.8.0_65]
	at java.util.concurrent.FutureTask.get(FutureTask.java:206)[:1.8.0_65]
	at org.eclipse.smarthome.core.common.SafeMethodCaller.callAsynchronous(SafeMethodCaller.java:194)[98:org.eclipse.smarthome.core:0.9.0.b5]
	at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:83)[98:org.eclipse.smarthome.core:0.9.0.b5]
	at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:67)[98:org.eclipse.smarthome.core:0.9.0.b5]
	at org.eclipse.smarthome.core.internal.events.OSGiEventManager.dispatchESHEvent(OSGiEventManager.java:188)[98:org.eclipse.smarthome.core:0.9.0.b5]
	at org.eclipse.smarthome.core.internal.events.OSGiEventManager.handleEvent(OSGiEventManager.java:163)[98:org.eclipse.smarthome.core:0.9.0.b5]
	at org.eclipse.smarthome.core.internal.events.OSGiEventManager.handleEvent(OSGiEventManager.java:146)[98:org.eclipse.smarthome.core:0.9.0.b5]
	at org.apache.felix.eventadmin.impl.handler.EventHandlerProxy.sendEvent(EventHandlerProxy.java:415)[6:org.apache.karaf.services.eventadmin:4.0.8]
	at org.apache.felix.eventadmin.impl.tasks.HandlerTask.run(HandlerTask.java:90)[6:org.apache.karaf.services.eventadmin:4.0.8]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_65]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_65]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_65]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_65]
	at java.lang.Thread.run(Thread.java:745)[:1.8.0_65]
Caused by: java.lang.NoSuchMethodError: com.google.gson.JsonArray.add(Ljava/lang/String;)V
	at org.openhab.binding.miio.handler.MiIoBasicHandler.refreshProperties(MiIoBasicHandler.java:175)
	at org.openhab.binding.miio.handler.MiIoBasicHandler.updateData(MiIoBasicHandler.java:164)
	at org.openhab.binding.miio.handler.MiIoBasicHandler.handleCommand(MiIoBasicHandler.java:138)
	at org.eclipse.smarthome.core.thing.internal.ThingManager$4.call(ThingManager.java:377)
	at org.eclipse.smarthome.core.thing.internal.ThingManager$4.call(ThingManager.java:1)
	at org.eclipse.smarthome.core.common.SafeMethodCaller.executeDirectly(SafeMethodCaller.java:218)
	at org.eclipse.smarthome.core.common.SafeMethodCaller.callAsynchronous(SafeMethodCaller.java:189)
	at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:83)
	at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:67)
	at org.eclipse.smarthome.core.thing.internal.ThingManager.receiveCommand(ThingManager.java:374)
	at org.eclipse.smarthome.core.items.events.AbstractItemEventSubscriber.receive(AbstractItemEventSubscriber.java:47)
	at org.eclipse.smarthome.core.internal.events.OSGiEventManager$1.call(OSGiEventManager.java:192)
	at org.eclipse.smarthome.core.internal.events.OSGiEventManager$1.call(OSGiEventManager.java:1)
	at org.eclipse.smarthome.core.common.SafeMethodCaller$CallableWrapper.call(SafeMethodCaller.java:181)
	... 4 more
22:13:06.534 [DEBUG] [ing.miio.handler.MiIoAbstractHandler] - Received response for 039AB2C5 type: UNKNOWN, result: null, fullresponse: {"id":20,"error":{"code":-30001,"message":"Resp invalid json."}}
22:13:06.535 [DEBUG] [ing.miio.handler.MiIoAbstractHandler] - Error received: {"code":-30001,"message":"Resp invalid json."}

(marcel) #312

The toggle command is bit of a strange one. The official app does not seem to use it. If you used it on this device it seems to work (at least in my testing), but it gives a strange json error .
As it works i did not remove it even though the error.

What if you just use on/off command, do you still experience this error’


(semaf) #313

Yes, have the same error with on off too. At least there is no toggle function, you do like the rule above.


(Igor) #314

Hi Marcel,
Thanks for the update.
I do not know how manually send the command via the command channel toggle[] - so can’t try this.
However with latest version of binding toggle is working without any errors.
About Scene - I just updated item:

Number PhilipsCeilingScene "Scene" { channel="miio:basic:84e8805c:scene" }

and sitemap:

Selection item=PhilipsCeilingScene label="Scene" mappings=[0="Manual", 1="Sun", 2="ТV", 3="Warm", 4="Night"]

Now all is working like a charm !
Also, can you add Mi Yeelight lamps ? I have all three types of them and all detected as “unsupported” now and should be “basic”, I think. Tested Yeelight binding before, but it’s not supported any more. Many OpenHab users will be happy if you add Yeelight lamps support.
Some docs available here https://github.com/aholstenson/miio/blob/master/docs/devices/light.md
Thanks!


(Rohnny Swennen) #315

Don’t forget a rule to update the status of the switch when the status of the vacuum changes away from cleaning.
Otherwise the switch will remain on ON when you start the robot and when the room is finished it automatically returns to the dock.


(Marat) #316

Hello guys. I’m wondering if there is step by step manual, how to get tokens if I use android without root.
Thanks!


(marcel) #317

@ip-ua can you pm me the log files for your yeelights. (esp the responses for the miio.info & get_props commands)
I’ll add them to the database. I think most functions work except for color commands.


(Igor) #318

Marcel.
Here is what I receive for yeelink.light.mono1 device:

2017-12-03 18:14:51.830 [vent.ItemStateChangedEvent] - Light_YeelightMonoCommand changed from get_props to miIO.info
==> /var/log/openhab2/openhab.log <==
2017-12-03 18:14:51.835 [INFO ] [.miio.handler.MiIoUnsupportedHandler] - Test command 'miIO.info'. Response: '1428'
2017-12-03 18:14:51.841 [INFO ] [.miio.handler.MiIoUnsupportedHandler] - Test command 'set_power["on"]'. Response: '1429'
2017-12-03 18:14:51.847 [INFO ] [.miio.handler.MiIoUnsupportedHandler] - Test command 'set_power["off"]'. Response: '1430'
2017-12-03 18:14:51.852 [INFO ] [.miio.handler.MiIoUnsupportedHandler] - Test command 'get_prop["power", "bright", "ct", "rgb"]'. Response: '1431'
2017-12-03 18:14:51.858 [INFO ] [.miio.handler.MiIoUnsupportedHandler] - Test command 'set_bright[50, "smooth", 500]'. Response: '1432'
2017-12-03 18:14:51.863 [INFO ] [.miio.handler.MiIoUnsupportedHandler] - Test command 'start_cf[ 4, 2, "1000, 2, 2700, 100, 500, 1,255, 10, 5000, 7, 0,0, 500, 2, 5000, 1"]'. Response: '1433'

2017-12-03 18:16:40.541 [vent.ItemStateChangedEvent] - Light_YeelightMonoCommand changed from miIO.info to get_props
==> /var/log/openhab2/openhab.log <==
2017-12-03 18:16:40.542 [INFO ] [.miio.handler.MiIoUnsupportedHandler] - Test command 'miIO.info'. Response: '1436'
2017-12-03 18:16:40.553 [INFO ] [.miio.handler.MiIoUnsupportedHandler] - Test command 'set_power["on"]'. Response: '1437'
2017-12-03 18:16:40.563 [INFO ] [.miio.handler.MiIoUnsupportedHandler] - Test command 'set_power["off"]'. Response: '1438'
2017-12-03 18:16:40.571 [INFO ] [.miio.handler.MiIoUnsupportedHandler] - Test command 'get_prop["power", "bright", "ct", "rgb"]'. Response: '1439'
2017-12-03 18:16:40.578 [INFO ] [.miio.handler.MiIoUnsupportedHandler] - Test command 'set_bright[50, "smooth", 500]'. Response: '1440'
2017-12-03 18:16:40.586 [INFO ] [.miio.handler.MiIoUnsupportedHandler] - Test command 'start_cf[ 4, 2, "1000, 2, 2700, 100, 500, 1,255, 10, 5000, 7, 0,0, 500, 2, 5000, 1"]'. Response: '1441'

Yeelight Ceeling:

2017-12-03 18:39:52.526 [ome.event.ItemCommandEvent] - Item 'YeelightCeilingCommand' received command miIO.info
2017-12-03 18:39:52.581 [vent.ItemStateChangedEvent] - YeelightCeilingCommand changed from miIO.info to {"result":{"life":785,"token":"c7c1de17d5850664ffc797d867xxxxxx","mac":"28:6C:07:F2:35:xx","fw_ver":"1.4.8_173","hw_ver":"MTK7697","uid":xxxxxxxxxxx,"model":"yeelink.light.ceiling1","wifi_fw_ver":"4.0.0","ap":{"rssi":-66,"ssid":"xx","bssid":"F4:EC:38:C7:B3:xx},"netif":{"localIp":"192.168.1.167","mask":"255.255.255.0","gw":"192.168.1.1","gw_mac":"D8:50:E6:D8:5D:xx"},"mmfree":96632},"id":2607}
2017-12-03 18:43:46.611 [vent.ItemStateChangedEvent] - YeelightCeilingCommand changed from {"result":{"life":785,"token":"c7c1de17d5850664ffc797d867xxxxxxx","mac":"28:6C:07:F2:35:xx","fw_ver":"1.4.8_173","hw_ver":"MTK7697","uid":166507xxxx,"model":"yeelink.light.ceiling1","wifi_fw_ver":"4.0.0","ap":{"rssi":-66,"ssid":"xx","bssid":"F4:EC:38:C7:B3:xx"},"netif":{"localIp":"192.168.1.167","mask":"255.255.255.0","gw":"192.168.1.1","gw_mac":"D8:50:E6:D8:5D:xx"},"mmfree":96632},"id":2607} to get_props

Yeelight RGB:

2017-12-03 19:09:15.189 [INFO ] [.miio.handler.MiIoUnsupportedHandler] - Start Experimental Testing of commands for device 'Yeelight Color Bulb (yeelink.light.color1)'. 
2017-12-03 19:09:15.196 [INFO ] [.miio.handler.MiIoUnsupportedHandler] - Test command 'miIO.info'. Response: '3'
2017-12-03 19:09:15.205 [INFO ] [.miio.handler.MiIoUnsupportedHandler] - Test command 'set_power["on"]'. Response: '4'
2017-12-03 19:09:15.213 [INFO ] [.miio.handler.MiIoUnsupportedHandler] - Test command 'set_power["off"]'. Response: '5'
2017-12-03 19:09:15.218 [INFO ] [.miio.handler.MiIoUnsupportedHandler] - Test command 'get_prop["power", "bright", "ct", "rgb"]'. Response: '6'
2017-12-03 19:09:15.224 [INFO ] [.miio.handler.MiIoUnsupportedHandler] - Test command 'set_bright[50, "smooth", 500]'. Response: '7'
2017-12-03 19:09:15.229 [INFO ] [.miio.handler.MiIoUnsupportedHandler] - Test command 'start_cf[ 4, 2, "1000, 2, 2700, 100, 500, 1,255, 10, 5000, 7, 0,0, 500, 2, 5000, 1"]'. Response: '8'

2017-12-03 19:11:53.573 [INFO ] [.miio.handler.MiIoUnsupportedHandler] - Start Experimental Testing of commands for device 'Yeelight Color Bulb (yeelink.light.color1)'. 
2017-12-03 19:11:53.587 [INFO ] [.miio.handler.MiIoUnsupportedHandler] - Test command 'miIO.info'. Response: '10'
2017-12-03 19:11:53.594 [INFO ] [.miio.handler.MiIoUnsupportedHandler] - Test command 'set_power["on"]'. Response: '11'
2017-12-03 19:11:53.601 [INFO ] [.miio.handler.MiIoUnsupportedHandler] - Test command 'set_power["off"]'. Response: '12'
2017-12-03 19:11:53.609 [INFO ] [.miio.handler.MiIoUnsupportedHandler] - Test command 'get_prop["power", "bright", "ct", "rgb"]'. Response: '13'
2017-12-03 19:11:53.616 [INFO ] [.miio.handler.MiIoUnsupportedHandler] - Test command 'set_bright[50, "smooth", 500]'. Response: '14'
2017-12-03 19:11:53.624 [INFO ] [.miio.handler.MiIoUnsupportedHandler] - Test command 'start_cf[ 4, 2, "1000, 2, 2700, 100, 500, 1,255, 10, 5000, 7, 0,0, 500, 2, 5000, 1"]'. Response: '15'

Hope these data help you.
Thanks for your work!


(marcel) #319

I’ve added the various yeelights. They will be detected as basic devices and have the yeelight propeties.
Pls test and feedback if this is working

note: just pushed version: will be available in the market in approx 20 minutes.
To upgrade uninstall and re-install the binding
For your yeelights: remove the thing and let it be discovered again as basic device


(Igor) #320

Thanks Marcel for your work!
First result of testing - Power and Brightness channels works with all 3 types of lamps.
Looks like “colorMode” channel should be “Number” - I see that it changes from 1 to 2 when I change lamp mode via original Yeelight app. And probably by the same reason it do not accept commands. Here is some data I found https://github.com/thoemmi/Yeelight/blob/master/src/Yeelight/LightMode.cs
Also “colorTemperature” channel do not accept commands but reports current temp in K.
Will give more update tomorrow.
Thanks!


(Pim Verschueren) #321

I don’t have enough knowledge to figure this all out but I think these sites might help to access the Xiaomi cloud information. Maybe someone can give it a shot to get i.e. the cleaning map into OpenHab?
Just open the page in Chrome and rightclick in order to translate:
https://opencloud.aqara.cn/help
http://help.opencloud.aqara.cn:4000/aiot-cloud-development

In order to generate an Developer account they ask for an ID which is a Chinese national ID which can be generated here: https://code-complete.com/chinaid/validids.php

I’ve requested an account just to see if it works :slight_smile:


(Mark) #322

@marcel_verpaalen I see a lot of these in my logs for my vacuum. They’re INFO level, so while I don’t know the cause, they appear to be harmless. In the short term, I’ll probably change the log level to WARN in order to suppress them. But, I thought I’d mention it here.

I’m running this version of the binding.

 11 │ Active   │  80 │ 2.2.0.201710221505     │ org.openhab.binding.miio
2017-11-30 09:09:09.183 [INFO ] [nal.transport.MiIoAsyncCommunication] - Received message is invalid JSON:
2017-11-30 09:09:39.256 [INFO ] [nal.transport.MiIoAsyncCommunication] - Received message is invalid JSON:
2017-11-30 09:09:39.259 [INFO ] [nal.transport.MiIoAsyncCommunication] - Received message is invalid JSON:
2017-11-30 09:09:39.261 [INFO ] [nal.transport.MiIoAsyncCommunication] - Received message is invalid JSON:
2017-11-30 09:10:09.343 [INFO ] [nal.transport.MiIoAsyncCommunication] - Received message is invalid JSON:
2017-11-30 09:10:09.345 [INFO ] [nal.transport.MiIoAsyncCommunication] - Received message is invalid JSON:
2017-11-30 09:10:09.347 [INFO ] [nal.transport.MiIoAsyncCommunication] - Received message is invalid JSON:
2017-11-30 09:10:39.530 [INFO ] [nal.transport.MiIoAsyncCommunication] - Received message is invalid JSON:
2017-11-30 09:10:39.532 [INFO ] [nal.transport.MiIoAsyncCommunication] - Received message is invalid JSON:
2017-11-30 09:10:39.535 [INFO ] [nal.transport.MiIoAsyncCommunication] - Received message is invalid JSON:
2017-11-30 09:11:09.615 [INFO ] [nal.transport.MiIoAsyncCommunication] - Received message is invalid JSON:
2017-11-30 09:11:09.617 [INFO ] [nal.transport.MiIoAsyncCommunication] - Received message is invalid JSON:
2017-11-30 09:11:09.619 [INFO ] [nal.transport.MiIoAsyncCommunication] - Received message is invalid JSON:
2017-11-30 09:11:39.700 [INFO ] [nal.transport.MiIoAsyncCommunication] - Received message is invalid JSON: