We have moved at community.getvera.com

Author Topic: Aeotek RGBW Bulb Lighting Problem in Scenes in UI7  (Read 2282 times)

Offline wazzalisk

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
Aeotek RGBW Bulb Lighting Problem in Scenes in UI7
« on: July 02, 2016, 06:10:33 pm »
First of all, hi everyone! I'm new here and this is my new post haha. I'm just some random Asian from Australia  ;D

Ok, so I recently bought a few Aeotek RGBW bulbs, and they work really nice. That is, until I decided to play around with them in scenes.

So, basically, if I go to Aeotek settings through the 'Devices' panel, I can change a lot of options for the lighting, including these two colour sliders (I'm guessing they are warm white and/or cold white settings?). I have attached a screenshot. So I really like the setting I have chosen, which is to the right end of the bottom slider (The orange to blue slider).

Now, here is the problem. I want to light up the bulb when a sensor detects motion. However, when I go to create the action in UI7, I am stuck with just the RGB colour selection, and no sliders. And this creates a very dark RGB lighting which I do not want. I have also attached a screenshot. As you can see, I can only choose from that colour dropdown box.

Now, I have tried doing this through advanced options, but with no luck. There is setColor, setColorRGB and setColorTemp. I could only get setColorRGB working by inputting 255,255,255 etc. for the value. Also tried 255,255,255,255,255 with no luck. but again, that only sets the RGB mode on, and not the white I want to set. SetColor doesn't even light up the bulb (maybe I'm typing the parameter values wrong?)

I also tried using Luup code which I found here and on other sites, with something like:
luup.call_action(?urn:upnp-org:serviceId:RGBController1?, ?SetColorTarget?, {newColorTargetValue = ?#FF0000FF?}, <idPlugin>)
Where <idplugin> I used "8" as my device Id is #8. And this didn't even light up my bulb.

So here I am guys, stuck =/. I am very new to this whole home automation, and even newer to Luup code. So hope you guys can help me out here. I'm using VeraEdge with UI7.

EDIT: I tried RGBController, but that App doesn't seem to work properly (I can only assign the created device to a room, nothing else. Cannot assign and bulbs to the app).
« Last Edit: July 02, 2016, 06:13:29 pm by wazzalisk »

Offline daemondazz

  • Jr. Member
  • **
  • Posts: 96
  • Karma: +4/-0
Re: Aeotek RGBW Bulb Lighting Problem in Scenes in UI7
« Reply #1 on: July 04, 2016, 10:00:56 pm »
As you've worked out, SetColorRGB takes a red, green, blue triplet. To set the white mode you should use SetColor with a string:

Warm White: Wx
Cool White: Dx

Where x is between 0 and 255.

Eg, I use W192 for mine.

Offline kigmatzomat

  • Sr. Member
  • ****
  • Posts: 377
  • Karma: +23/-0
Re: Aeotek RGBW Bulb Lighting Problem in Scenes in UI7
« Reply #2 on: July 04, 2016, 10:05:19 pm »
I don't have those bulbs but you probably need the generic brightness command. Here is a snippet of a scene that sets a lamp (device=40)brightness to 70%.


device=40
lightLevel=70
luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = lightLevel}, device)

Offline daemondazz

  • Jr. Member
  • **
  • Posts: 96
  • Karma: +4/-0
Re: Aeotek RGBW Bulb Lighting Problem in Scenes in UI7
« Reply #3 on: July 04, 2016, 10:08:40 pm »
The "issue" with these bulbs is they remember the last colour, so if you're playing with the RGB sliders but want a scene to use a specific colour, you need to explicitly send it.

I use these bulbs as night lights for the kids, so have a scene set it to a dull red at bed time and then back to white in the morning. This requires using setColor/setColorRGB along with setLoadLevel.

Offline wazzalisk

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
Re: Aeotek RGBW Bulb Lighting Problem in Scenes in UI7
« Reply #4 on: July 05, 2016, 09:53:11 pm »
As you've worked out, SetColorRGB takes a red, green, blue triplet. To set the white mode you should use SetColor with a string:

Warm White: Wx
Cool White: Dx

Where x is between 0 and 255.

Eg, I use W192 for mine.

Could you write a sample code out? Mine still isn't changing it from RGB mode into White mode. here is my code:

Code: [Select]
local devId = 8
local whiteStatus = "W255"
local newBrightness = 100

luup.call_action("urn:upnp-org:serviceId:RGBController1", "SetColorTarget", {newColorTargetValue = whiteStatus}, devId)
luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = newBrightness}, devId)

When I give it a random colour from the Devices panel, and run this code, it just changes the load level, but not the color =/.

Offline daemondazz

  • Jr. Member
  • **
  • Posts: 96
  • Karma: +4/-0
Re: Aeotek RGBW Bulb Lighting Problem in Scenes in UI7
« Reply #5 on: July 05, 2016, 10:31:36 pm »
You're pretty close :)
The Service ID for the SetColor is not defined by upnp.org, but is an MCV specific one, also the command is SetColor (without Target) and the argument newColorTarget (without Value):

Code: [Select]
local devId = 8
local whiteStatus = "W255"
local newBrightness = 100

luup.call_action("urn:micasaverde-com:serviceId:Color1", "SetColor", {newColorTarget = whiteStatus}, devId)
luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = newBrightness}, devId)

Btw, I determined these figures originally by examining the LUUP files under Apps -> Develop Apps. If you look at the Advanced settings for the device, you will see it has an XML device file (starts with D_ and and in this case is D_DimmableRGBLight2.xml). If you view that file you can see a list of services. Each service defines the service ID and also a reference to the service XML file (starts with S_ and for this service is S_Color1.xml). If you then view that file you can see the commands and the arguments they take.

Offline wazzalisk

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
Re: Aeotek RGBW Bulb Lighting Problem in Scenes in UI7
« Reply #6 on: July 06, 2016, 12:16:32 am »
You're pretty close :)
The Service ID for the SetColor is not defined by upnp.org, but is an MCV specific one, also the command is SetColor (without Target) and the argument newColorTarget (without Value):

Code: [Select]
local devId = 8
local whiteStatus = "W255"
local newBrightness = 100

luup.call_action("urn:micasaverde-com:serviceId:Color1", "SetColor", {newColorTarget = whiteStatus}, devId)
luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = newBrightness}, devId)

Btw, I determined these figures originally by examining the LUUP files under Apps -> Develop Apps. If you look at the Advanced settings for the device, you will see it has an XML device file (starts with D_ and and in this case is D_DimmableRGBLight2.xml). If you view that file you can see a list of services. Each service defines the service ID and also a reference to the service XML file (starts with S_ and for this service is S_Color1.xml). If you then view that file you can see the commands and the arguments they take.

You, my friend, save lives! IT WORKED!!! Thankyou so much!