-- script name : script_device_RelaisSchakelaarMeterkast.lua -- This script will trigger a bash script every time the device "RelaisSchakelaarMeterkast" change status local sensor = 'RelaisSchakelaarMeterkast' commandArray = {} if (devicechanged[sensor] == 'On') then os.execute ("python /home/pi/relais/relais-stand-1.py") end if (devicechanged[sensor] == 'Off') then os.execute ("python /home/pi/relais/relais-stand-0.py") end return commandArray