I began this project to solve a challenge -- create a simple, remote visual indicator that I could place anywhere in my house to let me know whether my garage door was open or closed. As a home automation hobyist, I wanted to use my hub (a Hubitat Elevation C-8) to cue these indicators based on the status of door contact sensors being monitored by the hub.
My solution uses an ESP8266/NodeMCU development board, NeoPixel ring, piezo buzzer with corresponding Arduino firmware, and a custom device driver written in Groovy for my home automation hub. The device can be controlled directlyover alocal WiFi networkusing HTTP protocols. It canstrobe, flash, pulse, blink anS.O.S.,display custom pixel patterns, and sound anaudio (buzzer) alert.
I now have three of these devices positioned strategically in our house. They have proven to be quite helpful in solving the original problem of forgetting to close the garage door, and I also use them as visual alerts for other home automation sensors (e.g., water leak sensors).
I cheekily decided to give my solution a name: the General-purpose WiFi-connected Indicator Device (GWID -- pronounced gee-wid). That formality of naming the device should not mask the point that, in the end, this was simply a hobby project. Period.
I hope that others may find my design and documentation useful for their own needs, perhaps motivate some community-developed improvements, and maybe even inspire some completely novel ideas.
Project Documentation on GitHubI originally documented my project on GitHub. I have decided to continue using that as the primary authoritative source for the hardware, firmware, home automation driver, and associated open source licensing. While some of the same information is duplicated here, the complete repository is located at https://github.com/tdspublic/GWID using the following directory structure:
docs/ → General documentation (setup, users guide)
hardware/ → Schematics
firmware/ → Arduino ESP8266 NodeMCU Firmware source code hubitat/ → device driver (and related docs) for Hubitat Elevation
examples/ → Example applications (e.g., an HTML control panel interface)
LICENSE-* → Licenses for software, hardware, and documentation CHANGELOG.md → Version history
Complete GWID Arduino hardware documentation is posted to the GitHub repository under the hardware/ directory as hardware/gwid-hardware-build.md
Purely for aesthetics, I ended up carefully fitting all of the electronics into a small ABS plastic project box as pictured on title page of this project. My project box measures 80 x 50 x 26 mm (3.15 x 1.97 x 1.02 inches). I did not design a custom printed circuit board, but simply used 22 gauge wire with solder to connect everything up. It's a tight fit, but it is doable. Of course using a larger project box would be easier and more forgiving to work with.
- Mounting the NeoPixel ring: It's best to solder all three connecting wires to the NeoPixel ring before mounting it. Also, cut a piece of thin black vinyl (or thick black paper) into a circle slightly larger than the center opening of NeoPixel ring, and hot glue that to the backside of the ring in order to cover that opening. Next, drill a 1-3/8 inch round hole in the center of the face of the project box. Dry-fit the NeoPixel ring to the hole so that the circuit board is on the inside surface of the box with the pixels facing outward through the hole. One positioned, place several evenly-spaced dots of hot glue around the perimeter of the circuit board to attach it to the inside surface of the box.
- Mounting the NodeMCU: With the NodeMCU board positioned inside the project box, note the location of the micro USB port on the board. Use a drill or rotary tool to create a small rectangular opening at one end of the box so that a USB power cable can be connected to the board.
- Mounting the tactile switch: The switch needs to be mounted inside the box in a location where a small hole can be drilled in the project box so that the switch can be depressed by inserting a paperclip or pin through the hole. It's best to solder the two connecting wires to the switch before mounting it. Next, drill the hole. Finally, hot glue the switch into position while taking care not to block the pinhole in the project box or gum up the front (mechanical part) of the switch.
The firmware/src directory of the GitHub repository contains the Arduino source code. The initial public release firmware is named gwid-v1-00.ino
User Guide - WiFi Connection and Basic OperationThe docs directory of GitHub repository contains a complete user guide in four parts. Parts 1 and 2 explain how to configure the device to connect to the local WiFi network and explain the pixel indications during boot up (with illustrations). Once connected to the WiFi network, the GWID can be controlled directly from a browser window on any device connected to the same local WiFi network.
gwid-user-guide-pt1-connect-to-wifi.md
gwid-user-guide-pt2-pixel-indications.md
Part 3 of the user guide contains the complete list of GWID functionality, including how to set various display modes (e.g., flash, pulse, rotor, sos., strobe, trail) and associated parameters (RGB color, brightness level, speed of the effect, and piezo buzzer on or off).
gwid-user-guide-pt3-http-commands.md
Part 4 of the user guide includes animated examples (.gif format) of the pixel display in various modes as well as links to videos of these modes on an actual physical device. Direct video of the GWID tended to get washed out by the intensity of the pixels and contrast with the surrounding area, so the.gif animations are actually better as examples of the various device modes. Several.gif are included here as well.
gwid-user-guide-pt4-animations.md
The hubitat directory of GitHub repository contains details on how to use the GWID as a remote indicator with a Hubitat Elevation C-8 home automation hub. The subdirectory hubitat/driver contains the driver source code in Groovy. The initial public release driver is named gwid-hubitat-v1-00.groovy
The subdirectory hubitat/docs contains instructions on how to setup the device in Hubitat--i.e., install the driver and configure the device--as well as users guide on controlling the GWID through Hubitat device commands and automation rules.
Finally, example use cases are contained in this file under the same directory:
Caveats and ConclusionAs a hobbyist, the project's design-build-test-learn loop involved lots and lots of learning (failures). I relied quite a lot on Internet searches for basic information, and found that some of the AI tools were very useful at helping with the development and debugging of portions of the firmware and driver.
I do not claim to have exercised best practices of coding or design, and I'm certain that others with more experience will quickly identify where I have made suboptimal choices in the hardware, firmware, and Hubitat driver. For example, my solution uses the HTTP protocol, rather than the more secure HTTPS protocol. For my application, that seemed like manageable risk since 1) the GWID is simply an indicator device that does not control other devices; 2) HTTP messages between the GWID and hub are confined to a secure local WiFi network; and 3) it's a convenience device, not used or intended to be used in any safety- or security-critical context. But encryption of the message traffic could be an area where additional development might be useful.
In the end, the GWID has proven to be an excellent solution to the problem I set out to tackle, and has been very reliable with my Hubitat set up. Mostly, the project was a fun learning experience!









Comments