Thermostat Override
Posted: Tuesday 29 March 2016 7:08
Hello All,
I hope this is in the right place. My current Domoticz setup is running on a RPi 2 - I have a Nest and two temperature sensors (DHT22) - Nest is on the 1st floor of my townhome, one DHT22 is in the basement, the other is in my bedroom. I have also set up a dummy selector switch with several states:
I have rough pseudo-code in mind, but I need help hashing it out. This is just for Heat Basement, but could easily be adjusted for cool as well. Specifically, I'm unsure as to how to accomplish this in Lua/Python/Bash - and what specific API calls I can make (probably through curl).
Thoughts?
I hope this is in the right place. My current Domoticz setup is running on a RPi 2 - I have a Nest and two temperature sensors (DHT22) - Nest is on the 1st floor of my townhome, one DHT22 is in the basement, the other is in my bedroom. I have also set up a dummy selector switch with several states:
- > Off
> Cool Basement
> Heat Basement
> Cool Bedroom
> Heat Bedroom
- 1) Nest Setpoint: 65, Nest Temperature: 67, Basement Temperature: 61
2) Heat Basement selected
3) Nest Setpoint adjusted to 70 [Turning on heat]
4) Basement Temperature rises to 63, Nest Temperature rises to 70
5) Nest Setpoint adjusted to 75 [Basement still isn't at the target of 65 yet]
6) Basement reaches 65, Nest Setpoint adjusted back to 65
I have rough pseudo-code in mind, but I need help hashing it out. This is just for Heat Basement, but could easily be adjusted for cool as well. Specifically, I'm unsure as to how to accomplish this in Lua/Python/Bash - and what specific API calls I can make (probably through curl).
Thoughts?
Code: Select all
## Heat Basement
## Get our current, pre-mucking about Setpoint (e.g. target temperature)
Set $SetPoint equal to $Nest_Setpoint retrieved from API
## Turn up the thermostat
Increase $Nest_Setpoint by 5 degrees utilizing API
## Wait for potential changes
Wait 3 minutes
## Loop as long as the Basement sensor is reading less than the original target temperature
While $Basement_Temp is Less Than $Setpoint
## If the Nest is reporting a temperature greater than the current setpoint (heat is not on), or if the nest can report if the system is not heating
If $Nest_Temp is equal or greater than $Nest_Setpoint; or if $Nest_Heat is not on ##Not sure how to check this
## Increase our setpoint by another 5 degrees
Increase $Nest_Setpoint by 5 Degrees
## Wait for potential changes
Wait 3 minutes
## Get the current temperature from the API
Refresh Basement_Temp from API
Done