I have (not) yet experience with LUA scripting so I have made the next script to send serval time an command over the night to an push dummy for the ventilation that use an internal timer.
Code: Select all
commandArray = {}
if (devicechanged['Ventilatie hoog'] == 'On') then
commandArray['Ventilatie']='Set Level: 30 REPEAT 20 INTERVAL 840'
elseif (devicechanged['Ventilatie hoog'] == 'Off') then
commandArray['Ventilatie']='Set Level: 10'
return commandArray
Code: Select all
2020-06-17 17:55:00.596 Error: EventSystem: in Ventilatie nacht: [string "commandArray = {} ..."]:2: attempt to index a nil value (global 'devicechanged')
How can I solve this problem?