I made a small dzVents script in an attempt to control my Hue light through a bash script and my Onkyo receiver through the Onkyo device which is added to Domoticz through the hardware/devices.
So i tried this:
Code: Select all
return {
active = true,
on = {
},
execute = function(domoticz)
if (domoticz.scenes('Film kijken').state == 'On') then
os.execute('/home/pi/domoticz/scripts/hue-scripts/film-kijken.sh')
domoticz.devices('Onkyo - Main Power').switchOn()
domoticz.devices('Onkyo - Main Source').updateCustomSensor(NVIDIA)
domoticz.devices('Onkyo - Main Volumer').updateCustomSensor(50)
domoticz.log('----------------------------------------------')
domoticz.log('-----------------IT RUNS RUNS ----------------')
domoticz.log('----------------------------------------------')
end
end
}
2017-11-27 11:41:03.363 User: admin initiated a scene/group command
2017-11-27 11:41:03.365 Activating Scene/Group: [Film kijken]
2017-11-27 11:41:03.584 Executing script: /home/pi/domoticz/scripts/dzVents/generated_scripts/Film_Kijken.lua
2017-11-27 11:41:03.592 Error: Error executing script command (/home/pi/domoticz/scripts/dzVents/generated_scripts/Film_Kijken.lua). returned: 32256
Maybe im doing this all wrong, so any help or suggestions are welcome
regards,