Who can translate this in to something that is understandable?
We all know somewhat how to use and create lua scripts on the Vera platform, there are many script snippets and examples on the forum that we can understand and expand upon.
But he might as well be talking Dutch here. I know I’m not the sharpest tool in the toolbox, but what was just stated?
How do I turn on a particular device via a script?
How do you turn it off?
How do I dim / brighten a device to a percentage?
How do I run a scene via a script?
I’m going to post on here some of my existing Vera lua scripts from my scenes.
And I’d like to see translated examples on the Ezlo platform.
Is it just me? Or have they made these new Ezlo APIs and scripts far too complex?
Vera Luup Requests and in turn its related lua scripts was simple and easy to understand for simple people like me LOL.
Translate this simple script to blink a light to an Ezlo script.
device = 291 -- Blink Globe Lamp
count = 4 -- number of times to blink
rate = 2 -- number of seconds between blinks
function blink_on()
luup.call_action( "urn:upnp-org:serviceId:SwitchPower1", "SetTarget", { newTargetValue="1" }, device )
luup.call_delay( 'blink_off', rate )
end
function blink_off()
luup.call_action( "urn:upnp-org:serviceId:SwitchPower1", "SetTarget", { newTargetValue="0" }, device )
count = count - 1
if count > 0 then
luup.call_delay( 'blink_on', rate )
end
end
-- Start blinking
blink_on()