dzVents noob question
Posted: Friday 11 January 2019 16:42
Guys,
I am trying to step in the wonderfull world of dzVents and doing my first baby steps..
If I open de script editor the get the following example. Saving and activate for "device" don't do anyting.
I have changed the 'myDevice' into 'spare_grey' which is a test switch I play with. Nothing again.
Can you please help me understand what is the on = function for? ( I do see it with 1 min timer and understand it )
The goal is to have something happening ( a log entry in this case ) on a status change of my spare_grey switch.
next level question. same event but now for a text device.
Any help is welcome ! THanks Frank
I am trying to step in the wonderfull world of dzVents and doing my first baby steps..
If I open de script editor the get the following example. Saving and activate for "device" don't do anyting.
I have changed the 'myDevice' into 'spare_grey' which is a test switch I play with. Nothing again.
Can you please help me understand what is the on = function for? ( I do see it with 1 min timer and understand it )
The goal is to have something happening ( a log entry in this case ) on a status change of my spare_grey switch.
next level question. same event but now for a text device.
Any help is welcome ! THanks Frank
Code: Select all
return {
on = {
devices = {
'myDevice'
}
},
execute = function(domoticz, device)
domoticz.log('Device ' .. device.name .. ' was changed', domoticz.LOG_INFO)
end
}