I have configured GPIO ports on the RPi, and they are vissible in Domoticz as light switches after editing the /etc/init.d/domoticz.sh.
I am using the following VERY SIMPLE script, and there are some things missing
return {
on = { timer = { 'every minute' } },
execute = function(domoticz)
local Sensor = domoticz.devices(8) -- Temperatur
local SetPoint = domoticz.devices(12) -- SetPoint
if Sensor.temperature <= SetPoint.setPoint then
domoticz.devices(11).switchOn()
else
domoticz.devices(11).switchOff()
end
end
}
I am missing three things:
1. How to access the gpio devices from the scipt
2. How to implement hysteresis.
3. How to resend the setPoint. I can do it using two separate scripts, so this is not a major issue
Any sugestion is welcome
Best regards
UIf