We had several timers plugged into outlets that turned lamps on when it got dark and turned them off at bedtime. I got tired of having to frequently reprogram them all during spring and fall as sunset time changed so I got interested in home automation. I started reading up on Home Assistant and bought a Raspberry Pi.
I wrote some code to send data from my weather station to HA using MQTT. I had existing code on my server that received the data from the weather station, wrote it to a Postgresql database, and forwarded it to a Valkey server. I have sensors for the weather station in most rooms in the house and this data is included in all of these reports. I have most of the readings on the HA homepage.
The Pi got me intrigued. I graduated from an electronics tech school about 44 years ago. I lasted two years in field service before moving on to software but I have always enjoyed playing with electronics. The Pi opened my eyes to what’s available today with SoC’s, sensors, and all sorts of cool stuff and it’s pretty cheap. So I set out to build myself a remote.
I got some ESP32 development kits and some breadboards. I hooked up some switches and LEDs and started playing with ESPHome. The remote has four push buttons and four LEDs. Each button can generate single, double, and long press events. Button 2 turns a lamp on. Double click turns it on full brightness. Holding button 2 increases brightness. Holding button 1 decreases brightness. Pressing button 1 turns it off. Button 3 toggles an outlet. Button 4 sets away mode.
I use the LED’s as indicators. I wrote some automation that watched the temperature in the living room and if it falls below 69 degrees during the day then the remote’s red LED turns on. This tells me to go check for a low fuel or ignition failure in the fireplace insert. Enabling away mode turns on the yellow LED. I just got some circuit boards and bought packages of assorted LEDs, switches and resistors so I built a second remote on a circuit board.
I haven’t had this much fun in a long time. These are home projects combining my interests in electronics and programming for a useful purpose.
Anyway, my lights now turn on at night when my weather station says it’s dark outside. If anyone is interested I could try to post pictures and code.
