[Almost Solved]Repeating Temperature Setpoint Watchdog
Posted: 09 Mar 2017, 03:20
At the moment I have a Domoticz server running on a Raspberry which i Can send a setpoint using the code below.
This works well, as long as i resend the data from Domoticz ever few minutes as it only checks that once and makes a decision to turn on or off GPIO 12.
After the temperature has dropped to below the setpoint it will not turn off until i send the setpoint again from Domoticz.
The question is
Can i make the esp8266 compare the setpoint to the room temperature every 60 secs, just encase the Domoticz goes down or a lose Wifi.
Domoticz Code
In the esp8266 i have this running as a rule
Room#Temperature Is the Actual temp
RoomTemp#Temp is the setpoint sent via FanSetpoint.
In The ESP i have a Dummy device setup in Location 3 and
1 Temperature & Humidity - DHT Room 23 GPIO-14 Temperature: ¬¬¬¬¬¬¬
2 Switch input FanRelay 28 GPIO-12 State:¬¬¬¬¬¬¬ I use this to tell Domoticz The relay is on or off
3 Dummy Device RoomTemp Temp: THE SETPOINT SENT FROM DOMOTICZ
Thanks so much for Looking and at least thinking about it.
This works well, as long as i resend the data from Domoticz ever few minutes as it only checks that once and makes a decision to turn on or off GPIO 12.
After the temperature has dropped to below the setpoint it will not turn off until i send the setpoint again from Domoticz.
The question is
Can i make the esp8266 compare the setpoint to the room temperature every 60 secs, just encase the Domoticz goes down or a lose Wifi.
Domoticz Code
Code: Select all
commandArray = {}
if devicechanged['Tent Temp Fan Control Setpoint'] then
DomDevice = 'Tent Temp Fan Control Setpoint'
DomValue = otherdevices_svalues[DomDevice]
CalcValue = (DomValue*1)
print(CalcValue)
url= 'http://192.168.1.200/control?cmd=event,FanSetpoint='..(CalcValue)..''
commandArray['OpenURL']= url
end
return commandArray
Code: Select all
on FanSetpoint do
TaskValueSet 3,1,%eventvalue%
if [Room#Temperature]>[RoomTemp#Temp] do
GPIO,12,1
else
GPIO,12,0
endif
endon
RoomTemp#Temp is the setpoint sent via FanSetpoint.
In The ESP i have a Dummy device setup in Location 3 and
1 Temperature & Humidity - DHT Room 23 GPIO-14 Temperature: ¬¬¬¬¬¬¬
2 Switch input FanRelay 28 GPIO-12 State:¬¬¬¬¬¬¬ I use this to tell Domoticz The relay is on or off
3 Dummy Device RoomTemp Temp: THE SETPOINT SENT FROM DOMOTICZ
Thanks so much for Looking and at least thinking about it.