Cant get delay to work

I have read and tried every different solution in this thred
http://forum.micasaverde.com/index.php/topic,18679.0.html

But i cannot get it to work.

I have a luup scene, that i want to delay 10sec from the trigger.
(When i unarme my alarmsystem i want this scene to run, but first after 10sec)

Anyone can help me?

url = require(“socket.url”)

local AV_DEV = 70
local LS_SID = “urn:micasaverde-com:serviceId:Sonos1”
local sayLang = “sv”
local sayVolume = 50

local TEMP_SID = “urn:upnp-org:serviceId:TemperatureSensor1”
local time = os.date(‘%H , %M:’)
local InTemp = luup.variable_get(TEMP_SID,“CurrentTemperature”, 29)

luup.call_action(LS_SID, “Say”, {Text = string.format(“V?lkommen hem, klockan ?r %s och temperaturen ?r %s grader”,time, InTemp), Language=sayLang, Volume=sayVolume}, AV_DEV)

//Martin

Your inserting luup into a scene right. Just set a delay using the scene delay for that luup command.

function MySayDelayedTimer(stuff)
// Do your send command statements
end

luup.call_timer(“MySayDelayedTimer”, 1, “10”, “”, “”)

That did the trick aa6vh thanx :slight_smile: