Changing from ESP Easy to local
Posted: Wednesday 20 March 2019 12:56
I have been able (with a lot of help from you, folks) to configure a system using a Thermostat, a Temp sensor and a switch (in fact, 4 of each, but the it's the same all over. I the temperatur sensors was on ESP8266, and I was using rules to make it work. It work OK, but I have now decided I need to go for manipulating the information from Domotizc local. Reason is problem with network access in the area where this should be implemented, so I have to install the RPi near the relays I want to manipulate and use RFXtrx433XL to receive data from the sensors. I am though still testing using DS18B20 sensors in case I cannot make it work. Don't want to spend too much money on HW - just in case
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
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