Stairwell LED lighting changes color during a typical day and night

Version 1 Prototype. It all started with a desire to have more light in the stairway but I wanted to do something different. Reflecting on my experience as a colorist I just kept wondering if I could pattern the color changes to represent at least to me, certain colors for each part of the day. Think of it as a form of alignment. How do the colors align with my way of thinking about the day?

I figured out there was power at the top of the stairway railing and a closet to hide the electronics inn a nice plastic box with some room to spare. So I got started experimenting and testing with a test installation.

I tucked the LED strip along under the railing and wires to complete the circuit to a proximity detector at top and bottom of the stairwell handrail.  The proximity detector controls a simple 5 volt relay that powers on the Shelly LED controller. The time ‘on’ for the LED strip is adjustable from 45 seconds to three minutes. I left it a 45 seconds for now.

How it works (initially)

I created a Node-Red (NR) configuration that pushes an HTTP URL to the Shelly RGB device every 1-2 hours. The Shelly RGB (yellow device in picture) is Wi-Fi-operated relay for LED smart strips. Since I worked as a colorist for movies in the past, I’ve always been enamored with colors especially the way color changes during the day. I just felt inspired to build this not because I had to, I just wanted to. You can learn more about how to the Shelly devices here. I realize there are less expensive do-it-yourself ways to build this wifi enabled HTTP circuit. I just like the Shelly because it’s a smart IoT device ready to go with no fuss and no soldering. You can access it directly on your network i.e. 192.168.1.40 and the internal web server gives you a page that looks like this.

I can manually control the Shelly RGB device directly since it’s a smart IoT device and its configuration is accessible. This is a web page served up by the little device.

This is a view of the box and electronics during some initial testing. The box is smaller than it looks in this picture.

The graphic below is this Node-Red configuration. The visual layout of process flow made it easier to prototype using Node Red.

After prototyping I moved the Node-Red configuration from the desktop Ubuntu system to a Raspberry PI Zero 2W running Node-Red. Then …

UPDATE

After figuring out the colors and time of day triggers in Node-Red I realized I could do this with greater simplicity using a script in a Linux CRONTAB. It was simply enough to SSH into the Raspberry Pi 2W and build a CRONTAB script. What makes this possible is the Shelly RGB device allows

# Website reference for all things CRON: https://crontab.cronhub.io 

# */10 *  *  *  *     curl ‘http://192.168.2.41/color/0?turn=off&red=200&green=000&blue=000&white=0’

#### 12am dark red until 5am note to self

#### 5am dark blue Early Morning  note to self

0 05 * SEP-DEC * curl ‘http://192.168.2.41/color/0?turn=on&red200&green=000&blue=25&white=0’

0 06 * SEP-DEC * curl ‘http://192.168.2.41/color/0?turn=on&red=200&green=100&blue=0&white=50’

0 08 * SEP-DEC * curl ‘http://192.168.2.41/color/0?turn=on&red=100&green=150&blue=0&white=50’

0 10 * SEP-DEC * curl ‘http://192.168.2.41/color/0?turn=on&red=100&green=100&blue=100&white=200’

0 12 * SEP-DEC * curl ‘http://192.168.2.41/color/0?turn=on&red=150&green=100&blue=100&white=200’

0 13 * SEP-DEC * curl ‘http://192.168.2.41/color/0?turn=on&red=100&green=100&blue=250&white=200’

0 14 * SEP-DEC * curl ‘http://192.168.2.41/color/0?turn=on&red=100&green=100&blue=150&white=250’

0 17 * SEP-DEC * curl ‘http://192.168.2.41/color/0?turn=on&red=200&green=75&blue=100&white=200’

0 18 * SEP-DEC * curl ‘http://192.168.2.41/color/0?turn=on&red=200&green=100&blue=250&white=200’

0 19 * SEP-DEC * curl ‘http://192.168.2.41/color/0?turn=on&red=50&green=100&blue=200&white=50’

0 20 * SEP-DEC * curl ‘http://192.168.2.41/color/0?turn=on&red=50&green=50&blue=250&white=25’

0 22 * SEP-DEC * curl ‘http://192.168.2.41/color/0?turn=on&red=000&green=25&blue=255&white=0’

0 00 * SEP-DEC * curl ‘http://192.168.2.41/color/0?turn=on&red=250&green=0&blue=50&white=0’