LUA code to set lights to white in RGBW model?

Does anyone know what the lua code would be just to set the lights to white? I cant seem to find that anywhere. I am trying to run a sunrise simulation. Everything is working great at the end of the run though I want to chage the lights to white, but I cant seem to figure out the code to do this. I can change to every other color but not white. Thanks in advance

I use something like this for my Aeotec RBGW bulbs:

local devId = 30
local coolWhite = "#00000000ff"
local warmWhite = "#000000ff00"

function setRgbwWhite(colourHex, devId)
    local svcidRGB = "urn:upnp-org:serviceId:RGBController1"
    luup.call_action(svcidRGB, "SetColorTarget", {newColorTargetValue = colourHex}, devId)
end

luup.call_action("urn:dcineco-com:serviceId:MiLightRGBW1","SetWhiteMode",1,130) luup.call_action("urn:upnp-org:serviceId:Dimming1","SetLoadLevelTarget",{ newLoadlevelTarget = 100 },130)

In the code above, my device ID is 130. You call the SetWhiteMode action, then you can set the loadleveltarget to whatever you need it to.

Hope this helps! Let me know if you need anything else and I’ll contribute what I can.

[quote=“ceefin, post:3, topic:190620”] luup.call_action("urn:dcineco-com:serviceId:MiLightRGBW1","SetWhiteMode",1,130)[/quote]

Worked great thank you

If anyone is interested here is the section of code I am working with trying to simulate a sun rise working pretty well will probably tweak it a little but this is the jist.

local CNT
local CNT2
local BCNT
CNT =255
CNT2 =50
BCNT= 1



luup.call_action("urn:dcineco-com:serviceId:MiLightRGBW1", "SetHue", {newHue = "255"}, 200)
luup.sleep(500)
luup.call_action("urn:dcineco-com:serviceId:MiLightRGBW1", "SetHue", {newHue = "255"}, 200)
luup.call_action("urn:upnp-org:serviceId:Dimming1","SetLoadLevelTarget",{ newLoadlevelTarget = BCNT },200)
luup.sleep(500)
luup.call_action("urn:upnp-org:serviceId:Dimming1","SetLoadLevelTarget",{ newLoadlevelTarget = BCNT },200)
luup.call_action("urn:upnp-org:serviceId:SwitchPower1", "SetTarget", {newTargetValue = "1"}, 200)

while BCNT <100 do 
  luup.call_action("urn:upnp-org:serviceId:Dimming1","SetLoadLevelTarget",{ newLoadlevelTarget = BCNT },200)
  BCNT = BCNT+1
  luup.sleep(1000)
end


while CNT >=120 do 
  luup.call_action("urn:dcineco-com:serviceId:MiLightRGBW1", "SetHue", {newHue = CNT}, 200)
  CNT = CNT-1
  luup.sleep(1500)
end

luup.call_action("urn:upnp-org:serviceId:Dimming1","SetLoadLevelTarget",{ newLoadlevelTarget = CNT2 },200)
luup.call_action("urn:dcineco-com:serviceId:MiLightRGBW1","SetWhiteMode",1,200)
luup.sleep(500)
luup.call_action("urn:dcineco-com:serviceId:MiLightRGBW1","SetWhiteMode",1,200)
while CNT2 < 100 do 
  luup.call_action("urn:upnp-org:serviceId:Dimming1","SetLoadLevelTarget",{ newLoadlevelTarget = CNT2 },200)
  CNT2 = CNT2+1
  luup.sleep(1000)
end