It Ain’t Broke, But Should I Fix It?

Five years ago, I wrote a series on getting started with your own MQTT-based home information/automation network. Five years is a long while in Hackaday time. Back then, the ESP8266 was a lot newer, and the 8266 Arduino port wasn’t fully in shape yet, and the easiest software framework to get MQTT up and running was NodeMCU; so that’s what I used for the article series, and as a consequence a handful of devices around my house run minor modifications of that basic “hello world”, but doing useful stuff.

Since then, NodeMCU has changed a bunch of its libraries and the ESP32 has replaced the ESP8266 in my parts drawer. If you tried to run my code, you’d find that it won’t run on an ESP8266 without porting or compiling an old version of NodeMCU for yourself anyway, and it won’t run on an ESP32 at all. When [Chris Lott] tried to follow my guide, he discovered that Micropython is probably a better language choice in 2021. To minimize lines of code, I’d agree, although the Arduino and Espressif’s own native IDF have grown into the job just about as well. In short, anything but NodeMCU.

Built in an hour, survived for five years.

But my home automation system doesn’t care. Those little guys are running 24/7, flipping bits like it was still 2016. Thermometers, light sensors, and power meters haven’t changed much in five years, and although I’ve revamped the databasing, display, and user control a number of times since then, using a fixed communication transport protocol means that they’re still talking the same language. Indeed, even if NodeMCU is dead to me, the MQTT content of my original series is all still valid, and installing a broker on a Raspberry Pi has only become easier in the intervening five years.

So I’ve got a bunch of legacy code running within the walls of my own home, and it makes me nervous. If the devices fail, or maybe when they eventually fail, it’s not going to be “just flash another ESP8266 and replace it”, because even though I have some ancient NodeMCU binaries sitting around, I know when to throw in the towel. But there’s no good reason to pull them down and start reflashing either. Except that it makes me a little bit itchy, just knowing that there’s orphaned, dead-end code running all around me. Surrounding me. Staring deep into my hacker’s heart.

I know better than to tear down a running system, even though I could do it one device at a time, and each module would surely be a simple, independent fix; even though I’d love the excuse to play around with Micropython and its MQTT implementation on the ESP8266, or maybe even swap some of them out for ESP32s; even though these were all temporary quick hacks that have somehow served for five (5!) years. I certainly know better, right? (Right?)

Minimal MQTT With Micropython

I have been meaning to play around with MQTT for some time now, and finally decided to take the plunge one evening last week. I had three cheap home temperature and humidity sensors, and was bothered that they often didn’t agree. Surprisingly, while the analog one had a calibration adjustment in the back, I have no idea how to calibrate the two digital ones. I took this as a sign that it was time to learn MQTT and be able to install my own, accurate sensors. Of course, I began by ordering the cheapest sensors I could find, but I can always upgrade later on.

Three Cheap Sensors

While we have written quite a bit about MQTT in Hackaday, I had to go all the way back to 2016 to find this introductory four-part series by Elliot Williams. Five years is a long time in the tech world, but I decided to give it a try anyway. Continue reading “Minimal MQTT With Micropython”

Keeping An Eye On The Water Heater Pilot Light

[WJCarpenter]’s gas water heater uses a small pilot light that needs to stay burning permanently to ignite the main burners as required. Four or five times a year, the pilot light goes out and needs to be manually lit. This involves an expedition from the upstairs bathroom to the basement, always in the early morning, after having spent a few fruitless minutes waiting for hot water. Having grown tired of this exercise, [WJCarpenter] built Water Watcher, a pilot light monitoring system with some ESPs and a light sensor.

Water Watcher consists of an ESP8266 connected to a light sensor taped to the inspection window of the water heater. It reports the status of the pilot light over MQTT to an ESP32-based M5 Atom Matrix in the main bedroom, which displays it using a 5×5 RGB matrix, as demonstrated after the break. Both ESPs run ESPHome, so programming is as easy as giving it a YAML config file. [WJCarpenter] tested a few different light sensors, until he found the TSL2591, which is sensitive to the right wavelengths and has enough dynamic range for watching a pilot light.

This might not be a complicated hack, but we do not doubt that it reduces frustration a bit on those fateful mornings. Be sure to check out the Water Watcher project page, it’s an entertaining read! Continue reading “Keeping An Eye On The Water Heater Pilot Light”

DIY Laser Tag System Comes With All The Bells And Whistles

While VR is becoming really immersive, it still can’t compete with a game of good old laser tag to get the blood pumping and spending quality time with friends. [Xasin] has been working on a DIY laser tag system for a while now, and it has grown to include an impressive array of features and customizability.

Named LZRTag, the project started back in 2018 with simple ATmega328 based prototypes on breadboards. It has since evolved to a fully-featured system with ESP32s in the 3D printed pistol communicating with a Raspberry Pi/Linux game server over MQTT. Each pistol also features an accelerometer, I2S audio amp and speaker for game sounds, and WS2812 RGP LEDs for light effects. IR Lasers are used as emitters to target wearable IR receivers with more RGB LEDs wired to the pistol.

A Ruby server on a Linux machine takes care of all the communications, game management, shot validation, and scoring. It can handle up to 255 players and is designed to be extremely customizable for game modes, weapons classes, or any other feature you would like to have. [Xasin] has also created IR beacons to add even more possibilities, such as capture the flag, safe zones, and revive zones.

We really like the flexibility of the system, and it would make an awesome group project for a hackerspace. You could also add a shock module to motivate players a bit more to avoid getting shot. If you want more gun, take a look at the laser tag rifle with a HUD we featured earlier in the year Continue reading “DIY Laser Tag System Comes With All The Bells And Whistles”

Making Smart Bulbs Smarter With The Power Of MQTT

What’s the point of smart home automation? To make every day tasks easier, of course! According to [Tomasz Cybulski], that wasn’t the case when he installed IKEA smart lights in his closet. It’s handy to have them in a common switch, in this case a remote control, but having to look for it every time he needed the lights could use some improvement. Enter his project to make smart bulbs smarter, through the use of a simple ESP8266.

While hooking a door switch to the lights’ power supply could provide a quick solution, [Tomasz]’s wife wanted to keep the functionality of the remote control, so he had to look elsewhere. These light bulbs use the simple Zigbee protocol, so arranging for other devices was rather trivial. A USB dongle to interface with the protocol was configured for his existing Raspberry Pi automation controller, while an ESP8266 served as the real-world sensor by connecting it to reed switches installed in the closet doors.

With all the hardware sorted out, it’s a simple matter of making it all talk to each other. The ESP8266, using the Tasmota firmware, sends a signal to an MQTT server running on the Raspberry Pi, which in turn translates it to a remote trigger on the Zigbee frequency with the dongle. The lights turn on when the door opens, and off again once it closes. And since there were no further modifications to the lights themselves, the original IKEA controller still works as expected, which we’re sure [Tomasz]’s wife appreciates!

MQTT can be an interesting piece of software that goes beyond just home automation though, and if you already have a server in your home you can use it to transfer your clipboard’s contents to another device. If you are using it for home automation though, here’s an inspiration for a rather unusual dashboard to keep things interesting. Check out this hack in action after the break.

Continue reading “Making Smart Bulbs Smarter With The Power Of MQTT”

MQTT Dashboard Uses SHARP Memory LCD

One of the more interesting display technologies of the moment comes from Sharp, their memory display devices share the low power advantages of an e-ink display with the much faster updates we would expect from an LCD or similar. We’ve not seen much of them in our community due to cost, so it’s good to see one used in an MQTT dashboard project from [Raphael Baron].

The hardware puts the display at the top of a relatively minimalist 3D printed encloseure with the LOLIN32 ESP32 development board behind it, and with a plinth containing a small rotary encoder and three clicky key switches in front. The most interesting part of the project is surprisingly not the display though, because despite being based upon an ESP32 development board he’s written its software with the aim of being as platform- and display-independent as possible. To demonstrate this he’s produced it as a desktop application as well as the standalone hardware. A simple graphical user interface allows the selection of a range of available sources to monitor, with the graphical results on the right.

All code and other assets for the project can be found in a handy GitHub repository, and to put the thing through its paces he’s even provided a video that we’ve placed below the break. User interfaces for MQTT-connected devices can talk as well as listen, for example this MQTT remote control.

Continue reading “MQTT Dashboard Uses SHARP Memory LCD”

How An Engineer Designs A DIY Energy Recovery Ventilator

We have no idea whether [Nick Goodey] is a trained engineer or not. But given the detailed design of this DIY energy recovery ventilator for his home HVAC system, we’re going to go out on a limb and say he probably knows what he’s doing.

For those not in the know, an energy recovery ventilator (ERV) is an increasingly common piece of equipment in modern residential and commercial construction. As buildings have become progressively “tighter” to decrease heating and cooling energy losses to the environment, the air inside them has gotten increasingly stale. ERVs solve the problem by bringing fresh, unconditioned air in from the outside while venting stale but conditioned air to the outside. The two streams pass each other in a heat exchanger so that much of the energy put into the conditioned air is transferred to the incoming unconditioned air.

While ERV systems are readily available commercially, [Nick] decided to roll his own after a few experiments with Coroplast and some extensive calculations convinced him it would be a viable idea. One may scoff at the idea of corrugated plastic for the heat exchanger, but the smooth channels through the material make it a great choice. He built up a block of Coroplast squares with the channels in alternate layers oriented orthogonally, letting stale inside air pass very close to fresh outside air to exchange heat without ever mixing directly. The entire system, including fans, an Arduino for control, sensors galore, and the Hubitat home automation hub, is powered by DC, so no electrician was needed. [Nick] has a ton of detail in his build log, including all the tools and calculators he used to design the system.

Given the expense of ERV systems, we’re surprised we haven’t seen more stories about DIY versions. We have talked about HVAC systems a lot, though — after all, HVAC techs are hackers who make housecalls.