location and editing scenes in ssh

Hi everybody, I’m sorry for silly question. but I can’t find anywhere in the forum that I can edit scenes when I’m SSH to micasaverde. I would like to look to coding scenes and editing it. Which file should I look? I don’t want to do it from GUI. for an example I want to change delay 1 second to turn off the light switch, but the scenes GUI only allowed 5 second delay.

Thank you for all advices you can give.


can you please help me to write a simple code luup. Device #21 turn on for 1 second and turn off. Thank you so much

Add this Lua code to the scene:

local DEVICE = 21
local SECONDS = 1

function turnOffDevice()
    luup.call_action ("urn:upnp-org:serviceId:SwitchPower1", "SetTarget", {newTargetValue = "0"}, DEVICE)

luup.call_action ("urn:upnp-org:serviceId:SwitchPower1", "SetTarget", {newTargetValue = "1"}, DEVICE)
luup.call_delay ("turnOffDevice", SECONDS, "")

This turns on your DEVICE and after SECONDS seconds turns it off.