Saturday, April 4, 2020

Xlights and the RPi Again - The End

Xlights

This is the software that breathes life into the lights! It is the most creative part of the process. Xlights is a popular option in the Christmas lighting community. It was originally called Nutcracker.

Here is a description of how to install Xlights on a Windows computer: https://xlights.org/hrf_faq/how-to-install-xlights-on-windows/

A great way of getting to know Xlights is to follow the Quick Start Guide in the User Manual here: https://manual.xlights.org/xlights/

Below are the main points for setting up Xlights for each tab.

Setup Tab

No need to enter anything in this tab since the RPi is doing all the work.

Layout Tab

I uploaded a photo of the front of my house that included all the lighting locations. Reduced to 50% brightness in Xlights so the lighting overlay is more easily seen.

The 5V strings...

For the snowflake, click on the Download button which is the down-pointing arrow, second from the right, then click on the house photo and drag out to the right size in approx the actual location of the snowflake. In the new window that opens, select the ChromaFlakes 24" 3 prong Fancy which is the name of this coro ornament. Then click on Insert Model.

Now to set up the addressing. Since this is the first string, the Start Channel is 1 (this field is located in bottom-left box). The end channel is automatically set at 144 since there are 48 pixels in the snowflake (48 pixels x 3 LEDs in each pixel = 144).

The next ornament is the bauble. This is not yet available in the system so I created a custom model. This is described here: https://youtu.be/d9JbDvwzoiQ

I decided the order in which the LEDs would be inserted into the back of the bauble and added them to the matrix. I uploaded it for others to use here: https://drive.google.com/drive/folders/0B2ozCEidtWh3MUdWM3hhNENzazQ

To get the bauble on the screen, click on the Import button which is third from the right then click on the house photo and drag out to the right size, then select the bauble model (which will end in .xmodel) from where it was saved

The first pixel of the bauble will be immediately after the last pixel of the snowflake, so Start Channel is "Boscoyo ChromaFlake 24 3 prong:1".

The last ornament is the candy cane. Click on the Download icon then click on the house photo and drag out to the right size. In the new window that opens, select the ChromaCane 48 which is under Christmas and Candy Canes. Then click on Insert Model. The Start Channel is "Boscoyo ChromaElement 13:1" because it is immediately after the last pixel of the bauble.

The 12V strings...

The first pixel in the 12V string is the first floodlight. There is no specific button to select a floodlight so I created one from the Single Line button. Drag a shape onto the house photo as usual. Change the name to 'Flood 1'. 

The control wire for the 12V strings comes from the controller, it does not continue from the end of the 5V string. However the controller treats it as if it continues from the end of the 5V string, so the Start Channel is "Boscoyo ChromaCane 48:1" which is after the last pixel in the candy cane. Change Nodes/String to 1.  Under Appearance, change the Pixel Size to 100, Pixel Style to Blended Circle and Black Transparency to 50.

Next is the strings of 50 LEDs. Initially I wound these around the column at the front of my house. This resulted in quite a few of the LEDs being at the back of the column and out of sight which I felt was a waste. I remounted them going up and down the front of the column four times, so there were 4 lines on each column each going in the opposite direction to the one next to it. To model this in Xlights I created four Single Lines on each column. The first line has 13 pixels, the second has 12, the third has 13 and the last has 12. I called them Single Line 1-1, Single Line 1-2, Single Line 1-3 and Single Line 1-4. The Start Channel of Single Line 1-1 is Flood 1:1.

Next is the second floodlight. Insert it onto the photo, name it Flood 2 and fix its settings as for Flood 1. Start Channel is the end of Single Line 1-4.

Next is the second string of 49 LEDs (was 50 but I destroyed one of them!).  I broke these into 4 Single Lines named Single Line 2-1, Single Line 2-2, Single Line 2-3 and Single Line 2-4. The Start Channel of Single Line 2-1 is Flood 2:1.

Next are the remainder of the floodlights. The Start Channel of Flood 3 is Single Line 2-4 and the Start Channel of the subsequent flood light is the previous flood light.

This is what the Layout tab looks like.




Now that the configuration is done it's time to add life to the lights...

The Sequencer Tab

Select the New Sequence button (green folder) and select Animation (since I don't have any musical accompaniment) then select 40fps (the fastest option) then Quick Start. This will bring all of the models into the main window. Experiment with dragging and dropping effects into each model and reviewing the results in the House Preview window. Use the Play (green arrow in the top bar) to preview the sequence. Select the colours used in the Color window. Save the sequence with the save button (blue disk).

The Final Steps

The Falcon Player will control the lights each night as a stand-alone device - your home computer and Xlights do not need to be running. To do this, the sequence that I have just designed and saved in Xlights needs to be uploaded into the Falcon Player. Fortunately this function is built in to Xlights.

Here is a description of the next process: https://manual.xlights.org/xlights/chapters/chapter-five-menus/tools/fpp-connect

In Xlights, from the Tools menu option, select FPP Connect. Xlights then searches the network for the Falcon Player and brings up the 'FPP Upload' window which shows the Falcon Player and lists the sequences that are available. In the top section of the window tick the Upload checkbox, the Media checkbox and the PiHat checkbox. FSEQ Type is V2 Sparse and UDP Out is None. In the bottom section tick the checkbox next to the sequence to be used by the Falcon Player. Then click the Upload button to upload the selected items to the Falcon Player.

Now just a couple more steps to go... setting up the sequence in Falcon Player. This is described well by Canispater Christmas here: https://www.youtube.com/watch?v=ODSKccObZI4.

Go to the browser and call up the Falcon Player. From Content Setup menu select Playlists. In the New Playlist box type a name for the playlist and click Add to create a new empty playlist. This will appear in the Playlist Details below. Type is 'Media and Sequence' and for the Sequence enter the name of the sequence that was uploaded from Xlights and click Add. The sequence will appear in the Main Playlist below. Then click on Save.

Now go the Scheduler which is the next option in the Content Setup menu. Add the playlist and the daily start and stop times. Click the Save button. Everything should now be ready to go. From the Status Control / Status Page click on Restart FPPD and the sequence should start playing and the lights should be operating to the programmed schedule.

And that's it!!