Anyone automate anything with smart thermostats and outdoor temp?
from weastie@lemmy.world to selfhosted@lemmy.world on 01 Sep 22:07
https://lemmy.world/post/35315979
from weastie@lemmy.world to selfhosted@lemmy.world on 01 Sep 22:07
https://lemmy.world/post/35315979
I have a pretty simple smart thermostat without many fancy features. Every Spring and Fall I tell myself I should set up some kind of system where if the outdoor weather is good enough, maybe I dial back the heating / cooling, maybe send myself a text to open windows, etc.
Small example: I normally keep my house at 72 in the summer, but if it’s up to 76 or so outside, it’d be nice if the thermostat turned off the cooling. I could manually turn it back on if I have guests over, etc.
I’m sure some of this logic would be easy to code myself, but wanted to check out what anyone else is doing first.
Using home assistant.
#selfhosted
threaded - newest
I have one where I put a door/window sensor on a window and anytime that window is opened it turns off the HVAC, then when closed, turns it back on.
I tried once to setup a notification to open the windows if the weather was nice, but I’d never gotten to work quite like I wanted, and so I turned it off.
I have the same sensors, but on many windows. If I have windows on either side of the house open simultaneously and there is a favorable temp difference outside vs inside, an automation turns on an air exchange fan. If they are closed, I use advanced heating control
I went down this rabbit hole a few years back. I’m in a house with 3 separate HVAC split systems over 2 floors, and we always had large temperature differentials and needed to constantly manage HVAC settings.
My goal was to never need to touch the settings for any of the HVAC units all year round, and I had plans to automate my windows so if it was nice outside, the house would ventilate automatically… but only if the pollen count was low, as I have allergies.
It became clear very early on that using the standard Home Assistant automation logic wasn’t going to be adequate for my needs, so I ended up running a Python script every half hour that reassessed the state of all sensors, using whatever crazy logic I dreamed up, then decided what actions to perform (if anything).
The general approach worked well, though I hit two snags and lost interest:
One was finding a (cheap) solution to physically open and close my roller windows. I came close, but didn’t want to make any permanent changes and had concerns about home insurance, so ultimately chickened out there. Everything still worked without this, but it would have been pretty cool to open windows automatically on a nice day for fresh air.
The other snag was more fundamental - I don’t think it’s possible to have a perfect temperature, even for one person. If I’m sitting still for long periods, I tend to want warmer temps. If I’m cleaning the house, I want cooler temps.
Ultimately my “ruleset” for the perfect solution became more and more complex, with edge cases and bugs popping up as the months rolled on, and it became clear I couldn’t represent this problem with a set of sensor inputs.
It was a fun experiment and I learned a lot, but I ended up going back to simpler automation rules after a while, like just turning on the heater in the morning if it’s cold, or vice versa. Solve the biggest problems first.
I think trying to automate to the extreme is sometimes a trap. Our hacker mindset wants the problem to be perfect and solveable, when in reality us humans are fickle creatures whose wants and whims change on the regular, and that can’t be captured easily in zeros and ones.
Here’s a screenshot of what my diagnostic interface for it looked like. The Python script took all the sensors as inputs and decided on a strategy for upstairs and downstairs, and gave the reason for its decision in a separate sensor for debugging purposes. The script performed all the necessary actions whenever it changed strategy.
<img alt="" src="https://aussie.zone/pictrs/image/afb53ed0-6a34-41d3-914d-544c89176e14.jpeg">
Nice! Which sensor did you use for pollen?
I cheated and just used a webscraper to pull the data from a local government website.
I got a lot more luckier than you. I have a single floor, three bedroom place. All I needed to get my setup to an acceptable level was a programmable thermostat.
I set my temps for warmer in the afternoon, cooler in the evening/night, and semi-warm again in the morning. It's not perfect, but it makes getting to sleep and waking up a lot easier.
Using the Ecobee thermostat, I use the built in weather module in Home Assistant to give local weather data to the system. In summer, I set it up to watch for the lowest overnight temps via forecast, and trigger on the lowest temperatures we’d see. Then I’d drop the house temp to 66 or 64 degrees when the AC had to do the least amount of work. Then I’d use the basement air to keep the upstairs cool enough and use the AC as little as possible.
My last house was old and had some drafts I couldn’t find. So in the winter, if the weather turned to windy I’d increase the temp a degree or two for comfort.
I don’t have a thermostat, but I have indoor and outdoor temp and humidity sensors, and a window position sensor. HA notifies me (via lighting color) if I should open the window because the outdoor conditions are better than indoors, or vice versa.
Elegant!
I did the notification thing. If the outdoor temperature is lower than my indoor temperature and above 17° and the humidity is under 60% and the windows are closed, it sends me a notification to open them.
Same if the outdoor temps get above 24° and the windows are still open, it reminds me to close them.
I have some logic around notifications and a few actions. My spouse and I both grew up in houses with heat, but no AC, so I’ve programmed HA to send notifications to our phones if the setpoint on our Ecobee thermostat is warmer than the outside temperature in Cooling mode, and cooler than the outside temp in Heating mode. Outdoor temps are a blend of three weather service feed “feels like” observations and two outdoor temperate/humidity sensors.
The outdoor sensors are a ZigBee sensor, and some area sensors I snoop a few times an hour with an RTL-SDR radio single via MQTT bus. I have a helper that blends the weather service and local obs to compare with the thermostat. It bothers us every 2 hours to open some windows.
We both also have a bad habit of not closing the back door all the way, so the Assistant bugs us if a door or window is open for more than 10 minutes and the outdoor temperature is below the heating setpoint, or above the cooling setpoint. It turns off the HVAC a few minutes later if the condition persists and sends a snarky notification about not being made of enough money to fix climate change. However, it will turn the heat back on to 60F if the house falls below 58F and send notifications every hour til the condition is addressed.
Otherwise the ecobee does a fair job adjusting itself to maintain a desired inside temp on its own.
I have door sensors and when an external door is opened, turn off the heating. Was after we had a firepit and kids kept going in and out and leaving the doors open.
Works most of the time, except that 1 door falls off the ZigBee network as it doesn’t get used as much
I have central (water circuit based) heating with individual control per room. Additionally I have a weather station on my roof that tracks the sun and wind,temp, etc. and presence detectors in almost all rooms and electric blinds. The components are all KNX based, the logic part is home assistant based.
Basically what we do: I have a “normal mode” that is supported by two addon modules. Normal mode means:
On schooldays the system tracks when school starts. If none is present in the kids rooms for more than 30min it assumes the kid is gone and goes into energy saving mode for that room (18 instead of 21). The system then looks when the kid is likely to come back and puts the room temperature up on time.
Our offices are always in energy saving temp and only get into normal temp once someone has been there for 15min or one of our computers is put on - both the wife and I work home office full time,but travel a fair bit.
The system tracks if our mobile phones are “pingable” locally. If they aren’t for 30min it assumes we are all gone and puts the whole house into “away” mode,including reducing the temperatures. Then it looks at our outlook calendars (and the school schedule) and puts the temperature back on as required.
Additonally a room that has a window open is always cut off from heating and the system sends a message when the outside temp is either too hot or too cold after a certain time.
Additionally we have two prediction based module The system looks at three different weather predictions (my area is a bit of a problem for these) and creates a mean expected minimum and maximum day temperature.
If the expected max and min is below a certain point it switches on “winter mode” - this means the system tries to keep the shutters up as much as possible and open them as early as possible (based on the sun position) so the house absorbs as much sun as possible. Doesn’t help that much,but at least a bit. Additionally the time for “open window notifications” is reduced.
If the expected max is above a certain degree the system goes into summer mode. Then it’s basically vice-versa. The system tries to keep the blinds/shutters down as much as possible according to the position of the sun and opens them only after the sun has passed. That works fairly well and reduces the room temperature significantly - in the worst room around 3.8° on average. It also reminds the inhabitants to open windows in the morning when it’s still cold and close them in time.
It’s nothing fancy, but I have phone alerts if any windows are open when the heating comes on, and I also use the average temperature inside the house as the input temperature for the thermostat (sensors in several rooms are averaged and published via MQTT to a DIYless thermostat).
My plan going forward is to add ZigBee TRVs to the radiators in each room and automatically close any that are already at or over the target temperature.