This page last changed on Aug 23, 2014 by josako.

Hi all,

I was able to set up the necessary hue commands to control my Philips Hue lightstrips. The HowTo proved to be very useful However, I do have 2 lightstrips at this time. I have a problem with assigning colors. I set up the commands, sensors and rules as defined in the HowTo. Then I created 2 color pickers to set the colors of the different lightstrips. Unforntunately, it always changes the colors of the same lightstrip (the first one defined).
Is this due to the fact that I use "color" as the address in "SetVirtualColor" for both lightstrips? (i.e. is color a global variable, or local to the specific device?). I tried to change to "color2" for the 2nd lightstrip, but this fails (commands that are used in the same switch component should use an identical address). Then I removed all color related items in the device and tried to recreate them (using "color2"), however, that also fails.
How should I continue?



You will have to duplicate everything and change the URL's to fit for the second light.
Also duplicate the rules and change the command names there to reflect the names of the duplicated commands which use the URL for the 2nd light.

Posted by mredeker at Aug 24, 2014 19:40

Hi Markus

this is exactly what I did. lightstrips1 is always pointing to "1" in the URL, Lightstrips2 to "2". These are the rules I installed:

rule "process Verlichting Living Lightstrips 1 based on color picker value "
CustomState(source == "Verlichting Living Lightstrips 1-VirtualColorSensor", $rgb:value)
execute.command("Verlichting Living Lightstrips 1-SetHueColor", rgb2hue($rgb)0);
execute.command("Verlichting Living Lightstrips 1-Saturation", rgb2hue($rgb)1);
execute.command("Verlichting Living Lightstrips 1-Brightness", rgb2hue($rgb)2);

rule "process Verlichting Living Lightstrips 2 based on color picker value "
CustomState(source == "Verlichting Living Lightstrips 2-VirtualColorSensor", $rgb:value)
execute.command("Verlichting Living Lightstrips 2-SetHueColor", rgb2hue($rgb)0);
execute.command("Verlichting Living Lightstrips 2-Saturation", rgb2hue($rgb)1);
execute.command("Verlichting Living Lightstrips 2-Brightness", rgb2hue($rgb)2);

Kind regards,


Posted by josako at Aug 25, 2014 08:40

Then it might indeed be related to the address in the virtual command.
Try and use color1 and color2.

Posted by mredeker at Aug 25, 2014 08:55

Yes, addresses used for the In Memory Virtual Command will be global to the whole controller.
Having commands in different devices would not "isolate" the addresses (i.e. the device does not act as a namespace for the addresses).

Posted by ebariaux at Sep 08, 2014 07:37
Document generated by Confluence on Jun 05, 2016 09:35