I'm trying to get a dzVents script going which turns a switch on when domoticz starts up.
But i am quite a noob in scripting and can not get it to work.
And i can not find a likewise example on the internet.
This i made sofar but it does not do the trick. (Linphone-S is the switch)
Code: Select all
return {
on = {
system = {
'start',
}
devices = {'Linphone-S'
}
},
execute = function(domoticz, switch)
domoticz.switches('Linphone-S').switchOn()
end
}
the log:
- Spoiler: show
Code: Select all
2020-09-13 20:34:07.969 Error: dzVents: Error: (3.0.12) error loading module 'linphone-init' from file '/opt/domoticz/scripts/dzVents/generated_scripts/linphone-init.lua':
2020-09-13 20:34:07.969 ...ticz/scripts/dzVents/generated_scripts/linphone-init.lua:6: '}' expected (to close '{' at line 2) near 'devices'
Any suggestions?