-
Notifications
You must be signed in to change notification settings - Fork 0
Home
This project seeks to automate the process of 1) listening to bluetooth thermometers / hygrometers, and 2) switching smart plugs off an on; particularly when those smart plugs are controlling infrared panel heaters or other inexpensive, safe, electrical heating devices.
A jumbo epic sized user story might go something like this:
As a concerned human that heats my space with natural gas (or oil, or anything else that burns),
I would like a system that can turn on and off electric heaters that plug in to a wall socket (usually an infrared panel) based on the temperature,
So that I can stop burning stuff to heat the whole building and only heat the rooms I want (usually bedrooms overnight),
Until I get a heat pump.
Thermo assumes it is being installed on a Raspberry Pi.
- README instructions focus on Raspbian
- Everything assumes an updated version of the stock python3 that ships with Raspbian
- No effort to debug on other bluetooth chips is being made
thermo.py
The thermo
service is the main thermostat loop. It loads its configuration, then begins listening for bluetooth advertisements from a sensor
.
A sensor
is a thermometer device that has been placed in an area (called a zone) that you would like to heat.
thermo
assumes you are using a bluetooth low energy (BLE) thermometer, basically because the author is lazy and doesn't want to be replacing AAA batteries all the time. At this time, the project supports Govee Bluetooth Thermo-Hygrometers model 5075, though in theory any reasonable ble emitting thermometer would do.
A zone
is an area of a building (often a room) that you want to control the temperature of. This application works by setting up separate zones, each with its own heater, sensor and smartplug.
thermo
assumes the use of electric infrared panel heaters, such as the Wexstar 600 watt. Any infrared heating panel, or safe source of electric heat, will do. Please do not use any heating device unsafely. The infrared panels being used by most users today are very good at warming up a room, say a 14x14 room with a door. They aren't quite as good at heating larger open plan areas of a home.
thermo
assumes that all panels are plugged in to smart plugs. This project currently supports the Kasa wifi protocol, though, again in theory any wifi (or IP) addressable smartplug that can be controlled with Python should work fine.
The Zone Manager is a small http service that provides the thermostat UI. It relies on services to read and write configuration, and also read and write current conditions.
- I have this idea to use something like a GridEye sensor to detect when we enter a room, instead of relying on humans to switch things on and off or wait for a schedule. Could fall back to something like a Bluetooth listener (to detect humans based on the phones they inevitably carry) or even a passive IR detector, but I think an active sensor makes the most sense (we've all waved to no one in particular to turn on the lights at work thanks to passive IR detectors)
- Extend the UI to get auto-discovery of devices working and set an initial configuration
- Build a "hardware UI"; maybe a small LCD display to extend the pi so that humans can change the temperature without having to go fiddle around with the web interface on their phone
This project came about when I became obsessed with the possibility of infrared heat panels (thanks to Fully Charged on YouTube); and was unable to find a way to control them with a thermostat. With a nest we could add temperature sensors to different rooms, but that didn't give me the control I wanted.
- Use the nest to do its thing; heating our home. Place one thermometer sensor in a room controlled by the
thermo
system. - Set the nest schedule to focus on a
thermo
controlled room over night, but go back to its default during the day / evening while we're using the kitchen, living room, dining room etc - Three rooms in our house are "zones" for
thermo
. Two bedrooms, and one office like space. - The bedrooms are set to "scheduled"; which means
thermo
will keep them up to temperature between 10 PM and 8 AM - The office space we either enable or disable when we are using it via the web app, as its used in an ad hoc fashion
- When
thermo
kicks in and warms up the bedroom with the sensor in it, the nest shuts down the furnace (sincethermo
keeps it warm enough) - The next morning the nest switches to a sensor in the main area of the home, so it starts heating up the rest of the home
- This reliably saves us ~ 8 hours worth of gas heating every day! (now to calculate how long it will take me to get to a gigaton...)
More about the hardware we're using
-
thermo
and thezone manager
are running on a Raspberry Pi 4 right now, though I'm working on getting it working on a Pi zero /W - Wexstar 600 watt panels are totally capable of quickly warming up any room like space in a home (say a bedroom like space with walls and a door)
- We also use the panels in "open" areas of the house; they work more like space heaters at that point where you need to be right next to it
- The govee thermometer / hygrometers emit BLE advertisements from rooms all over the house and the pi has no problem receiving them
- The panels are plugged in to kasa smartplugs (which is handy as they have a nice Python API)
- You could skip the nest sensor bit, and just schedule the nest to switch to 'eco' mode when
thermo
kicks in; however, having the sensor in one of the rooms acts as a failsafe in case I forget to restart the service when I'm monkeying with it (or if the pi gets unplugged)
I've recently become very interested in the kinds of societal and engineering challenges that we must solve in order to manage the thin layer of breathable gas that surrounds the rock we live on, which eventually led me to making this project.
I work for VNDLY, a Workday company, in a software leadership role. Before that I worked as a consultant for ThoughtWorks. I've written lots of PHP and .NET, a decent amount of Java, Python and JavaScript. In a former life I was a UNIX and Linux sysadmin.
My first foray in to Raspberry Pi was to set up an ADSB receiver. This project is now my second.
My wife and I bought a Kia Soul EV back in 2018, and have added an IONIQ5 to the drive way recently. For a bit, my obsession with the IONIQ5 and quest to figure out how to get two chargers working in one home with a modest 100 amp electrical panel led me to create EV, Eh?, my YouTube channel.