
Please wait until VeraEdge configures it according to your need.
3.
Create a Scene with LUA Script
To finish, you need now to create a Scene. Chose the Octan Remote as a trigger and
put a scene ID of 0
Then, in the step “Finish the Scene” of you scene creation, please add a LUUP code by
clicking on “Luup Code defined”.
You need to reach the LastSceneID that contain the right value of which button was
pressed with what kind of press.
Below an example
-----------------------------------------------------------------------
luup.call_delay('scene_controller',1)
function scene_controller()
local lastSceneID = luup.variable_get("urn:micasaverde-
com:serviceId:SceneController1","LastSceneID",#DEVICE_ID#)
if (lastSceneID == "#REMOTE_BUTTON_ID#") then
luup.call_action("urn:micasaverde-
com:serviceId:HomeAutomationGateway1", "RunScene", {SceneNum =
"#scene_num#"}, 0)
end
end
------------------------------------------------------------------------
#DEVICE_ID# replaced with your Octan Remote ID
#REMOTE_BUTTON_ID# replaced with button ID (ex 10,20,30,40,...)
#scene_num# replaced with Vera Scene ID
If you want to launch Scene #1 while the Scene Activation ID 22 is detected (it’s a long
press on ).
-
#DEVICE_ID# = Octan Remote (or the name you chosed)
-
#REMOTE_BUTTON_ID# = 22
-
#scene_num# = 1