3D Printed Industrial/Steampunk
Web Connected Lamp

December 31st, 2016

After getting my Mr. Wallace printer working I wanted to print something else tall and ran across this Industrial / SteamPunk looking lamp. It looked like a good test for both height and quality printing. I didn't want to just make a static lamp out of it though, I wanted to make it a web connected lamp.

So after getting the printing done with only minor layer issue, thus the shorter clear bulb, I picked up some 8 LED neopixel type of lights to use along with an ESP8266-01 I had on hand.

I did modify the base to remove the threads for the proposed bulb and to make sure I could get the ESP and anything else to fit before printing. Download the modified STL here. I also made a small round adapter to hold the neopixel ring which is here. I simply used a few spots of hot glue to hold it all together. I should note I printed the cage and rings hollow and it actually came out fine.

The neopixel ring sits down in the bottom of the lamp and projects up. Originally I thought maybe I needed to use more than one ring and mount another higher up in the bulb but it works well this way and illuminates the bulb from the bottom up.

From there it was simply programming the ESP8266 for my particular logging features and then adding code to the home automation web interface to talk to the lamp. You can hit the lamp on it's local IP but it's much easier for me to do this via the home automation web server that then talks to the local IP of the lamp. As noted in the ESP logging piece linked below, the device "checks in" occasionally to keep the local IP updated in a database so I can find and talk to it from the web site.

The code I am using is a modified version from This Instructable which I understand is a modified form from elsewhere. I added my code to log the ESP device into my Home Automation system as discussed in my ESP deployment for temperature monitoring. I also added some other modes that run the chasing sequences slower which is more soothing than the fast chaser defaults. The existing code does have a simple R G B command letting you pick your own RGB values so almost any color option is available for just being on.

I really didn't do much to the example code besides add my wifi settings and my code to register the device with my home automation database. What is nice about this code is it is written to run in the background so the ESP and/or your Arduino can go about it's business without being blocked by neopixel actions.

Web Controls

As part of this whole little project I wanted to integrate the controls into my home automation web interface. This is rather easy with the layout I use and I just made another page to control the lamp directly. The controls on the page actually go through the authentication page that issues commands so unless I allow controls to the world it onlyworks when I control it. It would be easy to add set colors but I haven't figured out how to dynamically create a color picking table under my old ASP code yet which would be best in the long run.

Alexa Control

Why? Why Not? - Since I already have the Alexa controls hooked to the home automation system as discussed earlier, there really wasn't any reason not to add controls for the lamp. I just added controls to "turn the steam punk red", green, red chase, etc to the Alexa skills and added my response code to handle it. It works rather well as we can ask Alexa to turn most of the modes on or simply to turn the lamp off.

Next Steps

The next steps should involve adding code to the home automation system to color or select the light features based on other home or enviornmental inputs. For example at certain times of the day the light could change from blue to green to red depending on the outside temperature. Another would be to make it light up with the red fast beacon / chaser if the alarm system is tripped. One could even have the light change colors with the time of the day, stock market data, or other ideas I'll never think of.

Additional Pics