About
In this post, I will talk about my self hosted home automation setup. I have been working on this and slowly adding things over the years. I will probably update this post over time with the new things I will add.
Table Of Contentens
Server And Hosted Services
I run Home Assistant as VM on Proxmox. Then I installed the Mosquitto MQTT broker and NodeRed instance inside Home Assistant to receive/send MQTT messages and run autmations.
Additionally, I also installed stuff like InfluxDB database(used for Grafana), Grafana Dashboard, Visual Studio Code, Jupyter Lab and ESP home.
I use WireGuard to VPN into my local network to avoid exposing any services to the internet. I use DuckDns to get a custom domain, so I don’t need to remember my public IP(and it changes anyway as it’s dynamic) and I can get an SSL certificate for the domain that I then use in Nginx Reverse proxy manager to secure the HTTP connection and avoid the browser warnings.
Home Automation Interface
All the stuff is accessible from the browser, which means I can access it from my phone or computer. However, I felt it would be nice if I had a dedicated device just to interface with it so that I don’t necessarily need my phone/computer.
Initially, I was going to use a very old table I bought around 10 years ago. It wasn’t really useful for much, and I thought it would be good enough to simply display a web page. But as it turns out, it wasn’t even good enough for that as half a gig of RAM is just not enough today. This was a pain as I had already 3D printed the enclosure for it and mounted it on the wall. I bought a cheap new tablet instead and made a new wall mount for it.
Air Sensors
I have a few of those cheap BLE Xiaomi temperature sensors that I have flashed with custom firmware. Here’s a tutorial on how to do it if you are interested. Depending on the firmware version it ships with, you might not be able to perform the flashing wirelessly (I wasn’t). In such a case, you must flash it over serial, here are a few useful tutorials: link 1, link 2.
I have one of these sensors on the ceiling and one on the floor to measure the temperature difference and turn on the ceiling fan to equalize the temperature. I also have one in my 3D printer enclosure and filament storage container.
Then I have an outdoor O-1PST and an indoor I-9PSL sensors from AirGradient. Additionally, I have an indoor #adAmazon LinkAirThings Wave Plus sensor that, unlike AirGradient sensors, also measures radon, illuminance and atmospheric pressure but doesn’t measure NOx or PM counts like the AirGradient sensors.
The round white thing at the top, sitting on the gray boxes, is the Arithings sensor, while the square white one with the OLED screen is the Airgradient.
Roller Blinds
One of the first things I got started on many years ago, in 2018, was automating my roller blinds. I bought these aftermarket motorized roller things.
I honestly wouldn’t recommend (at least this particular model) as the strap doesn’t properly line up and the strap gets all bunched up inside. Additionally, the plastic center “pin” where the strap spool rotates on has broken on both units for both windows. I managed to repair them by adding a screw through the center. So if you can go for the motorized winders that are built into the center shaft of the actual roller blind.
This was the first prototype. I was using a UWP(Universal Windows Platform ) app and an Arduino at the time. At the time, I was planning on using a Raspberry Pi running Windows 10 IoT and using it as a sort of master controller running this UWP app. That’s why I made a few tutorials relating to the topic, like: Windows 10 IOT Install on The Raspberry Pi 3, Windows 10 IOT Deploying a Simple App To The Raspberry Pi
Later, I abandoned this idea and went with an ESP8266 + MQTT + NodeRed + Integration into HomeAssistant.
Those motorized winders had the option to be controlled with these remote controls using RF. At first, I was thinking I could reverse engineer the protocol and use one of those common, cheap 433MHz modules with the Arduino, but I found an even easier alternative.
As I had two of these remotes and they can each control up to three devices, I decided to tear one of them down, solder wires to the buttons and simulate button presses with and Arduino.
Power Meter, Fan And Lights Controller
This circuitry is inside a second electrical box below my breaker box. It’s used to control the ceiling fan(two speeds set by capacitors) and the two room lights, which are wired so you can still use the wall switch to turn them on/off.
Then there is a CT clamp used to measure the current consumption of the entire room. I would like to change this to another sensor that can also measure the voltage, so I could compute the actual power regardless of the voltage fluctuation and measure the real power(with the power factor) instead of just the apparent.
The 5V power supply also powers the tablet on the wall. Eventually, I ended up adding the blinds controller and an extra ESP32 board that acts as a Bluetooth bridge into this box as well.
Ambient Lights
Ventilation Controller
I started this project all the way back in 2016 when I drilled a hole in my wall for the vent. Looking back, I should have drilled another hole for an intake that I could run through a recuperator. And then piped straight into an air purifier. Right now, I just let the air find its way into the room and then have a running #adAmazon LinkXiaomi Mi air purifier to filter it.
I prefer this approach over one of those self-contained solder fume extractors with an activated charchola filer beacuse thre is no filter to replace, I don’t have to worry about the filter getting all the pollutants in the first pass and finally I can use this for general purpose ventilation as well(reduce CO2 and radon levels).
As far as humidity management goes, I just use my AC in dehumidification mode to reduce humidity if it’s too high or a #adAmazon LinkLevoit misting humidifier to raise it if too low(mostly during winter). Both are IoT devices that can be integrated into Home Assistant.
Other
ESP32 Cameras
Thermostat Heating/Cooling
Anemometer(Wind Speed Sensor)
I bought the anemometer for wind speed measurement way back in the day(10+ years ago) on eBay, then a few years ago, I finally got around to doing something with it.
This became a bit of a failure of a project and almost belongs in the Projects Graveyard section of the blog, but at least it was fun and a learning experience(or more like a reminder of things I should have thought from the beginning). The solar panel/battery weren’t big enough, the solar panel coating went bad, I should have used an MPPT charger, missing resistors, didn’t have the right voltage regulator, the circuit I made ended up being flawed, etc.
I might make a separate post about this as it would make an interesting failure analysis case.
Here’s the flawed schematic. The whole principle of the wake-up signal for the ESP is bad, as the anemometer might stop in the position where the HAL sensor is outputting a high signal.
The fix would be to put a capacitor in series with the signal line to block the DC and only let the signal through when it’s in pulses(anemometer is rotation), then use an RC filter to convert pulsed DC back to a stable DC of a high enough voltage to latch the ESP power on the circuit.
But I didn’t want to spend more time calculating and testing things, as spent enough time on this project. I just wanted to get it finished and working, so I just ran the wire inside the house where an ESP8266 is powered straight from mains power to avoid all the solar panel hassle.





