This is the dzVents script I'm currently using to trigger a second script (but it will also trigger the second script if I write a new value to the Domoticz device):
Code: Select all
-- dzVents script to pass setpoint value to python script
return {
on = { devices = { "Setpoint" }},
execute = function(dz)
local setpoint = dz.devices("Setpoint").setPoint
local py_script = 'python /home/pi/devices/hive_setpoint_new.py '
print(setpoint)
local cmd = py_script .. setpoint .. ' &'
--print(cmd)
os.execute(cmd)
end
}