I would like to trigger my Hue Motion sensor script only between specific time. Is this possible?
Code: Select all
on = {
devices = {
'Hue Motion 1'
},
timer = {
'at 06:00-09:00'
}
}
Moderator: leecollings
Code: Select all
on = {
devices = {
'Hue Motion 1'
},
timer = {
'at 06:00-09:00'
}
}
Check the dzVents wikiDespyNL wrote: Friday 28 December 2018 16:35 I would like to trigger my Hue Motion sensor script only between specific time. Is this possible?
Code: Select all
devices = {["Hue Motion 1"] = {"at 06:00-09:00"}},
Hopefully you are on a more recent version then what your profile showsAadr wrote: Tuesday 01 January 2019 21:44 I'am struggling with this syntaxis, specially with more than one device and more than one timeframe.
I have come up with this code:
Code: Select all
local timeTable = {'at 13:00-22:00 on sat','at 19:00-23:30 on mon,tue,wed,fri','at 19:00-02:30 on thu'}
return {
on = {
devices = {
['Motion Kantine'] = timeTable,
['Status_Muziek'] = timeTable,
['Verlichting_Kantine_Mode'] = timeTable
}
},
logging = { level = domoticz.LOG_DEBUG,
marker = "multiple device triggers" },
execute = function(dz, item)
local function logWrite(str,level)
dz.log(tostring(str),level or dz.LOG_DEBUG)
end
logWrite ("triggered by " .. item.name)
end
} dzVents is for the biggest part Lua. Behind the scenes there is some C++ code to efficiently communicate from and to the domoticz data but most of the Lua code that makes it easier to script in Lua and work with domoticz data is in the domoticz/dzVentz/runtime/ directory'sAadr wrote: Wednesday 02 January 2019 19:24 Was there a way I could have know this syntaxis by my self, I am not educated in programming. Is there some more documentation to read, except for the wiki and the forum?
Users browsing this forum: No registered users and 1 guest