if i want to use it with groups/scenes it does not work.
so if lookup contains devices and i use domoticz.devices it works
if lookup contains groups and i use domoticz.groups it does not work and the log complains about scenes/groups not existing but they do
Code: Select all
2019-07-01 17:52:30.048 Error: dzVents: Error: (2.4.24) There is no group or scene with that name or id: Woonkamerlampen. If you just created the scene or group you may have to restart Domoticz to make it become visible to dzVents.
2019-07-01 17:52:30.049 Error: dzVents: Error: (2.4.24) There is no group or scene with that name or id: WoonkamerlampenSfeervol. If you just created the scene or group you may have to restart Domoticz to make it become visible to dzVents.@waaren, can you see what is wrong
Code: Select all
local lookup = {
Woonkamerlampen = "109" ,
WoonkamerlampenSfeervol = "114" ,
}
return {
active = true,
on = {
-- de devices die dit script triggeren
devices = {
'Vitrinekast' ,
},
},
execute = function(domoticz, trigger)
for naam, id in pairs(lookup) do
local device = domoticz.groups(naam)
local devicestatus = '10'
domoticz.log(device)
domoticz.log(devicestatus)
end
end
}