I try to call a script for my kaku devices.
The log is written but the script won't run.
Can someone help me with this newbie question?
Thanks in advance.
Greetings,
Robin
Code: Select all
-- script name : script_device_kaku.lua
local sensor = 'Lamp1'
commandArray = {}
if (devicechanged[sensor] == 'On') then
os.execute ("sudo ~/wiringPi/examples/lights/kaku A 1 on")
print ('Aan!!!')
else
os.execute ("sudo ~/wiringPi/examples/lights/kaku A 1 off")
print ('Uit!!!!!!!')
end
return commandArray