Xiaomi Smart Home Gateway - unable to set light and sound

I have a Mi Smart Home Gateway v3 up and running with some sensors connected:

Xiaomi Mi Smart Home Gateway
Xiaomi Aqara Water Sensor
Xiaomi Door Sensors
Xiaomi Mijia Honeywell Fire Alarm Detector

This works perfectly well downstream, meaning state changes of the sensors are beeing recognized by oh instantly.
But when I try to set e.g. light or play a sound on the Smart Home Gateway that simply does not work. The logs have no errors - everything fine - but nothing happens. I have no clue why

Appreciate any help / hints

Thank you!

Part of my rules:

rule "Mijia & Aqara Haustuer"
when
    Item XIAOMI_doorsensor1_Status changed
then
    if (XIAOMI_doorsensor1_Status.state == OPEN) {
		if (DEBUG == 1) {
			logInfo("rule-xiaomi", "HaustĂĽr offen")
		}
		Thread::sleep(5000) /* wait for 5 seconds */
    	Xiaomi_Gateway_Color.sendCommand("0,100,100")
	    Xiaomi_Gateway_Brightness.sendCommand(50)
		sendCommand(Xiaomi_Gateway_SoundVolume, 13)
		sendCommand(Xiaomi_Gateway_Sound, 10011)
		Thread::sleep(5000) /* wait for 5 seconds */
    	Xiaomi_Gateway_Color.sendCommand("0,0,0")
	    Xiaomi_Gateway_Brightness.sendCommand(0)
		sendCommand(Xiaomi_Gateway_Sound, 10000)
		sendCommand(Xiaomi_Gateway_SoundVolume, 0)	    
		
		sendCommand(Xiaomi_Gateway_SoundVolume, 2)
    	sendCommand(Xiaomi_Gateway_Sound, 11)
    	Thread::sleep(2000) /* wait for 2 seconds */
    	sendCommand(Xiaomi_Gateway_Sound, 10000)
    	sendCommand(Xiaomi_Gateway_SoundVolume, 0)
    } else {

and the logs:

2018-12-09 17:14:08.049 [ome.event.ItemCommandEvent] - Item 'Xiaomi_Gateway_Color' received command 0,100,100

2018-12-09 17:14:08.106 [ome.event.ItemCommandEvent] - Item 'Xiaomi_Gateway_Brightness' received command 50

2018-12-09 17:14:08.119 [ome.event.ItemCommandEvent] - Item 'Xiaomi_Gateway_SoundVolume' received command 13

2018-12-09 17:14:08.132 [ome.event.ItemCommandEvent] - Item 'Xiaomi_Gateway_Sound' received command 10011

2018-12-09 17:14:08.142 [vent.ItemStateChangedEvent] - Xiaomi_Gateway_Color changed from 0,0,0 to 0,100,100

2018-12-09 17:14:08.182 [vent.ItemStateChangedEvent] - Xiaomi_Gateway_Brightness changed from 0 to 50

2018-12-09 17:14:08.200 [vent.ItemStateChangedEvent] - Xiaomi_Gateway_SoundVolume changed from 0 to 13

2018-12-09 17:14:08.205 [vent.ItemStateChangedEvent] - Xiaomi_Gateway_Sound changed from 10000 to 10011

2018-12-09 17:14:15.147 [ome.event.ItemCommandEvent] - Item 'Xiaomi_Gateway_Color' received command 0,0,0

2018-12-09 17:14:15.170 [ome.event.ItemCommandEvent] - Item 'Xiaomi_Gateway_Brightness' received command 0

2018-12-09 17:14:15.178 [ome.event.ItemCommandEvent] - Item 'Xiaomi_Gateway_Sound' received command 10000

2018-12-09 17:14:15.187 [ome.event.ItemCommandEvent] - Item 'Xiaomi_Gateway_SoundVolume' received command 0

2018-12-09 17:14:15.218 [vent.ItemStateChangedEvent] - Xiaomi_Gateway_Color changed from 0,100,100 to 0,0,0

2018-12-09 17:14:15.240 [ome.event.ItemCommandEvent] - Item 'Xiaomi_Gateway_SoundVolume' received command 2

2018-12-09 17:14:15.259 [vent.ItemStateChangedEvent] - Xiaomi_Gateway_Brightness changed from 50 to 0

2018-12-09 17:14:15.264 [vent.ItemStateChangedEvent] - Xiaomi_Gateway_Sound changed from 10011 to 10000

2018-12-09 17:14:15.268 [vent.ItemStateChangedEvent] - Xiaomi_Gateway_SoundVolume changed from 13 to 0

2018-12-09 17:14:15.281 [ome.event.ItemCommandEvent] - Item 'Xiaomi_Gateway_Sound' received command 11

2018-12-09 17:14:15.286 [vent.ItemStateChangedEvent] - Xiaomi_Gateway_SoundVolume changed from 0 to 2

2018-12-09 17:14:15.302 [vent.ItemStateChangedEvent] - Xiaomi_Gateway_Sound changed from 10000 to 11


The logs show it changing,:thinking: if you comment out some of the rule, like below, does the first part work and set the light/sound?

rule "Mijia & Aqara Haustuer"
when
    Item XIAOMI_doorsensor1_Status changed
then
    if (XIAOMI_doorsensor1_Status.state == OPEN) {
		if (DEBUG == 1) {
			logInfo("rule-xiaomi", "HaustĂĽr offen")
		}
		Thread::sleep(5000) /* wait for 5 seconds */
    	Xiaomi_Gateway_Color.sendCommand("0,100,100")
	    Xiaomi_Gateway_Brightness.sendCommand(50)
		sendCommand(Xiaomi_Gateway_SoundVolume, 13)
		sendCommand(Xiaomi_Gateway_Sound, 10011)
//		Thread::sleep(5000) /* wait for 5 seconds */
//    	Xiaomi_Gateway_Color.sendCommand("0,0,0")
//	    Xiaomi_Gateway_Brightness.sendCommand(0)
//		sendCommand(Xiaomi_Gateway_Sound, 10000)
//		sendCommand(Xiaomi_Gateway_SoundVolume, 0)	    
		
//		sendCommand(Xiaomi_Gateway_SoundVolume, 2)
//    	sendCommand(Xiaomi_Gateway_Sound, 11)
//    	Thread::sleep(2000) /* wait for 2 seconds */
//    	sendCommand(Xiaomi_Gateway_Sound, 10000)
//    	sendCommand(Xiaomi_Gateway_SoundVolume, 0)
    } else {

Can you control the light at all with OH using something like basicUI, no rules?

When i comment out some of the rule the result is the same. Nothing happens …

2018-12-09 18:40:40.377 [ome.event.ItemCommandEvent] - Item 'Xiaomi_Gateway_Color' received command 0,100,100

2018-12-09 18:40:40.409 [ome.event.ItemCommandEvent] - Item 'Xiaomi_Gateway_Brightness' received command 50

2018-12-09 18:40:40.428 [vent.ItemStateChangedEvent] - Xiaomi_Gateway_Color changed from 0,0,0 to 0,100,100

2018-12-09 18:40:40.459 [ome.event.ItemCommandEvent] - Item 'Xiaomi_Gateway_SoundVolume' received command 13

2018-12-09 18:40:40.473 [ome.event.ItemCommandEvent] - Item 'Xiaomi_Gateway_Sound' received command 10011

2018-12-09 18:40:40.493 [vent.ItemStateChangedEvent] - Xiaomi_Gateway_Brightness changed from 0 to 50

2018-12-09 18:40:40.522 [vent.ItemStateChangedEvent] - Xiaomi_Gateway_SoundVolume changed from 0 to 13

2018-12-09 18:40:40.530 [vent.ItemStateChangedEvent] - Xiaomi_Gateway_Sound changed from 10000 to 10011

No cannot change at all - only with the xiaomi app.

Looks like the problem’s with Smart Home Gateway. I’ve never use this, so my only advice is to post all your smart home associated things/items/config’s, etc… for review. Maybe a simple config issue that another user may spot.

EDIT: Doing a quick scan of the doc’s I noticed the Developers Key is required if you want to be able to send controls to the devices like the light of the gateway. Is this referring to a light/led on the physical gateway device or a light/lamp that’s connected to the gateway? The key can be entered and saved at Paper UI, Configuration, Things, Xiaomi Gateway, Edit, Developer Key

thanks for your help - i know the developer key thing - I already entered the developer key.
Assuming the key might be wrong - how can I see in the logs?

I have check the developer key: When I change the developer key to FF… I’ll see an error in the logs:

2018-12-10 20:09:29.698 [ome.event.ItemCommandEvent] - Item 'Xiaomi_Gateway_Brightness' received command 50
2018-12-10 20:09:29.696 [WARN ] [ing.mihome.internal.EncryptionHelper] - Failed to init Cipher
2018-12-10 20:09:29.724 [ome.event.ItemCommandEvent] - Item 'Xiaomi_Gateway_SoundVolume' received command 13
2018-12-10 20:09:29.743 [WARN ] [ing.mihome.internal.EncryptionHelper] - Failed to init Cipher

After setting the developer key to the correct value this error is gone. So i assume the developer key is the right one.

Anyone a tipp for me what might me wrong here?

Any help is very much appreciated

Stefan

After digging thru many postings here it might be the case that i have a multicast issue - which is mentioned several times in diverse postings and seems to fit what I encounter.
But I have no clue how to dig deeper into this and all the postings didn’t help since I have only very basic network knowledge.
I have a fritzbox 7362SL and I have turned on IP TV support which in my understanding enables multicast support.
My openhab2 (latest stable) is running on a Pi3 and is connected via ethernet to the fritz.box.
The xiaomi gateway is connected to the fritz.box wlan.

I have enabled TRACEing within the KARAF console for the xiaomi binding. But i do not see any trace logs in the openhab/event log (heartbeats).

How can i figure out if multicast is working correctly in my setup?

1 Like

Hello Stefan did you find a solution for the problem?Cause I got the same issue with my gateways. Can control the by the Xiaomi app and the changes where displayed on paper and basic ui, but controlling the gateways with openhab is not possible.
Michael

Hi Michel,
i haven’t found any solution. What I have done is throw the gateways away and use zigbee2mqtt for integrating zigbee sensors (like the Xiaomi sensors) which works like a charme (besides not using a china cloud service).
Sorry maybe not the answer you would love to hear :expressionless:

Stefan