Zipato RGBW Gen 2 bulbs, strobe with Luu/Scene

Hi, I recently purchased two Zipato RGBW Gen2 bulbs. They work great and I have no issues with them at all.

I have successfully set the variables that are noted in their documentation to get the bulb to strobe different colors. See attached screenshot. This also works perfectly.

However, I would like to be able to trigger this via a Scene. Is there some guidance on how to set a variable via Luu ?

See this recent thread/post: Setting Z-Wave parameters via Luup

Thanks, this is exactly what I needed. I’ve gotten the code I need to run, and I’m using the advanced editor but one thing I’m stumbling on is how to add the senddata command for all 3 varibles:

luup.call_action( “urn:micasaverde-com:serviceId:ZWaveNetwork1”, “SendData”, { Node=‘13’, Data= ‘x70 4 2 1 6’}, 1 )
luup.call_action( “urn:micasaverde-com:serviceId:ZWaveNetwork1”, “SendData”, { Node=‘13’, Data= ‘x70 4 3 1 127’}, 1 )
luup.call_action( “urn:micasaverde-com:serviceId:ZWaveNetwork1”, “SendData”, { Node=‘13’, Data= ‘x70 4 4 1 1’}, 1 )

The advanced editor only allows you to add one of the same type of command. So I’m getting an error “action already exists” when i try and set the second line.

Is there a way to use the SendData function and put all three parameters together into one line ?

You can do it in scene Lua

Right, I get that - but my issue here is that I need to have some kind of a delay before my Lua code executes.

Whenever I use the “develop apps” and put in my sample code:

luup.call_action( “urn:micasaverde-com:serviceId:ZWaveNetwork1”, “SendData”, { Node=‘13’, Data= ‘x70 4 2 1 6’}, 1 )
luup.call_action( “urn:micasaverde-com:serviceId:ZWaveNetwork1”, “SendData”, { Node=‘13’, Data= ‘x70 4 3 1 127’}, 1 )
luup.call_action( “urn:micasaverde-com:serviceId:ZWaveNetwork1”, “SendData”, { Node=‘13’, Data= ‘x70 4 4 1 1’}, 1 )
luup.call_action( “urn:micasaverde-com:serviceId:ZWaveNetwork1”, “SendData”, { Node=‘14’, Data= ‘x70 4 2 1 6’}, 1 )
luup.call_action( “urn:micasaverde-com:serviceId:ZWaveNetwork1”, “SendData”, { Node=‘14’, Data= ‘x70 4 3 1 127’}, 1 )
luup.call_action( “urn:micasaverde-com:serviceId:ZWaveNetwork1”, “SendData”, { Node=‘14’, Data= ‘x70 4 4 1 1’}, 1 )

It works without issue (Lights are already on at this point)

Whenever I create a Scene and say, turn on the lights and run this Lua code, the lights come on…but they don’t blink.

So I’m guessing i need a delay here that will do … turn lights on…wait 20 seconds, then execute this Lua code.

As a side note here, I’ve tried using this example to add a delay and it still doesnt work when I have it inside a scene. it DOES work fine when I manually execute it via the “develop apps” section though

luup.call_delay(“delayOff”,20)

function delayOff()
luup.call_action( “urn:micasaverde-com:serviceId:ZWaveNetwork1”, “SendData”, { Node=‘13’, Data= ‘x70 4 2 1 6’}, 1 )
luup.call_action( “urn:micasaverde-com:serviceId:ZWaveNetwork1”, “SendData”, { Node=‘13’, Data= ‘x70 4 3 1 127’}, 1 )
luup.call_action( “urn:micasaverde-com:serviceId:ZWaveNetwork1”, “SendData”, { Node=‘13’, Data= ‘x70 4 4 1 1’}, 1 )
luup.call_action( “urn:micasaverde-com:serviceId:ZWaveNetwork1”, “SendData”, { Node=‘14’, Data= ‘x70 4 2 1 6’}, 1 )
luup.call_action( “urn:micasaverde-com:serviceId:ZWaveNetwork1”, “SendData”, { Node=‘14’, Data= ‘x70 4 3 1 127’}, 1 )
luup.call_action( “urn:micasaverde-com:serviceId:ZWaveNetwork1”, “SendData”, { Node=‘14’, Data= ‘x70 4 4 1 1’}, 1 )
end

Scene Lua executes before the scene’s actions, not after. This is because scene Lua can be used to prevent a scene from executing based on Lua-determined rules (if the scene Lua returns false, the scene actions do not run).

I don’t know the devices you are working with, but if the lights have to be on before they blink, you’ll need to do that in your scene Lua as well.

Ok thanks for the direction here. So I’ve gotten the lights to come on using Lua code:

luup.call_action(“urn:upnp-org:serviceId:SwitchPower1”, “SetTarget”, { newTargetValue=1 }, 27)
luup.call_action(“urn:upnp-org:serviceId:SwitchPower1”, “SetTarget”, { newTargetValue=1 }, 28)

But now I’m having another issue, similar to the other. When I run this code via “develop apps” it works fine. Both lights come on.

When I run inside a scene, the lights never turn on. Ive tried making a fresh new scene with no Lua and just pasting those two lines. Still nothing.

In addition to this, if I just turn the lights on and leave them on, then create a basic scene with just the 6 lines i need to start the strobing, it does not work.

If I run the same 6 lines manually via “Develop Apps” it works perfectly fine. So something with running scenes is not properly working for these devices. I have other devices setup that are able to execute Lua code without a problem.

luup.call_action( “urn:micasaverde-com:serviceId:ZWaveNetwork1”, “SendData”, { Node=‘13’, Data= ‘x70 4 2 1 6’}, 1 )
luup.call_action( “urn:micasaverde-com:serviceId:ZWaveNetwork1”, “SendData”, { Node=‘13’, Data= ‘x70 4 3 1 127’}, 1 )
luup.call_action( “urn:micasaverde-com:serviceId:ZWaveNetwork1”, “SendData”, { Node=‘13’, Data= ‘x70 4 4 1 1’}, 1 )
luup.call_action( “urn:micasaverde-com:serviceId:ZWaveNetwork1”, “SendData”, { Node=‘14’, Data= ‘x70 4 2 1 6’}, 1 )
luup.call_action( “urn:micasaverde-com:serviceId:ZWaveNetwork1”, “SendData”, { Node=‘14’, Data= ‘x70 4 3 1 127’}, 1 )
luup.call_action( “urn:micasaverde-com:serviceId:ZWaveNetwork1”, “SendData”, { Node=‘14’, Data= ‘x70 4 4 1 1’}, 1 )
end

You have an “end” in the code block that isn’t a code block that needs an “end”. That will cause a syntax error, and if you do that in scene Lua, it can break all of the scenes’ Lua on your Vera. Not sure if that’s the only problem, but it stands out. You might also look at the LuaView plugin to help you make sure there are not other syntax errors in the code.

Also, you can look for errors from running scenes in the LuaUPnP log file. You can access that at this URL: http://your-vera-local-IP/cgi-bin/cmh/log.sh?Device=LuaUPnP

Thanks again for all the guidance here. So I’m looking at the logs, running my test scene and this is the error i see:

09/02/20 23:35:53.104	LuaInterface::CallFunction_Scene Scene  12 failed attempt to call a nil value <0x747ae520>

(Also removed that extra end at the bottom, my mistake).

You were right about breaking all the scenes. HAd a type in another scene, was breaking everything. Thanks!

Best Home Automation shopping experience. Shop at getvera!

© 2020 Vera Control Ltd., All Rights Reserved. Terms of Use | Privacy Policy | Forum Rules