Milight Binding + Scene rules = sometimes no reaction

Hello,

I’m using some milight rgb bulbs, rev. 3 milight bridges, OH2 and the milight binding for OH2.

I created scene rules and each scene set different colors to the bulbs.
Works nearly perfect but sometimes one or more of the bulbs don’t react and stay at the last state.

At an earlier testing the bulbs needs three or for times pushing the buttons to react but I found out that setting a little relay between each command via the same bridge fixes the problem,
so maybe there is a similar problem when no juist sometimes the bulbs don’t react.

Note: when controlling the bulbs separately via normal switches (Habpanel or PaperUI) all of the bulbs are reacting without any problems,
the problem is just with the scene modus.

Does anyone have similar problems?

Here the associated .items

	// Scenes Dummy
	Number Scene_EZ
	// Scenes EZ Deckenlampe
	Number Scene_EZ_Deckenlampe
	Color  Scene_ColorSelect_EZ_Deckenlampe {channel="milight:rgbLed:F0FE6B1128D6:7:ledcolor"} 
	// Scenes EZ Bücherregal
	Number Scene_EZ_Buecherregal
	Color  Scene_ColorSelect_EZ_Buecherregal {channel="milight:rgbLed:F0FE6B1128D6:8:ledcolor"} 
	// Scenes EZ Sideboard
	Number Scene_EZ_Sideboard
	Color  Scene_ColorSelect_EZ_Sideboard  {channel="milight:rgbLed:F0FE6B1128D6:9:ledcolor"} 
	// EZ Deckenlampe Discomode
	// Dimmer DiscoMode		{channel="milight:rgbLed:F0FE6B1128D6:7:discomode"}
	// Dimmer DiscoSpeed		{channel="milight:rgbLed:F0FE6B1128D6:7:discoSpeed"}

and .rules

	// Scenes EZ
	rule "Scene EZ"
	when
	Item Scene_EZ received command 
	then
	/*Aus*/ if (receivedCommand==1) { 
	/*Aus*/ sendCommand(Scene_ColorSelect_EZ_Deckenlampe, new HSBType(new DecimalType(0),new PercentType(0),new PercentType(0)))
	/*Aus*/ Thread::sleep(500) sendCommand(Scene_ColorSelect_EZ_Buecherregal, new HSBType(new DecimalType(0),new PercentType(0),new PercentType(0)))
	/*Aus*/ Thread::sleep(500) sendCommand(Scene_ColorSelect_EZ_Sideboard, new HSBType(new DecimalType(0),new PercentType(0),new PercentType(0)))
	}
	/*Normal*/ if (receivedCommand==2) { 
	/*Weiss*/ sendCommand(Scene_ColorSelect_EZ_Deckenlampe, new HSBType(new DecimalType(0),new PercentType(0),new PercentType(70)))
	/*Aus*/ Thread::sleep(500) sendCommand(Scene_ColorSelect_EZ_Buecherregal, new HSBType(new DecimalType(0),new PercentType(0),new PercentType(0)))
	/*Aus*/ Thread::sleep(500) sendCommand(Scene_ColorSelect_EZ_Sideboard, new HSBType(new DecimalType(0),new PercentType(0),new PercentType(0)))
	}
	/*Hell*/ if (receivedCommand==3) { 
	/*Weiss*/ sendCommand(Scene_ColorSelect_EZ_Deckenlampe, new HSBType(new DecimalType(0),new PercentType(0),new PercentType(100)))
	/*Weiss*/ Thread::sleep(500) sendCommand(Scene_ColorSelect_EZ_Buecherregal, new HSBType(new DecimalType(0),new PercentType(0),new PercentType(100)))
	/*Weiss*/ Thread::sleep(500) sendCommand(Scene_ColorSelect_EZ_Sideboard, new HSBType(new DecimalType(0),new PercentType(0),new PercentType(100)))
	}
	/*Stimmung*/ if (receivedCommand==4) { 
	/*Lila*/ sendCommand(Scene_ColorSelect_EZ_Deckenlampe, new HSBType(new DecimalType(300),new PercentType(100),new PercentType(100)))
	/*Grün*/ Thread::sleep(500) sendCommand(Scene_ColorSelect_EZ_Buecherregal, new HSBType(new DecimalType(130),new PercentType(100),new PercentType(100)))
	/*Türkis*/ Thread::sleep(500) sendCommand(Scene_ColorSelect_EZ_Sideboard, new HSBType(new DecimalType(190),new PercentType(100),new PercentType(100)))
	}
	/*Grün*/ if (receivedCommand==5) { 
	/*Grün*/ sendCommand(Scene_ColorSelect_EZ_Deckenlampe, new HSBType(new DecimalType(130),new PercentType(100),new PercentType(100)))
	/*Grün*/ Thread::sleep(500) sendCommand(Scene_ColorSelect_EZ_Buecherregal, new HSBType(new DecimalType(130),new PercentType(100),new PercentType(100)))
	/*Grün*/ Thread::sleep(500) sendCommand(Scene_ColorSelect_EZ_Sideboard, new HSBType(new DecimalType(130),new PercentType(100),new PercentType(100)))
	}
	end

I’m using no .sitemap but Habpanel and buttons for each scene.
[URL=http://www.imagebam.com/image/00e881516061016][/URL]

Oh, and the other small thing is when changing the scene all of the bulbs flickers shortly 1x before taking the new setting

I don’t know this technology but both sound like hardware problems. The first problem looks like when you send the commands too close together they interfere with each other and prevent the bulbs from receiving an intelligible signal.

The second one sounds like that is how the bulbs work, though it could be caused by the binding or the bridge too.

It is not a binding issue, it is just like this cheap things work.
For me, they had been a total waste of money.

Thanks, that are my thoughts too and therefore the timeout solves the problem.Maybe I have to play around a little with the correct amount of time.

I’m not sure if this is correct because while controling the bulbs separately via OH or the MIlight android app there is no flickering when activate.

And for me ~20€ / 22 USD for each bulb and controller isn’t really cheap, it’s just less expensive than phillips hue.

“Cheap” is not always reflected in the price. :slight_smile:

I think I found the solution for both problems because of an other thread: Design Pattern: Motion Sensor Timer

1.) Using "sendCommand(OFF) " instead of "sendCommand(new HSBType(new DecimalType(0),new PercentType(0),new PercentType(0))) " solves the flickering problem
2.) since using "Thread::sleep(xyz) " I had no unreacting bulbs so it seems that the problem was overlapping commands at the same time. I tested a little bit and found 300 ms are enough to execute several commands -> “Thread::sleep(300)” between each command is perfect.

Thanks

Hey all,

a new version of the milight binding is in progress which allows to set the delay time between commands and repeats commands if configured to do so. You may have a look at:

or just wait until the new version is released.

Thanks,
David