I'm still in the learning phase.
But i can't figure out how i can get this wiki DzVents example to get to work.
The script
Code: Select all
{
on =
{
timer = {'every 5 minutes'}
},
data =
{
previousHumidity = { initial = 100 }
},
execute = function(domoticz)
local bathroomSensor = domoticz.devices('SensorBerging')
if (bathroomSensor.humidity - domoticz.data.previousHumidity) >= 5) then
-- there was a significant rise
domoticz.devices('DampkapLicht').switchOn()
end
-- store current value for next cycle
domoticz.data.previousHumidity = bathroomSensor.humidity
nd
}
Code: Select all
2020-05-18 21:36:11.480 Error: dzVents: Error: (3.0.2) error loading module 'Script #1' from file '/home/pi/domoticz/scripts/dzVents/generated_scripts/Script #1.lua':
2020-05-18 21:36:11.480 ...domoticz/scripts/dzVents/generated_scripts/Script #1.lua:1: unexpected symbol near '{'
Thanks!