The lock stay locked if i Not use a timer.
It works with a delay, but thats somethings i’d like to avoid.
I run another scene as well but this one has no z-wave action, so i suspect this has somethings to do with the z-wave command queue
code (part)
luup.log("Scene 16: Away OFF")
-- 16 daynight Module (1 = tag)
local lul_tmp = luup.variable_get("urn:rts-services-com:serviceId:DayTime", "Status", 16)
if (lul_tmp == "0") then
-- TV backlight 62 (100%)
luup.call_action("urn:upnp-org:serviceId:SwitchPower1","SetTarget",{ newTargetValue="1" },112)
luup.call_action("urn:upnp-org:serviceId:Dimming1","SetLoadLevelTarget",{ newLoadlevelTarget=98 },112)
-- back light 47
luup.call_action("urn:upnp-org:serviceId:SwitchPower1","SetTarget",{ newTargetValue="1" },47)
if (luup.variable_get("urn:dcineco-com:serviceId:MSwitch1", "Status4", 3) == "1") then
-- yui hat spaetschicht
-- fan licht
luup.call_action("urn:upnp-org:serviceId:SwitchPower1","SetTarget",{ newTargetValue="1" },130)
else
-- kuechenlicht an
luup.call_action("urn:upnp-org:serviceId:SwitchPower1","SetTarget",{ newTargetValue="1" },76)
end
end
-- power kueche immer an
luup.call_action("urn:upnp-org:serviceId:SwitchPower1","SetTarget",{ newTargetValue="1" },71)
-- tv draussen nach 10 miuten aus machen
luup.call_delay( 'switch_off16', 600)
-- dis arm door sensor 58
luup.variable_set("urn:micasaverde-com:serviceId:SecuritySensor1", "Armed", 0, 58);
function switch_off16()
-- backlight off
luup.call_action("urn:upnp-org:serviceId:SwitchPower1","SetTarget",{ newTargetValue="0" },47)
luup.call_action("urn:upnp-org:serviceId:SwitchPower1","SetTarget",{ newTargetValue="0" },112)
end
local pStart = "12:30" -- Start of time period
local pEnd = "22:00" -- End of time period
local allow = false
local hS, mS = string.match(pStart,"(%d+)%:(%d+)")
local mStart = (hS * 60) + mS
local hE, mE = string.match(pEnd,"(%d+)%:(%d+)")
local mEnd = (hE * 60) + mE
local tNow = os.date("*t")
local mNow = (tNow.hour * 60) + tNow.min
if mEnd >= mStart then
if (mNow >= mStart) and (mNow <= mEnd) then
allow = true
end
end
local sAway = tonumber(luup.variable_get("urn:upnp-org:serviceId:SwitchPower1", "Status", 61), 10)
local s3 = tonumber(luup.variable_get("urn:dcineco-com:serviceId:MSwitch1", "Status4", 3), 10)
if (allow == true) and (s3 == 1)and( sAway == 0) then
-- yui spaet, zwiwschen 13 und 22 uhr, away aus
-- autostart work scene
luup.call_action("urn:micasaverde-com:serviceId:HomeAutomationGateway1", "RunScene", {SceneNum = "38"}, 0)
end
-- transmission alt-speed speed
luup.inet.wget('http://172.16.67.21:8000/?script=transmission-alt-speed.sh', 5)
strSMS = "WaiKiki: DisArmed"
strSendMario456 = true
luup.call_action("urn:micasaverde-com:serviceId:HomeAutomationGateway1", "RunScene", {SceneNum = "32"}, 0)
return true
very straight forward everything
scene 32 always runns (it just send me a Push notification to the phone that disarm did happen)
so that proof the vera does not restart, as its the last action
scene 38 does set some lamps (if night)
turn on the Aircon in the office and set the Amplifier also nothing fancy
if i add a start delay or comment out the start of scene 38 … the lock does work
if it runns … the issue does occour 7 out of 10 times