OK, I take back what I said about the scene not running. It clearly does, looking more closely at the log:
08 03/16/19 12515500.100 Scene::RunScene running 37 Pomp aan 07500 als Temp >24 <0x7655e520>
01 03/16/19 12515500.101 LuaInterface::CallFunction_Scene Scene 37 failed attempt to call a nil value <0x7655e520>
08 03/16/19 12515500.101 JobHandler_LuaUPnP::HandleActionRequest device: 51 service: urn:upnp- org:serviceId:SwitchPower1 action: SetTarget <0x7655e520>
08 03/16/19 12515500.102 JobHandler_LuaUPnP::HandleActionRequest argument newTargetValue=1 <0x7655e520> 06 03/16/19 12515500.122 Device_Variable::m_szValue_set device: 51 service: urn:upnp-org:serviceId:SwitchPower1 variable: Target was: 0 now: 1 #hooks: 0 upnp: 0 skip: 0 v:0xf216d8/NONE duplicate:0 <0x7655e520>
08 03/16/19 12515500.125 JobHandler_LuaUPnP::AlarmCallback Ran scene:37 Pomp aan 07500 als Temp >24 / timer: next at 1552821300 now 1552734900 <0x7655e520>
The scene JSON you sent is this (showing the action and the timer):
{
"Timestamp":1552734350,
"encoded_lua":1,
"groups":[{
"actions":[{
"action":"SetTarget",
"arguments":[{
"name":"newTargetValue",
"value":"1"
}],
"device":"51",
"service":"urn:upnp-org:serviceId:SwitchPower1"
}],
"delay":0
}],
"id":37,
"last_run":1552734900,
"lua":"bG9jYWwgV0VfREVWID0gMTY2IC0tYWRkIHlvdXIgdGVtcCBkZXZpY2UgaWQgaGVyZQpsb2NhbCBXRV9TSUQgPSAid XJuOnVwbnAtb3JnOnNlcnZpY2VJZDpUZW1wZXJhdHVyZVNlbnNvcjEiCmxvY2FsIFRlbXAxID0gbHV1cC52YXJpYWJsZV 9nZXQoV0VfU0lELCJDdXJyZW50VGVtcGVyYXR1cmUiLFdFX0RFVikKbHV1cC5sb2cgKCJNWSBURU1QRVJBVFVSRSBS RUFESU5HOiAiIC4uICh0Q3VycmVudCBvciAnPycpKQppZiAodG9udW1iZXIoVGVtcDEpICA+IDI0ICkgdGhlbgogcmV0dXJ uIGZhbHNlIC0tIHRoaXMgd2lsbCBzdG9wIHRoZSBzY2VuZQplbmQKCg==",
"modeStatus":"0",
"name":"Pomp aan 07300 als Temp >24",
"paused":0,
"room":"2",
"timers":[{
"days_of_week":"1,2,3,4,5,6,7",
"enabled":1,
"id":"1",
"last_run":1552734900,
"name":"",
"next_run":1552821300,
"time":"1231530",
"type":2
}],
"triggers":[],
"triggers_operator":"OR",
"users":""
}
and the decoded Lua code is:
local WE_DEV = 166 --add your temp device id here
local WE_SID = "urn:upnp-org:serviceId:TemperatureSensor1"
local Temp1 = luup.variable_get(WE_SID,"CurrentTemperature",WE_DEV)
luup.log ("MY TEMPERATURE READING: " .. (tCurrent or '?'))
if (tonumber(Temp1) > 24 ) then
return false -- this will stop the scene
end
There is a mistake here. Your temperature variable is called [tt]Temp1[/tt], but you’re trying to log [tt]tCurrent[/tt]. Even so, there’s no record of your luup.log message which should, under these circumstances show as ‘?’.
Sorry, can’t help much further.