IoT Property Management


It all started when the fire department showed up at the building I own. It turned out that the washing machine transmission had seized up and the motor cooked the drive belt, filling the second floor with smoke. It all turned out OK, but it left me wanting to know about events like this as soon as possible. That turned into a project that interfaced an ESP32 wifi-capable processor with the building's smoke alarms. Now when a smoke alarm goes off, I get an email alert within about 8 seconds. Then I check with the tenant, and find out exactly what is burning in their oven.

Along the way, the project expanded to notify me of power failures at the site (longest one so far: over 14 hours), and for potential freezing temperatures in the building's unconditioned attic space where the water pipes run (lowest temp so far: 37 degrees).

The most interesting part of the project was reverse-engineering how to detect when the smoke alarms were going off. To do that, I bought a smoke alarm relay device which is normally used to do something like turn on an emergency exit light when the smoke alarms are going off. I took the relay unit apart and reverse-engineered its circuitry to determine the alert signaling mechanism, then made my own interface circuitry that would allow my processor to detect the alert signal.

Honestly, the hardest part of the project was working with Amazon Web Services (AWS) to perform the notification mechanisms. Amazon is really set up for managing Enterprise Level organizations, not a one-man show. There is a ton of stuff regarding enterprise-level account security and permissions that is just annoyingly complex. Plus it is always long enough in between my interactions with AWS that I forget how it all works.

But for the last couple years now, it all works.

Version 1

The version 1 box is shown on the upper left, with the smaller version 2 box sporting an OLED display in violation of all things holy regarding IoT. I don't care, I like the OLED display. It's always nice to have something physical even on a cloud device. The magenta color on the RGB LED indicates both that WiFi is working, and that there is a valid MQTT connection to AWS.

This project used a commercially available processor board: an Adafruit ESP32 Feather board. That saved me a lot of time and effort by already including things like the LiPo battery charger that the device uses to ride through power failures. All I did was design an interface board for the temp sensors, smoke alarm sensors, OLED and button interfaces. If it turned out that the ESP32 was no good for some reason, I would have been able to replace that board with a different Feather model. Risk reduction, you could call it.

Here is the Version 1 PCB. You can see it contains a small breadboard area for expansion and fixing screwups. You can also see in the upper right part of the breadboard area evidence that parts are soldered down on the other side. That would be a fix for a screwup. That's pretty normal occurrence for any board designed by me that is labeled "Version 1".

Version 2

Here is the Version 2 board, with V1 error fixed, and an OLED display added. You can see the Adafruit ESP32 Feather board on top. I like the Feather because it has a LiPo battery charger on board. All you do is plug in a LiPo battery and you have instant battery backup. I used a battery that would power the box for over 24 hours during a power failure.

The OLED mounts on the backside of the PCB so that it faces out of the faceplate.

I like using RJ-11 Ethernet jacks for general cabling. The cables are super cheap and available anywhere, and you get 8 wires per plug. They are hard to beat. The only thing is that they are a little bit big.

I also really like these Carlon 4x4x2 PVC electrical junction boxes from Home Depot as project boxes. They are cheap, easy to mount, hugely durable, and water tight, at least until you start drilling holes in them.

I chucked up a cheap Chinese milling cutter in my drillpress, then clamped the box's faceplate in a cheap Chinese X-Y vise. The result was a crude milling machine to make a relief in the thick plastic faceplate, then a hole for the visible area of the OLED display.

I'm not kidding about the cheap X-Y vise. It's X and Y handles seem to be designed so that a clockwise rotation makes one axis move the cutter towards you, but on the other axis, it moves away from you. After forgetting that for the umpteenth time, I finally put a Post-It note on the drillpress to remind me which way to go.

This project has been working for a couple years now. So far, so good. A couple power failures, a couple smoke alarm events, but nothing serious.