Files
Lee Hanken 7c8efd2228 Initial commit: HPR Knowledge Base MCP Server
- MCP server with stdio transport for local use
- Search episodes, transcripts, hosts, and series
- 4,511 episodes with metadata and transcripts
- Data loader with in-memory JSON storage

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-26 10:54:13 +00:00

445 lines
26 KiB
Plaintext

Episode: 1387
Title: HPR1387: Christmas Light Synchronization
Source: https://hub.hackerpublicradio.org/ccdn.php?filename=/eps/hpr1387/hpr1387.mp3
Transcribed: 2025-10-18 00:39:11
---
Did you prepare these to challenge me?
Hello Hacker Public Radio.
I have wanted to contribute to HPR for several months now.
I find it annoying and pointless to create a script read off of, but after several attempts
of trying to record myself plattering on with stuttering, cursing, air gaps, and humming,
I had to create a script for my episode.
In this episode, I would like to talk about building a Christmas late synchronization system.
I had first seen someone's homebrew system years ago, synchronized music by the transsevere
and orchestra.
I was immediately mesmerized and went to work on figuring out how it was done.
I have had a fair amount of experience with fabrication electricity over the years.
However, I really only know how to maintain the systems that have already been engineered
and fully vetted by others.
My exploration led me to first find all the unreliable sources, and then on to sites that
leave out the magic step into getting their systems to work.
My investigation was showing that truly reliable sources were scarce.
Frustrated with what I was finding, I gave up and my time was consumed with remodeling
our home and moving to a different state into our new house.
Last year I wanted to start another attempt at making a system, but time was short and
planning something like this during the holidays is pretty dumb.
After the last holiday season and while putting away the holiday lights, all I could think
about is getting these lights synchronized for the next season.
So I went back to the disinformation highway to continue my research.
Although I was looking strictly for technical information, personal information leaked
through.
The common thing amongst other people is to start planning for the next season in July.
To start planning in January is a bad idea, and all you will have is English when it becomes
time to display your show.
Soon July came along, and I argued with myself if I was really going to commit myself to doing
this.
From what I have read, I can be reassured that there is no backing out once you start.
Most people talk about what they're going to add to the system, not what they're going
to subtract from it.
So let's talk about the first step.
Some sites will say, get as many lights as you can as soon as possible, and make that
the number one priority.
This seems like a logical step, but I don't know what I'm doing.
Why would I go out and buy lights?
I already have lots of lights, it's not like I'm going to put up 100,000 new lights this
year.
Now my plans are to put up the same old lights that I already have and incorporate them
into the system, and then maybe grow from there.
So if I already have some lights, I need a new step one.
Unfortunately most of the so-called step-by-step lists don't agree on anything.
I personally believe the most important thing to any holidays setup is electricity.
You can build a synchronization system, but if you don't have any power to plug it into,
it's not going to work.
So that's what I'm choosing as the first step in creating your holiday system.
The front set of my house has two outlets on two different circuits.
One conveniently placed on the front porch at the lowest possible spot with a plastic cover
that hinges upwards, preventing direct line of sight when trying to plug in an extension
cord.
The second is behind a razor sharp ornamental grass bush.
The two circuits are on 15 amp breakers and each outlet is installed with a ground fault
circuit interruptor, GFCI.
You may have seen these before in your bathroom.
They have a reset button and a test button.
These circuits are not dedicated to these two outlets.
They are connected to all of the rooms on the front side of the house.
For me this simply will not do, because when or if the breaker trips, the whole front
of the house will go dark.
Instead of fussing with these difficult circuits, I decided to install two new circuits that
would be used exclusively and dedicated for any outdoor lighting.
My garage has a relatively empty breaker box, so whatever I decide to do, I'll have plenty
of room to do it.
With my mind on future needs, I made a checklist of what I wanted.
One, two separate circuits.
Two, 20 amps on each line.
Three, the circuits need to terminate in two separate two gang boxes, somewhere out in
the yard where all the lights would connect to them.
So that's exactly what I did.
From the breaker box I ran, 12 gauge, 3 wire, also known as 12, 3 overhead, and down
the wall into two separate junction boxes.
A GFCI outlet is the first device connected from the home run between the breaker box and
this junction box.
So anything installed after this point will have GFCI protection.
The second thing installed is a light switch that can create an open circuit to the power
leaving the garage.
I had thought about installing a digital timer, but instead installed a light switch while
I made up my mind.
The GFCI outlets and light switches are rated at 20 amps, not 15.
Under the light switches, the circuit runs out of the garage and is trenched about 30
inches below ground in PVC conduit.
They reappear in a spot in the yard, terminated at the two gang outlets.
This took quite some time to do.
All of my expenses are going into copper, so the budget doesn't call for any machinery
to help along the way.
So at this point, regardless, if I continue with my adventures, I should always have enough
power just to run lights.
As the month carried on, I stumbled across Instructables.com and found a few people actually
showing their secrets off.
I probably spent a whole month reading and then rereading what they were doing, trying
to decide if I really wanted to do this.
There seemed to be only about six people that truly knew how to make a synchronization system,
and they all had one thing in common, Arduino.
Without even really knowing what an Arduino is, I knew that this was going to be the key
to getting a system in my very own.
Without hesitation, I linked over to Adafruit and bought an Arduino Uno.
Everyone else had one, so why shouldn't I?
The Uno would only cost me $30, and I'd be on my way to completing my goal.
If you've never seen or heard of an Arduino, there are credit card-sized microcontrollers
that are open source and made in Italy.
Here is a little hang-up with the Arduino.
Everything is programmed in C-language.
I know nothing of C or any real programming language.
Oh, I know about it as you guys talk about it on here.
The only programming I have had any experience with is HTML 1.0.
These geriatric skills would not help me with the Arduino.
Before I go any further, I'm going to need to go off script for a minute.
A few years ago, at my last job, I had a co-worker that would always come to me.
Asking questions.
He would always ask me to come on trouble calls with him, because he didn't know how to
fix something or configure something.
I was kind of the go-to guy in our enterprise area.
And one day, I had mentioned that I needed to do some drywall repair in my house, and
I was extremely intimidated about doing the drywall repair.
I'd never done it before.
I didn't know anything about it.
And here was this guy that always asked me questions.
And he was so easily able to tell me how to do it, how to make it smooth, how to hide
the tape, how to mud.
And from that conversation, I realized, even though I might have felt like this smartest
person in the room because I always answered his questions, I really wasn't.
We all have different skill sets.
But there's nothing out there that limits us to these skill sets.
We can choose to do whatever we want.
If I wanted to replicate a space shuttle, there's already one built.
I have a blueprint.
I'm not saying that I need to be the inventor, or we need to be the inventor of stuff.
But anything that man has made on Earth, any one of us is capable of recreating it.
All the skills and information you need to be able to do that are available.
The only thing holding us back is us.
One of my favorite quotes comes from James Cameron, the director of Titanic.
He once said, quote, don't put limitations on yourself.
Others will do that for you.
In the quote, I bring it all this up because the Arduino is written in C and not knowing
anything about C. For most people, this would be the end of their journey.
I don't know C, I'm not going to learn it.
It's pointless.
But that's not how I look at things.
I continue on.
Even if I never master it, I'll still continue on and muddle my way through it.
So anyways, let's get back to the script.
Arduino helps you learn basic skills.
You can read practice pages at Arduino.cc or you can use the Arduino examples built
into their IDE.
The first tutorial I explored was the Blink command.
Part of the Arduino Blink tutorial is making pin 13 blink on and off.
It shows you where to assign the Blink command to pin 13 and it shows you how to initialize
the Blink command by turning the power on and off to that port.
In Arduino, and I suppose maybe in C programming language, you set it to high and low.
For me, this was a lot of fun.
I really enjoyed seeing the first signs of life from my Arduino.
The Arduino is an experimental platform, so it has encouraged me to experiment.
I've always been told that music is math.
So I chose to experiment with this idea as my first Arduino sketch.
Arduino calls your program a sketch.
So I found some sheet music with around 8 notes.
I printed the sheet music and then translated all the notes into numbers and then I mapped
the numbers to coordinate with the pins on Arduino.
I uploaded my sketch to Arduino and nothing happened.
You can't see the electricity moving around on Arduino.
I needed to do something to ensure the program was working.
So I ran over to RadioShack to try and remedy this hang up as soon as possible.
RadioShack carries Arduino parts, so I bought a prototyping board, resistors, and LEDs.
LEDs are great for flashlights and such, but when it comes to prototyping and experimenting,
LEDs are a great indicator that circuits are working correctly.
So I soldered up 8 LEDs, resistors, and wires to the prototyping shield and placed the
shield onto the Arduino.
I plugged power into the Arduino and the light started blinking.
I gave myself a mental high five and congratulated my brain on the job well done.
This test was successful.
It was time to move on to the next step.
I had already been over on Amazon browsing relays and found a company on their called
Sainsmart that has pre-built relay modules.
I picked out a module that had eight relays on it.
This module was about $9 and I didn't think I would be able to build something as nice
as this for the same price.
What I did next is sloppy and dangerous.
Don't do this.
I did this so you don't have to.
For some reason the people on Instructables think it's okay to run 120 volts into a shoebox
or a clear rubber made out.
I repeated what they did for educational purposes.
So I built a system in an $8 home-deep-up toolbox.
I wired up everything correctly and then tested the system.
I was able to get eight strings of lights to blink, but I wasn't very happy with what
I had.
My idea for making the sequence look nice on it was only 8 LEDs blinking in a 2x2
but that doesn't translate to strings with 100 bulbs and doesn't even look sequence.
In fact, it looks sloppy and attempts at being random.
Maybe even call it laggy, it was really bad.
I left out everything on how to get the system to work because I don't want anyone to do
this.
Seriously, do not push high voltage into cheap plastic products as dumb and as dangerous.
I did this for you so you don't have to.
However, this first experiment passed all of my tests and filled in all the gaps in my
mind.
I now know exactly what I need to do and I'll cover my new box in detail.
I suppose I skipped over what a relay is.
You can think of a relay as an electro-mechanical light switch that used to direct current to
drive a magnet to mechanically move an internal switch to create an open or closed circuit.
This is the device that makes it physically possible to synchronize a light show.
When constructing my first prototype system, I may have crossed a wire or done something
wrong and I release the genie from my 8 relay board and now I only have 7 relays that
work on it.
Losing one of the relays didn't bother me too much because my plans are to build a larger
system.
I went back to Amazon again and then it's time purchased another 8 relay module and
then two 16 relay modules.
When talking about synchronization systems, a relay is also called a channel.
So with all my new hardware, I will now have enough to do 47 channels.
With how many relays I was going to use now, the Arduino Uno would not be usable.
The Arduino Uno only has 17 usable pins so I needed to A, build multiple systems or
B, get a new controller.
So I got a new controller.
My new controller is still in Arduino but instead of using the Uno is now the Mega.
The Mega is advertised to have 54 digital input output ports.
This is more than enough to drive the relays that I have.
The issue of a proper enclosure is not trivial.
This system contains high voltage and direct current electronics.
So I chose the cantex 12 by 12 by 6 inch PVC junction box.
The lid has 6 screws and a gasket to make the enclosure water tight.
The box was fairly expensive at $30 but it made everything feel better.
In my collection of spare parts and junk I found a fistful standoffs and screws that
actually had the same thread spacing.
I drilled holes in the box and screwed in the standoffs.
Once I had the relays and the Arduino parts mounted in the way I liked, I removed the
hardware only leaving the screws and standoffs.
On the inside and the outside of the box around all the mounting hardware, I used a combination
of hot glue, silicone caulk, and PVC cement to insulate the metal screws and to make the
box water tight again.
So here's a verbal image of what the box looks like now.
With the lid open and looking into the box, the entire backside of the box fits.
The mega and 216 relay modules.
On the 6 inch sidewalls I was able to mount the 8 relay modules.
Before I mounted the relays for last time, I wired them up for high voltage.
The relays have 3 set screws.
The center screw is the common hot wire.
From the relay I have one short 14 gauge wire running out of this screw and push into
a 4 port wire nut.
The deal makes a push in wire connector that has 4 ports.
The ports are bust together and make for a cleaner install when compared to standard
twist wire wire nuts.
One push in connector can connect to 2 relays and then jump on to the next wire nut with
2 more relays, so on and so on.
So there are a total of 4 relay modules and so I connected all of the common hot along
all of them in the same way.
When it came to the 16 relay modules, I used tall standoffs so I could hide all this
wire underneath them.
So these, so the 14 gauge wire connection on these are a little bit longer.
The set screws in these modules can only handle up to 14 gauge wire, so that's what I
used throughout the entire project.
The relay boards are only tied to themselves and not to each other at this time.
Before installing the modules back in your enclosure, you need to take a look at the other
two set screws on each relay and make a decision.
On these relays, to the right of the common hot is the open side and to the left of the
common hot is the closed side.
At this point you have to think about your Christmas lights.
Do you want them to all be off all the time and have the relays turn them on to create
your sequence?
If you choose this, your default state will be having a dark yard.
If you choose the other side, like I did, you will have your lights on all the time and
you'll be creating a sequence by turning the lights off and then back to their original
state of being on.
By choosing this way, even if nothing happens, the default state in my yard will be having
the lights on all the time.
Don't be careful as this will become confusing as we go along.
It's inverted from traditional thinking.
With the relays wired with the common hot, I install them into the box and screwed them
in.
After that, I tied the modules hots together but made it more complicated than it needed
to be.
For some reason, it seemed logical to me to have two sides in my box.
The idea was I ran two circuits from my garage out into the yard so my synchronization system
should be built to operate off of these two circuits, two relay modules per circuit.
So everything in the box is split down the middle, an A and B side.
I suppose I did this because I was worried about load balancing, although it's really
not necessary when only dealing with 47 lights on a 20 amp circuit.
There's more than enough electricity to support the box on one circuit.
Honestly, everything can be tied together and it won't stress the system out the slightest.
All it does is make things a little bit more complicated.
With all the relays in place, the next thing I did was to connect all the DC cables in
the systems.
I created connectors from bits and parts lying around.
Old IDE cables are nice for this.
I wanted a completely modular system in case anything failed.
So nothing is hardwired, soldered.
I started out on the mega with pin 22 and wired one pin to one relay pin over and over
again 47 times.
Then I created a DC power distribution board that distributed 12 volts to all the relays
in the Arduino.
I fitted everything up and insured that it all fit in place and I had good connections.
Then I pulled the mega back out.
Even though I have the relays in a box and all the hardware is connected to the mega, it
has never been powered on and is still dumb and doesn't know what it's supposed to be
doing.
Earlier, I was talking about using sheet music to make a sequence and how that's a bad
idea.
I needed a new way to make the Arduino blink.
I found some popular Windows software called Vixen lights.
Vixen is extremely granular lighting synchronization software.
To the best of my knowledge, it only works under Windows.
Although I have been trying to get it to work in wine someday, I'll get this to work.
When you get Vixen up and running, the screen looks like a spreadsheet full of cells.
Each cell represents time on a channel, double click in the cell to turn it on or off.
I'm not really concerned about making a sequence at this time, so I move on because it's
more important for me to get a completed box.
When using Vixen, the Arduino needs to be connected to your computer via a USB cable.
You'll configure Vixen to send a serial to the COM port that the Arduino is connected
to.
I have spare computers, but installing Windows XP on a box and getting it configured is extremely
annoying in itself.
Then figuring out how to put a desktop in the yard adds to this pointlessness.
Some people might jump on the Wi-Fi bandwagon.
There are too many devices on the internet now.
I really don't want a power system to be available on the internet.
Plus, why would I want my lights to be remotely operated like this?
If I'm not home, why do I care if the lights are on or off?
I'm doing this for me.
The challenge is to eliminate the USB cable and keep it off the internet.
I found out about wireless radios called XPs.
They're a little expensive for what they are, but they do exactly what I want.
They create a wireless serial connection.
When you're out shopping for your own, there are two different types of XPs.
There's the S1 and S2.
I believe the S2s are also called Zig-Bees.
They're a lot more configurable and you can make them more secure than the S1s.
I ordered the wrong ones.
I ended up getting the S1s.
The S1s are extremely easy to set up, but in order to set up any XPs, you need to buy
more hardware.
I ordered a majority of my hardware from Adafruit, so along with the two XPs, I also got
two Adafruit XB adapter kits and one FTDI cable.
After building the adapter kits and plugging in the XPs, I wired one of them into the Arduino.
For the Arduino side, all you need is four wires.
Ground, five volt power, transmit, and receive.
The Uno has one transmit and receive connection while the Mega has four.
This doesn't matter in this scenario, since all Arduino needs to do is listen.
On your computer, all you need to do is plug in the XB using the FTDI cable.
It is recognized as serial, I believe, in both Windows and Linux.
No drivers were needed.
The only configuration that's needed is to change the COM port in VIXIN.
You need to tell VIXIN what port the XB is plugged into so it can send serial commands.
But before you can even test this, you still need to give instructions to the Arduino.
I've created a sketch and it will be posted with my show notes.
My sketch is rather long and it may be too long and it could probably be shortened up.
But all the sketch really says is listen to serial, take that, and then do this.
Upload your sketch to the Arduino with your USB cable plugged into your computer.
I don't believe you can upload the sketch or make any changes to the Arduino using the XBs.
Once I had this all set up, I built a 47 LED array connected to the pins I wanted to use.
Plus the XB.
With a 9V battery and the Arduino, I tested this setup.
I created a one at a time sequence on my desktop and hit play.
Immediately, the lights started flashing wirelessly through the XB.
I walked away from the desktop antenna and I was able to venture about 100 feet from the antenna and maintain the signal.
Everything was looking great.
I didn't change the thing with the Arduino and placed it back in the box and connected it to the relays.
I connected up the DC system and then tested the relays one at a time.
I also used this time to play with my multimeter.
I tested every aspect of the system before moving on, making sure the set screws work as claimed and everything was connected correctly.
This will be the last time you'll have easy access to all the hardware, so it needs to be verified.
The next step is wiring the relays to do work, so let's do some money math real quick.
I have 47 channels.
Outdoor outlet boxes are only two-game.
If you break the tab off your outlets, you can put four channels in one outdoor PVC box.
Let's say you didn't destroy one of your relays, so you would have 48.
48 divided by 4 is 12.
You need 12 outdoor PVC boxes at roughly $7 per box at a minimum that cost $84 total.
Then add onto that receptacle covers.
They generally cost about $14 each.
12 times 14 equals $168.
84 plus 168 equals $252.
This doesn't cover the cost of wire, outlets, and PVC fittings.
$250 just for molded plastic seems wasteful.
It is best practice to go with that method.
I simply cannot spend the money for that.
Instead, I went to the dollar store and bought enough green extension cord to complete my task.
The extension cords are about six feet long.
I cut about one-third of the cable off the male side.
Since these extension cords are not solid core copper,
I stripped off a bit of the ends, twisted them up before tinning the tips with solder.
The relays have set screws, and stranded wire doesn't make a nice connection as solid
wire.
So by tinning the tips, you're giving the screws something to bite onto.
In conjunction with the extension cords, I used electric glands to pass the wires through
the wall of the junction box.
I bought about six of them, and randomly divided all 47 extension cords through only five
of them.
The six alone will be used for main power later on.
As I installed the extension cords, I labeled and color coordinated the female ends, and
also hit it with the multimeter to double check my work.
Once all the extension cords have been connected and verified, it's time to install the main
power.
In my junk pile, I had about eight feet of 14-3 outdoor real max.
I color coordinated both of these to indicate which one is A and which one is B.
There's nowhere to tie in the ground in the system, so I clipped off that end and then
moved on to the white wires.
I tied all the neutrals together, and then tested that with a multimeter, testing across
the two for this point, ensuring I had a solid path.
I used the same push-in connectors from earlier, and several hot glue sticks to create a solid
brick of push-in connectors.
With the neutrals finally connected to each other respectively, it's time to work on the
hot wire.
Earlier before we installed the relays, we connected all the modules, common-hots, together.
So all I have to do now is connect the hot wire into this series that's already connected.
I ran a live test to the system a few weeks ago.
I pulled out a few strings of lights and played around experimenting with Vixen.
I have a few ideas on how I would like to change the system, but have it incorporated
these yet.
What I would like to do is bring a Raspberry Pi in to remove my desktop.
I found a program on source forage called Lumos, the creator claims that his program
can play Vixen sequences via the command line in Linux.
I would like to give this a try or just get Vixen to work under Linux.
I don't want to dedicate my main computer to performing this yearly task.
I know I'm not a wordsmith, and I have the cadence of been Stein, but I hope I've explained
this well enough for you to understand what's involved in making a Christmas light synchronization
system.
Thank you for taking the time to listen.
I don't do social media, and the only place I hang out is in the PODNUTS chat room on
free node.
My username is underrunner.
If you have any questions, you can contact me there.
Thank you.
You have been listening to Hacker Public Radio, where Hacker Public Radio does our.
We are a community podcast network that releases shows every weekday on day through Friday.
Today's show, like all our shows, was contributed by a HBR listener like yourself.
If you ever consider recording a podcast, then visit our website to find out how easy
it really is.
Hacker Public Radio was founded by the Digital Dog Pound and the Infonomicum Computer
Club.
Hacker Public Radio is founded by the Binary Revolution at binref.com, all binref projects
are crowd-responsive by Lina Pages.
From shared hosting to custom private clouds, go to LinaPages.com for all your hosting
needs.
Unless otherwise stasis, today's show is released under a creative commons, attribution,
share a light, free dose of light.