Climate Control - The Smart Home Way
When most people think of climate control in the smart home, they instantly think of the Nest Thermostat. This is only natural, especially in summer as the days get longer and hotter, but ignores many other aspects of climate and air quality. As a VC at Samsung Ventures, we invested in Awair, an air quality sensor for consumers that measured temperature, humidity, CO2, chemical, and PM2.5 concentrations. I owned one in my apartment and often would use the data to remind me to open the windows and let in some fresh air. However, doesn't it seem barbaric that I should have to do what a computer tells me? What if I had smart devices make use of this indoor air quality data and respond accordingly?
This is the most straightforward to solve, by simply attaching an internet-connected thermostat from Nest or some other brand. However, because my apartment uses central heating that building management controls, there isn't much I can do here. This is a problem I can re-visit when I eventually buy a home.
An important part of air quality is the levels of carbon dioxide, chemicals, and dust. I decided
that the best way to ensure air freshness was to pump in clean air from outside. Although outdoor air is substantially cleaner than indoor air, it is still subject to a decent amount of dust and soot, especially in the city. Therefore, I modded my existing BlueAir internet-connected air purifier to serve as an air intake, pulling in air from outside through a metal duct and filtering it of dust, pollen, and soot. Because it was already connected to the internet, programming it to respond to the Awair was relatively simple. At first, I used IFTTT for a backend but switched to a local automation platform, Home Assistant (more on this in an upcoming blog post) for better control of complex automations.
For some reason, my apartment is always very dry, to the point where it was irritating my eyes. I knew I needed to solve this problem with a humidifier. Although internet-connected humidifiers exist, I found them to be bulky and expensive. I elected to instead use this project as an opportunity to practice my hacking skills, and instead bought a Particle IoT board and a cheap humidifier off Amazon. I assumed that it wouldn't be too difficult to have the particle board emulate a button press, which I could then link to my Awair and automate. Progress seemed promising at first until I realized that commands from the Particle were not always picked up properly by the humidifier. After more extensive testing with my multimeter, I came to the unfortunate realization that while the humidifier was running 5V through the controller mechanism, the operating range of the Particle was only up to 3.3V, and therefore could not reliably send signals. Granted, I could receive information on the state of the humidifier by putting some resistors in series, but I wanted to take action, not merely observe.
I then had an epiphany: What if instead of emulating a button press digitally, I actually had a machine physically press the button? Surely, this wouldn't be as elegant of a solution, but it turns out there is a device, the SwitchBot, that is designed specifically to mechanically press existing "dumb" buttons. The device uses Bluetooth and therefore would normally be difficult to connect to the internet, but thankfully I was able to connect it to my HomeAssistant server using the Raspberry Pi's built-in Bluetooth radio. To set the correct speed without pulling current state data, I simply added a Wi-Fi plug to the power source to power cycle and reset the humidifier. In this way, I could set the humidifier speed simply by power cycling the smart plug and then activating the button pusher for the correct number of pushes for the speed level I wanted.
In the video above, the humidifier speed is changed from "low" to "medium". You can see the plug power cycle the humidifier (if you listen carefully, you can even hear a click), then the SwitchBot pushes the power button twice to set speed to "medium".
With these two hacks, I think that my home's climate is pretty under control for the foreseeable future. I don't plan on making any substantial changes until I move or buy a home with its own heating control. Unless, of course, I decide to buy and install an air conditioner...