Office Christmas Tree: Modelling in xLights

Time to catch up on my blogging plans for this project before moving on to the next one. The next step in the process was to create a model of my Christmas tree in xLights so that xLights knows how it looks, then create some simple sequences to be run when the status of builds in Jenkins changes.

Creating the base model

The first step was create a model of the whole tree. This started by clicking the “Create new Custom” button, clicking somewhere on the layout and then opening the “model data” popup from the detail panel.

Here I was able to upload a picture of my model that I dumped out of OpenSCAD as the background picture. From here I was able to adjust the grid to make is roughly match up to the holes in my model, then I clicked in each hole, starting from bottom left, up the tree, around the star then back down the right hand side of the tree. This gave a nice simple schema for placing the lights into the model and looked something like this.

Custom model of Christmas tre

Splitting into sub models

While xLights has lots of effects that might look great applied to the whole tree I at least wanted the ability to control the star separately to the rest of the tree so I decided to split the tree into lots of sub-models to give me lots of flexibility.

Sub models I created on the Christmas tree

Creating groups

While I could have done this part by creating them as sub models I also created some groups of the sub models. This allowed me to get a little hands-on experience with the groups functionality too.

Model groups I created on the Christmas Tree

Creating the sequences

Then it was time to use the model to create a few small animation sequences. First was a static sequence that set an alternating white and blue light around the outline of the tree with a yellow star. This state was intended to be used when the build in Jenkins was ok.

Build ok sequence

Next I needed a sequence for when a build is in progress. This had a single line effect bouncing around the outline of the tree with a spinner effect on the stars.

Build in progress

To get people’s attention when the build failed I created the following sequence with a bars effect scrolling across the tree and a pulsing red effect on the star.

Build failed

Finally I created a little test sequence for playing with the groups that I had created. This first flashed the bottom segment, middle segment, top segment, followed by the whole left side, whole right side, then star.

Pulsing effect


I’m not going to write much about this now as the user interface has had a large overhaul in newer versions of xLights. But I used the FPP Connection function to upload the sequences to the Falcon Player ready to be included in playlists that I could then control from a bot. That’s material for the next post.