Tom Hammond

Tom Hammond

When website visitors vote on sequences, the highest voted sequence is stored on the website in a file called dynamic.json.  Falcon Player on your Raspberry Pi has a special playlist type called "dynamic" which can read this file on your website, then play the sequence therein.  Setting up this communication between Falcon Player and your Internet control website is rather easy!  Here is how to do it.

 

Create a dynamic playlist

  1. In Falcon Player, choose Content Setup > Playlists from the top menu.
  2. In the New Playlist field, type the word "Dynamic", then click the [Add] button.
  3. In the Playlist Details section on the lower half of the window, choose "URL" for the "Type" field from the drop-down list.
  4. In the URL: field, type the full address of your website, a forward slash (/), the name of the folder that you created for the Internet control system, followed by this phrase: "/prePlayActions.php".  This is case sensitive!

    For instance, the URL field for my website would be: http://itwinkle.org/control-lights/prePlayActions.php

  5. Click the [Add] button.
  6. Next, choose "Dynamic" for the "Type" from the drop-down list.
  7. For the "Source Type" field, choose "URL".
  8. In the "URL to JSON data" field, type the full address of your website, a forward slash (/), the name of the folder that you created for the Internet control system, followed by this phrase: "/dynamic.json".  This is case sensitive!

    For instance, the "URL to JSON" field for my website would be: http://itwinkle.org/control-lights/dynamic.json

  9. Click the [Add] button.
  10. In the Playlist Details section on the lower half of the window, choose "URL" for the "Type" field from the drop-down list.
  11. In the URL: field, type the full address of your website, a forward slash (/), the name of the folder that you created for the Internet control system, followed by this phrase: "/postPlayActions.php".  This is case sensitive!

    For instance, the URL field for my website would be: http://itwinkle.org/control-lights/postPlayActions.php

  12. Click the [Add] button.
  13. Lastly, choose "Pause" for the "Type" field from the drop-down list.
  14. For the "Pause Time" field, enter "3".
  15. Click the [Add] button.
  16. At this point, your dynamic playlist is created!  Click the [Save] button near the middle of the screen to save the playlist.


 

For your information, the way it works is this:

When the playlist is executed, prePlayActions.php queries the Internet control website for the sequence that it should play next.  If no one is voting, a random sequence is chosen.  Then, a custom dynamic.json file is created on the website, containing either the random sequence or the sequence with the most votes (if visitors are actively voting).  Voting is reset, allowing visitors to vote for the next sequence.

Next, Falcon Player reads dynamic.json and plays the sequence therein.

When the sequence finishes, postPlayActions.php performs minor cleanup actions.  The playlist will then run again from the beginning, ready to setup a different sequence to play.

 

Configure Falcon Player to start the dynamic playlist automatically

Note: As of Falcon Player v2.7.2, there is a bug with the dynamic "type" in playlists; the "Repeat" feature does not work properly as shown in Step 5 below.  Falcon Player v4.6.1 or higher fixes this problem, use these higher versions.

To have Falcon Player automatically start the dynamic playlist when the Raspberry Pi is powered on, do the following:

  1. Choose Content Setup > Scheduler from the top menu.
  2. Click the [Add] button.
  3. The "Start Date" field should have "(current year)-01-01" in it, while "End Date" should have "(current year)-12-31".  Leave these fields as-is.
  4. Choose "Dynamic" in the drop-down list under "Playlist".
  5. The "Days, "Start Time", and "End Time" field should have "Everyday", "00:00:00" and "24:00:00" in them, respectively.  Leave these fields as-is.  Similarly, the "Repeat" field should have a checkmark in it.
  6. Click the [Save] button.
  7. That's it!

 

When you reboot your Raspberry Pi, Falcon Player will automatically start the dynamic playlist, querying the Internet control website for the sequences that it should play.  The dynamic playlist will repeat itself automatically, so after each sequence is played, the website is queried again for the next sequence to play.

 

Congratulations, you now have Internet controlled Christmas lights!

 

Note: This v2 Internet Control system is a big improvement over the v1 system.  v2 is much simpler to setup, allows voting, and does not expose your Raspberry Pi to the Internet!  While the first version allows a limited number of Internet visitors to view your lights, the v2 system allows unlimited visitors via the free Twitch video streaming service.

 

Normally, your computer controls how your Christmas lights are animated.  You create animations with the xLights software, then it sends commands to your light controllers and strings of strings to animate the them.



While the convenience of having a single computer for creating animations and animating your lights is nice, leaving your computer powered on all day during the Christmas season is not that efficient.  If you accidentally turn off your computer, reboot it, the computer crashes, etc., your light show stops.  Powering a computer 24x7 is not efficient with electric, either.

Some people solve this problem by creating your animations using your home computer, then playing back the animations and controling your lights using a separate, low-power computer.  This way you can continue to use your home computer as usual throughout the day, while the low-power computer is running 24x7, dedicated to playing your light show.  The Raspberry Pi is perfect for this purpose.  In xLights, you save your animations as playback files, then upload them into a special program (Falcon Player) on the Raspberry Pi that simply plays the files.

The Falcon Player software is quite powerful.  With a little bit of tweaking, not only can it play animations created from xLights, but it can allow Internet control of your light show!  By saving the xLights animations as multiple playback files (one animation per file, for example), people visiting a webpage can click buttons that tells Falcon Player which animation file to play.  For instance, an animation can make your lights look like candy canes with red & white lights, while another animation file can make your house sparkle with twinkling lights.  When no one is actively "controlling" your lights, a "regular" animation file is played for cars passing by.

 

The nice thing about Internet control of your Christmas lights is that is uses your existing knowledge of xLights (for creating animations).  And if you are already using Falcon Player to playback the animations, you don't have to learn much new there, either!  Internet control is mostly about tweaking Falcon Player to accept commands from the Internet and it's not that hard to do!

 

Click here for the next step: How It Works

Here is a slideshow on how to build Internet Controllable Christmas lights, a full-color version and a printable version.

 

Setting up Internet control of your lights involves these steps:

  1. Create a variety of xLights animations as multiple playback files.

  2. Install Falcon Player onto a Raspberry Pi computer.

  3. Upload show/sequence files from xLights to Falcon Player then configure it to be Internet control capable.

  4. Setup an outdoor webcam that allows website visitors to see your house lights as they control them.

  5. Combine the video from your webcam and audio from the Raspberry Pi, then send to a video streaming service.

  6. Setup a webpage that allows visitors to send commands to the Raspberry Pi, playing chosen animations.  The system uses HTML, PHP, and JavaScript to function, so it will work on practically any web browser.

 

Voting

Because a number of visitors can be viewing and controlling your lights simultaneously, visitors can vote for the animations they wish to play.  The voting system can be accessed from a smartphone in a car next to your house or from a computer anywhere in the world!

Between each animation, Falcon Player checks your website to see which animation got the most votes, then it plays it.  Votes are cleared, allowing visitors to vote on the next animation to play.  If no one is visiting/voting on your website, Falcon Player will randomly choose animations to play.  

NOTE: There is a hidden "power vote" feature that allows roadside visitors to overpower Internet voters.  This is useful for people in their cars at your house to see their chosen animation, overriding voters on the Internet.  Clicking the snowman at the bottom of the webpage enables this feature.  Make a sign in your yard that explains this feature, that drivers can see but Internet viewers cannot!  Power voting for a person stays active the rest of that evening, but resets for that person the next day (they have to click the snowman each day to continue using it).

The webpage has an anti-bot feature that prevents fake votes by non-human website visitors.  



How Internet control works

  1. Each time a visitor votes for an animation, the system denotes which animation has the highest number of votes. 

  2. Before playing anything, Falcon Player checks the website for which animation to play next, then plays it.

  3. During playback the website shows a live video feed of the animation, including sound.  Roadside visitors can use their smartphone to hear the sound via the Internet, or they can tune their car stereo to an FM station to listen.

  4. During animation playback, visitors are permitted to vote on the next animation to play.

  5. Back to Step 1!

 

Click here for the next step: How to Build It

Create a variety of xLights animations as multiple playback files

To animate your lights, you create special effects in the xLights program, then save these effects as a "sequence file".  The sequence should be 1-2 minutes in length.  You can create sequences that are synchronized to music, allowing people to choose songs that they wish to see and hear.  This page doesn't explain how to create sequences in xLights; you can read how to do this in the xLights instruction manual here

For Internet control of your Christmas lights, the idea is to allow people living in your neighborhood to watch your sequences, but allow the each sequence to be chosen by people on the Internet who want to control your lights.  When the Internet people have finished and no one is controlling your lights, sequences are chosen at random.  Thus Internet people only have temporary control of your lights; when there is no one controlling them, your regular show plays for the people in your neighborhood as usual.

When you save a sequence in xLights, two files are created: an .xml file that allows you to edit the show later (adding or removing animations) and a .fseq file that is used for animating your actual lights.  The fseq file tells which bulbs need to be which colors at any point in time during the show playback.  It is like a canned recording of the animation.

Sequence files are saved in the xLight's "show" directory.  Pressing [F9] in xLights will indicate where your show directory exists, but you will need to close xLights then open this folder with your operating system to reveal all of the .fseq files you have created.

 

NOTE: When saving your sequences, do not use spaces or commas in the filename! 

NOTE: If your sequence uses music (such as an MP3 or MP4 audio file), the music filename must match the sequence filename.  For instance, if you have a sequence named "SilentNight.fseq", the related audio file must be named "SilentNight.mp3" or "SilentNight.mp4".  Exact capitalization is important, too.

 

The next step is setting up a Raspberry Pi computer to play these .fseq files, in the next part of these instructions.

Getting Started

Most people create their animations using xLights (also called "sequences" or "shows"), then also use xLights to animate the lights themselves with the show that you created.  For Internet control, you still use xLights on your home computer to create animations, but the show playback files (.fseq) are saved to a Raspberry Pi computer (RPi).  The RPi computer then plays back the animations.

To do this, you will need a Raspberry Pi computer.  I recommend Model 2 or Model 3; they are much faster than the original RPi and should be able to handle controlling many lights.  You will also need a memory card (I am using a 16 gigabyte microSD card, but probably 8G is enough).  You will also need a 2A DC power supply with a micro USB connector.  If you search for "Raspberry Pi" on Amazon, you will find lots of kits there with these components together, including a case that keeps the RPi protected.  Lastly, you will need an empty flash drive (2G or more) at least temporarily.

 

Installing the software

(detailed instructions can be found here and here)

1. Format the microSD memory card with SD Card Formatter or something similar.

2. Download the Falcon Player v2.72 image file here.  You can find all releases of Falcon Player here.

3. Unzip the image file, revealing the .img file inside.

4. Use win32DiskImager or similar to write the image file to your microSD card.

5. Connect a monitor or TV to the HDMI port on the Raspberry.  Connect a USB mouse & keyboard.  Also connect an Ethernet cable from the Raspberry Pi to your home network's router.

6. Connect the micro USB power cable to the Raspberry Pi.  It will automatically power up.  You will see a black screen with white writing. 

7. Falcon Player is controlled with a web interface.  Open a web browser on your home computer, then go to http://fpp or http://fpp.local

If that does not work, find the IP address that your router assigned to the Raspberry Pi, then go to this address in your web browser.  The first time that your RPi boots into its operating system, it will request an IP address from your router's DHCP server.  Open your router's configuration application to determine the IP address that was assigned to your RPi.  You can then configure Falcon Player on the RPi using a web browser on your home computer.  Simply open a web browser, then go to the IP address.  

Note: Your home computer and RPi must be connected to the same router via Ethernet cables in order for them to "see" each other.


8. In the Status/Control > Network Configuration menu, enter "8.8.8.8" for DNS Server 1 and DNS Server 2, click [Update DNS], then reboot Falcon Player.  This is necessary to perform the next step.

9. Congratulations!  You now have Falcon Player installed and ready to use.

 

Setting up a static IP address

The first time that your RPi boots into its operating system, it will request an IP address from your router's DHCP server.  DHCP IP addresses can change from time to time, however.  For Internet control to work, your RPi must use a static (permanent) IP address instead.  To set a static address, do the following:

  1. Open a web browser and go to the IP address that your router assigned to your RPi.  

  2. When the Falcon Player - FPP" window appears, go to "Status/Control > Network" in the menu.  



  3. Set "Interface Mode" to "Static".

  4. In my case, I set the IP address to "169.101.200.200", a Netmask of "255.255.255.0" and a Gateway of "169.101.200.1".  

  5. In your case, you need to change these numbers to your own computer's subnet.  
    1. In Windows, open a Command Prompt, then type this command:
      ipconfig /all
    2. In the information shown, scroll to the top of the information to find the "IPv4 Address" line.  The first three numbers are your subnet.  Replace the "169.101.200" subnet in my example with your own subnet for the IP Address and Gateway.  
    3. The fourth number in the IP Address can be any number from 2-254, but it should not conflict with your home computer's IP address nor IP addresses used by any other device on your network.  
    4. The fourth number on the Gateway should always end with a "1".

  6. Lastly, click [Update Interface] to save your settings.

At this point, you may lose access to the RPi from your web browser, as the IP address is changed.  Simply type the new, static IP address into your web browser and you should be able to login to Falcon Player interface again.

 

Setting up the time zone

It is good idea to tell Falcon Player which time zone that you live in.  This is important so that Falcon Player starts your light show at the correct time each evening.  In the Falcon Player interface, click the "Status/Control > Config/Set Time" menu, then choose your time zone from the drop-down list under "Time Zone".  Click the [Submit] button to save your settings.

 

Disable Falcon Player's "Auto Update" feature 

I do this as a precaution if a future version of Falcon Player change enough to perhaps break the Internet control feature that I have setup.  To disable Auto Update, go to the Help > About menu in Falcon Player, then place a checkmark in the "Disable Auto Update" field.

 

Configuring Falcon Player to communicate with your light controllers 

When Falcon Player is "playing" a show, it sends commands to the light controllers, telling them which lights should display various colors in the show.  Falcon Player and the light controllers communicate via Ethernet cables using a special language called DMX.  The Raspberry Pi has an IP address and your controllers have IP addresses, this is how they find each other in the network.

If you were not using Falcon Player nor the Raspberry Pi, you would use xLights on your home computer to send commands to the light controllers.  The [Setup] tab display all of your light controllers, like the screen below:

Here are the important columns in this list:

Port

These are the IP addresses of your light controllers.  This way, xLights can find your various controllers on the network and send commands to them.  

In my case, you'll notice that all of the IP addresses are the same.  Normally, all of my Arduino light controller have unique IP addresses.  Arduinos are not very fast and get get overwhelmed with the vast amount of data that xLights sends to them over the network.  To solve this problem, Keith wrote a program called Rate Manager that intercepts all of the data going to the light controllers, reduces the data to a smaller size, then sends it to the light controllers.  Rate Manager act as a "middle man" to reduce the data size going to the controllers, making it easier for the Arduinos to handle the incoming flow.  That is why the IP addresses in the Port column are the same; xLights is sending all of its data to Rate Manager which is running on the Raspberry Pi.  If you are not using Arduino based light controllers, you do not need Rate Manager; you would put unique IP addresses for each of your controllers in the Ports column instead.

Baud Rate or E1.31 Universe

A light controller usually has multiple strings of lights attached to it.  In its simplest terms, each string is defined as a "universe", at least with my lights setup.  For instance, my GECE light controller (with two Arduinos controlling 16 strings), controls universes 1-8 and 18-25.  The Arduino running the ws2811 mega tree and RGB "three trees" controls 8+6 strings of lights, respectively, as universes 9-17 (the 17th universe can control all six strings of "dumb" RGB lights).  These universe numbers are saved into the Arduino's memory.  When xLights sends commands to certain universes, the correct Arduino knows when commands have arrived for its universes.

Num Channels

This number represents how many unique lights are in each string.  With GECE and ws2811 lights, each bulb contains three LED lights: red, green, and blue.  By mixing these three lights, you have hundreds of thousands of color possibility.  To xLights, a single bulb has three channels (red, green, and blue).  Therefore a string of 50 bulbs has 150 channels.  A string "Dumb" RGB lights can only be one color for the entire string.  Only three channels (red, green, and blue) are needed for each of these strings.

xLights/Vixen/FPP Mapping

Each light in your display has a unique "serial number" assigned to it.  That way xLights can easily control specific lights.  If your first string has 50 bulbs, there are three lights per bulb, so 150 lights would have serial numbers of 1-150.  The second string of lights would have serial numbers of 151-300, and so on.  Again, with "dumb" RGB lights, there are only three serial numbers (red, green, and blue) per string.

 

Since Falcon Player will be controlling your lights (not xLights), you need to copy the above ports, universes, and channels into Falcon Player.  Newer versions of xLights and/or Falcon Player can do this automatically, but I had an older version and manually copied the information to this in Falcon Player (via the "Input/Output Setup > Channel Outputs" menu):

 Also be sure to set the checkbox for "Enable E1.31 Output" above.  Be sure to click the [Save] button when you are finished!

 

Falcon Player's purpose is to play shows created in xLights, controlling your lights.  These shows are saved as .fseq (sequence) files in xLights, then copied to Falcon Player on the Raspberry Pi.  

The idea is to create short sequences 1-2 minutes in length.  When no one is controlling your lights, Falcon Player will randomly choose sequences to play.  This allows people living in your neighborhood to watch your animations without any effort.  When people on the Internet want to control the next animation to play, they "vote" on a sequence.  Votes are tallied at the end of the currently playing sequence, determining which sequence is played next. 

 

Uploading show/sequence files to Falcon Player

Falcon Player makes it easy to upload the sequence files that you created in xLights from your home computer to the Raspberry Pi.  These sequence files are saved in the xLight's "show" directory.  Pressing [F9] in xLights will indicate where your show directory exists, but you will need to close xLights then open this folder with your operating system to reveal all of the .fseq files you have created.

In the Falcon Player menu, choose "Content Setup > File Manager", then click the Sequences tab.  The "Sequence Files" section should be empty as you haven't uploaded any sequence files yet.  Click the blue [Select Files] button, then browse your computer to the xLights show folder where your sequence (fseq) files are located.  When you select your fseq file from a show and then click [Open], the file is immediately uploaded to Falcon Player on the RPi.  Repeat these steps to upload your all of your fseq files.  The Sequence Files section should fill-up with all of the fseq files that you uploaded.

If your sequences have music, you also need to upload the sequence's related MP4/MP3 file.  Click the [Audio] tab above, then the blue [Select Files] button, then browse your computer to the xLights show folder where your music (mp3) files are located.  When you select your music file from a sequence and then click [Open], the file is immediately uploaded to Falcon Player on the RPi.  Repeat these steps to upload your all of your music files.  The Audio Files section should fill-up with all of the music files that you uploaded.

NOTE: If your sequence uses music (such as an MP3 or MP4 audio file), the music filename must match the sequence filename.  For instance, if you have a sequence named "SilentNight.fseq", the related audio file must be named "SilentNight.mp3" or "SilentNight.mp4".  Exact capitalization is important, too.

 

Creating playlists from the show/sequence files

Now that your show/sequence and music files are copied to Falcon Player, the next step is creating playlists for each sequence.

To create a playlist:

  1. Click the Content Setup > Playlists menu in Falcon Player.  In the New Playlist field, enter a name (I chose to call my regular playlist the word "on", it's not a very good name), then click the [Add] button.  

  2. Scroll to the bottom of the window to the Playlist Details section.

  3. For the Type field, choose "Sequence Only" if your sequence does not use use.  If it does, choose "Sequence and Media" instead.

  4. For the Sequence field, choose your regular/fancy show/fseq file from the drop-down list.  In the Media field, choose the music file (mp3) that is associated with your sequence.

  5. Click the [Add] button.

  6. Click the [Save] button to save the playlist.

  7. Now repeat the above steps for all of your sequences, creating a playlist for each sequence..

 

 

Integrating Falcon Player into the voting system

Falcon Player has a feature called Dynamic Playlist that chooses sequences to play based on the status of a webpage.  As website visitors vote on the sequence to play, the highest rated sequences is stored on the website in a file named dynamic.json.  Each time Falcon Player finishes playing a sequence, it reads this file from the website to choose the next sequence to play.  If there is no one controlling your lights (if there are no active votes), the system will choose a random sequence instead.

To configure Falcon Player to do this, you need to create a special playlist with the "Dynamic" event.  The playlist will auto execute custom scripts on the website before and after the Dynamic event to update and interface with the voting system.  Finally, you will configure Falcon Player to play the "dynamic" playlist repeatedly.  You will learn how to do this near the end of these instructions.

In order for Internet visitors to control your Christmas lights, they need to see them remotely.  I use an "IP camera" (a.k.a. "network camera") that displays a streaming video of my house on a webpage.  This camera is mounted on a tree at the edge of the yard, pointing toward the house.  IP cameras use an Ethernet cable to connect to your router, allowing the camera access to your network.

IP cameras can be quite cheap to very expensive.  I needed the IP camera to stream live video onto a webpage without needing to login with a name & password. 

There is an inexpensive solution that offers more flexibility than the commercially made IP cameras.  I installed a Raspberry Pi into a "dummy" camera enclosure, then installed the free MotionEye software on it.  In addition to having most all the features I needed, it doubles as a recording security camera during the non-Christmas season.  Below is how to build it!

 

The hardware

  • Raspberry Pi 2 or Raspberry Pi 3.  The Raspberry Pi 1 does not have enough performance to operate the camera.

  • MicroSD memory card.  8 gigabytes is fine if you will only use it for live streaming.  If you want to use the camera as a recording security camera, I suggest a larger memory card to store the recordings (32 or 64 gigabytes).

  • Raspberry Pi camera module.  There are three versions (v1, v2, and v2.1).  Any of these versions will work.  The later versions support higher resolutions, but the resolution doesn't matter with live streaming (which uses low resolution anyway).



  • "Hacked" USB cable.  Any USB cable will do.  You will cut the end off, then wire the cut end into the Raspberry Pi to power it.  

  • Long, two-wire cable.  I connected male and female USB connectors to each end of this 100' cable.  This will provide power from the inside of my house to the outdoor camera.

  • Long Ethernet cable. This connects the outdoor camera to the Internet router inside your house.  Mine is 100'

  • 5.25V USB power adapter.  This plugs into the wall, then my 100' USB extension cable plugs into the adapter.  The Raspberry Pi needs 5V to operate, but 5.25V is needed because of the 100' cable length (the voltage drops a little from the long cable).  This makes sure that 5V is fully provided to the RPi.

  • Micro USB power cable.  This is handy for powering your Raspberry Pi during the installation of the software.

  • Dummy security camera.  The Raspberry Pi and camera module will be placed into this enclosure.  Refer to the pictures on this webpage, then use eBay to find a similar enclosure.  You can mount the RPi however it will fit, but if you have a 3D printer, there are adapters that make it all fit nicely inside the enclosure.  More on that below.

 

The software

  • MotionEyeOS.  This is free software that you install onto the Raspberry Pi.  It contains both the RPi operating system and the camera software. This link has versions for Raspberry Pi 2 and Raspberry Pi 3, so download the correct version for your particular RPi.



  • SD Formatter.  This erases the microSD memory card and prepares it for use.

  • Win32 Disk Imager. This saves the MotionEyeOS image file that you downloaded above onto the Raspberry Pi's memory card.

  • PuTTY.  Some of the installation steps below require that you access the Raspberry Pi's operating system.  Putty provides "shell" access to your RPi.

 

Installing MotionEyeOS

  1. Download the MotionEyeOS software using your home computer.  It downloads as a Zip file.

  2. Unzip the file into a folder on your home computer.  There will be a single file that ends in ".img".

  3. Download and install the SD Card Formatter program on your home computer.
    1. Insert the microSD memory card into your home computer (if it has a memory card slot) or into a USB card reader.
    2. Run the SD Formatter program.
    3. Make sure the Drive field is set to the drive letter of the memory card.  Important: If it's the wrong drive letter, you could erase a drive on your home computer instead!  Be very sure the drive letter of the memory card is shown.
    4. Click the [Option] button, then set "Format size adjustment" to "On".
    5. Click the [Format] button to erase the memory card.
    6. When the format is finished, close the SD Formatter program.



  4. Download and install the Win32 Disk Imager program on your home computer.
    1. Run the Win32 Disk Imager program.
    2. Near the Image File field, click the blue folder button, then locate the MotionEyeOS .img file that you downloaded and unzipped.
    3. Make sure the Device field is set to the drive letter of the memory card.  Important: If you choose the wrong drive letter, you could erase a drive on your home computer instead!  Be very sure the drive letter of the memory card is chosen.
    4. Click the [Write] button to save the .img file to the memory card.
    5. This process may take several minutes.  When it is finished, close the Win32 Disk Imager program.
    6. Remove the memory card from your home computer and insert it into the Raspberry Pi.

 

Turning on the camera for the first time

  1. Insert the memory card into the Raspberry Pi if you haven't already done so.

  2. Connect the camera module to the RPi.

  3. Connect an Ethernet cable to the RPi that is also attached to your Internet router.

  4. Connect the micro USB power adapter to your RPi, then plug the adapter into a wall outlet.

  5. Wait a few minutes for the RPi to power up.  You will see flashing lights on it.

  6. Your router will assign a random IP address to it via the router's DHCP service.  You will need to login to your router's interface to determine the IP address that it assigned to the RPi.

  7. Open a web browser on your home computer, then go to the IP address that was assigned to the RPi.

  8. You should see an video feed from the RPi's camera (note that the screenshot below is a night-time shot; you can't see my house nor lights, but you can at least see the camera's web interface).  

 

Configuring camera settings

The next step is optimizing the camera setting to work well with Internet control.

  1. Click the blue “Person” icon in the top-left corner of the window, then login with “admin” for the username and a blank password

  2. Click the triple “horizontal line” icon in the top-left corner of the window to open the Settings menu



  3. Set these settings:

    1. General Settings > Advanced Settings: On
      1. Admin password: (set this to whatever password that you like; make it somewhat complex!)
      2. Time Zone: (choose your timezone)

    2. Network > IP Configuration: Manual (Static IP)
      1. IP Address
        1. Enter the IP address that you want to use.  Do not set this to the DHCP address that was assigned by the router as this address could change from time to time.  
        2. The first three numbers must be the same as the other devices on your network.  The fourth number can be 2-254, provided that it does not conflict with other devices on your network.  In my case, I set the camera's IP address to 169.101.200.199
      2. Default Gateway
        1. The first three numbers must be the same as the other devices on your network.  The fourth number is a "1".  In my case, I set the camera's default gateway to 169.101.200.1

    3. Services > Enable FTP Server: Off
      1. Enable Samba Server: Off
      2. Enable SSH Server: On

    4. Expert Settings > Enable CSI Camera Led: Off
      1. This setting disables the red light that shines from the RPi camera module and is optional.

    5. Video Device > Camera Name: Christmas Cam (you can name your camera anything you want)
      1. Brightness: 75*
      2. Contrast: 92*
      3. Saturation: 75*

        * Note: If these settings do not appear, your camera may be setup as a MMAL type camera in the latest version of MotionEyeOS.  If you wish to adjust these settings and your camera is the standard RPi camera connected through the CSI port, do the following: Click the Trashcan icon at the top of the configuration page to remove the existing camera, then click the dropdown to reveal "add camera...", then choose "Local V4L2 Camera" for the camera type.  Save your settings, then reboot when prompted.

      4. Video Resolution: 640x480 (for 768Mbps Internet upload speed) or 1280x720 (for >768Mbps Internet speed, tested with 4.5Mbps)
        1. You can set the video resolution higher if you have a fast upload speed on your Internet connection.  640x480 works fine for a 768Kbps upload speed.  It affects the size and sharpness of the video.
      5. Frame Rate: 15 (also update “stream_limit” below if needed), 30 frame rate works better with 4.5Mbps upload speed.
        1. You can set the frame rate higher if you have a fast upload speed on your Internet connection.  It affects the smoothness of the video.
    6. Text Overlay: Off

    7. Make sure that the Text Overlay, Still Images, Movies, and Motion Detection sections are turned off.  Make sure the Video Streaming section is turned on.

    8. Video Streaming > Streaming Frame Rate: 15 (also update “stream_limit” below if needed) (you can set the frame rate higher if you have a fast upload speed on your Internet connection)
      1. Streaming Quality: 18%
        1. This can be increased if you have a fast upload speed (100% is good for 4.5Mbps speeds).  It affects the sharpness of the video.
      2. Streaming Port: 80

Mounting the RPi into the dummy camera enclosure

There are a number of inexpensive camera enclosures on eBay. These are "dummy security cameras" that fool people into thinking that a real camera is watching them.  These enclosures are perfect for mounting a Raspberry Pi into them.

  1. To start, purchase a camera enclosure like this one:


    I bought mine from eBay.  Try to find this exact type if you can; the following instructions are meant for mounting the Raspberry Pi into this type.

  2. Disassemble the enclosure.  There are four screws on the back cover to do this.  

  3. Remove the fake LEDs in the front of the enclosure.  To mount the Raspberry Pi's camera module into the enclosure, download and print these files with a 3D printer.  

  4. The front of the enclosure (where you mounted) and the main body of the enclosure need slightly extended from each other to support the full size of the RPi.  You can download and print this collar with a 3D printer to do this.



  5. To mount the Raspberry Pi into the enclosure, the top half of the main body contains a fake battery compartment.  I mounted the RPi to a small acrylic board, just wide enough to fit into the enclosure's body.  I the mounted the board to the top half of the main body, with screws from the acrylic board going into the fake battery compartment.  So the RPi is suspended upside down inside the camera enclosure.



  6. To provide power to the RPi, I cut-off the male end of a USB cable, then soldered the red and black wires (power and ground, respectively) to female jumpers. This webpage shows the pinouts for USB connectors.  

  7. I then plugged these jumpers into pin 2 (power) and pin 6 (ground) on the RPi.  



  8. I built a long, 100' extension cable with a male USB connector on one end and a female connector on the other end.  Plug one end of the extension cable into the short cable that you made above, and the other end into a 5.25V USB power adapter like this one.



  9. To provide Internet access to the Raspberry Pi, I ran a 100' Ethernet cable from the RPi to my home's Internet router.

  10. To allow the power cable and Ethernet cable to exit the enclosure, I cut a slot in the back cover of the enclosure, passed the cables through, then sealed the slot with electrical tape.

  11. My camera is affixed to a tree at the end of my yard, pointing to the house.  I buried 100' of 3/4 electrical conduit between the tree and house, then ran the camera's power and network cables through the conduit.



 

In order for people to view and control your lights, you need a webpage for them to visit.  You'll need the following:

1. A basic web hosting package that supports PHP.  Most basic hosting packages support this.  Don't choose a Microsoft/IIS hosting package as it may not support PHP.

NOTE: PHP v7.0 or higher is required.  As of this writing, the website code has been tested and works with PHP v7.4.22. 

2. A domain name for your website.

 

Once you have a website, download the control system here.  Unzip this file into a folder on your computer.

 

In this folder, edit the following files:

 

SEQUENCES.TXT

In this file, list all of the sequences that you are using.  Each line contains four parts, separated by commas. 

  1. The first part is an informal name of your sequences that website visitors will see.  For instance, if your sequence named silentNight.fseq, this first part can be called "Silent Night". 

    NOTE: Do not use commas in the informal name!   Spaces are OK, though.

  2. The second part is the filename of a small graphic/icon that represents your sequence.  This can be in JPG or PNG format.



  3. The third part is the exact name of your sequence, such as "silentNight.fseq".

    NOTE: Sequence names are case sensitive!  Type the sequence filename exactly as it is shown in Falcon Player.  Also, sequence name must not contain commas nor spaces.

  4. The fourth part is the media file that (optionally) accompanies the sequence, such as "silentNight.mp3" for an audio file.  Video media files (such as .mp4) are also permitted.

    NOTE: Media filenames are case sensitive!  Type the media filename exactly as it is shown in Falcon Player.  Also, media filename must not contain commas nor spaces.  

    NOTE: If your sequence does not use a media file, enter "none" for the media filename.


  5. The fifth part is the length of the sequence, in seconds.  You can get this information while viewing your sequence in xLights.

 

Here is an example of a sequence.txt file:

Silent Night,sequencePics/silentNight.png,silentNight.fseq,silentNight.mp3,30
Jingle Bells,sequencePics/jingleBells.png,jingleBells.fseq,jingleBells.mp3,20
Hark The Herald Angels Sing,sequencePics/harkHeraldAngelsSing.png,harkHeraldAngelsSing.fseq,harkHeraldAngelsSing.mp3,35
Santa Claus Is Comin To Town,sequencePics/santaClausIsCominToTown.png,santaClausIsCominToTown.fseq,santaClausIsCominToTown.mp3,25

 

Next, save the graphic/icon's JPG/PNG files from Step 2 to the sequencePics folder.

 

INDEX.PHP

In this file, you can change the title of the webpage from "Tom's Internet Controlled Christmas Lights" to something else.  This is at line 26.  You can edit other text that appears on the front page as well, using basic HTML programming skills.  If you are not sure how to do this, contact me and I'll help. 



NOTE: Be very careful when editing this file, as errors/typos can break the entire voting system!  In particular, do not modify anything within the "<? php" and "?>" sections nor within the "<iframe>" sections.

This file also defines the video feed address so that website visitors can see your lights via a webcam.  This is at line 156.  In my scenario, I have a network/IP camera that sends a video feed to www.twitch.tv, using a free account that I created there.  The Twitch video feed can be embedded right into your website control webpage, using a command like this:

src="https://player.twitch.tv/?channel=tominohio&parent=itwinkle.org"



This was explained in detail earlier in these instructions.

Note: Twitch requires that your Internet control website has SSL (HTTPS) enabled.

 

HIDDEN.PHP

In this file, you can choose when to disable Internet control of your lights.  By default, the lights are controllable from Thanksgiving Day to the second full week of January, from 6:00-11:30 p.m.  This can be changed to other dates/times by editing lines 78-122, though it requires knowledge of PHP programming.  If you are not sure how to do this, contact me and I'll help. 

NOTE: Be very careful when editing this file, as errors/typos can break the entire voting system!  In particular, do not modify anything within the "<? php" and "?>" sections.

 

PREPLAYACTIONS.PHP

If you are using sequences with music, most likely you are using MP3 files stored on Falcon Player for playback.  The website control system defaults to MP4 audio files, so you will need to change ".mp4" on line 189 to ".mp3" instead.


NOTE: Be very careful when editing this file, as errors/typos can break the entire voting system!  In particular, do not modify anything within the "<? php" and "?>" sections.

 

VOTEACTION.PHP

The Internet is full of "bots" which are computer programs that constantly scan websites, stealing email addresses and clicking links as if they are real people.  The voting system includes an "anti-bot" feature to prevent bots from creating fake votes.  The first time someone attempts to vote, he/she is challenged for a passphrase.  Once a correct passphrase is entered, they can vote the rest of the day without hassle. 

By default, the passphrase question is "To prove that you are human, please enter the first six letters of CHRISTMAS" and the answer is "Christ".  If you wish to change the question and answer, edit lines 11 & 12 in this file. 

NOTE: Be sure not to change the text outside the quotes, otherwise it can break the voting system!

 

Next, copy the entire folder's contents to your web host via FTP.  In my scenario, I created a folder named "control-lights" on my web host, then copied the contents of the zip file into this folder using FileZilla, a popular FTP program.



At this point, your Internet control webpage is almost ready to use!  To view the website, open a web browser then type your domain name / folder name to view it.  In my scenario, my domain name is www.itwinkle.org and I created a folder for the Internet control system called "control-lights", so I would enter "www.itwinkle.org/control-lights" to view my webpage.  We still need to modify Falcon Player to finish preparing Internet control, as the website and Falcon Player "talk" to each other.

If you are using xLights musical sequences, it is possible to allowing Internet viewers to watch and hear your show!  Viewers can select musical sequences that they want to hear from the webpage explained earlier in these instructions.  OBS Studio (a free program that streams video and audio to the Internet) and Twitch (a free video streaming provider that allows lots of people to view your video simultaneously) are the keys to making this work.  This is how it all works:
 

  1. The video feed from your network camera is piped into OBS Studio running on a computer or laptop.  In my setup, my network camera's video feed is accessible via a webpage link; this link is fed into OBS Studio as a video source.

  2. Your musical sequences and related MP3 files are stored on a Raspberry Pi running Falcon Player.

  3. Audio from the Raspberry Pi is piped into OBS Studio via a 3.5mm audio cable from the Raspberry Pi to the Audio In jack of your computer or laptop.

  4. OBS Studio combines the video & audio into a single feed, sending it to Twitch, an online streaming service.

  5. Internet viewers watch and hear your video feed on Twitch.

  6. As an added bonus, if you purchase a USB sound adapter with dual Audio Out / headphone jacks for your Raspberry Pi, you can send audio to your computer to OBS and audio to an FM transmitter simultaneously.  This way, cars on your road can watch and hear your show, and so can Internet viewers.

 

    

 

How to Build It

 

Building the hardware

First off, buy this USB sound board from Amazon or eBay.  It is natively supported by Raspberry Pi and Falcon Player:

 USB Sound Card Adapter BENGOO External Audio Adapter Stereo Sound Card Converter 3.5mm AUX Microphone Jack for Gaming Headset Earphone PS4 Laptop Desktop Windows Mac OS Linux, Plug Play

https://www.amazon.com/gp/product/B072BMG9TB

 

Also buy this FM transmitter and antenna:

PLL LCD Digital FM Radio Receiver Module 87-108MHZ Wireless Microphone Stereo

https://www.ebay.com/itm/PLL-LCD-Digital-FM-Radio-Receiver-Module-87-108MHZ-Wireless-Microphone-Stereo/272315809627

98cm 38.5" 7 Sections Telescopic Antenna Replacement for FM Radio TV CP

https://www.ebay.com/itm/98cm-38-5-7-Sections-Telescopic-Antenna-Replacement-for-FM-Radio-TV-CP/331919180223

 

Connect the USB audio adapter to your Raspberry Pi, then connect a 3.5mm audio cable from the headphone jack of the USB sound adapter to the Audio In jack of the FM transmitter.  Connect another audio cable from the second headphone jack on the USB sound adapter to the Audio In port of your computer. 

Be sure to power the FM transmitter with a 5V Micro USB power supply.  In order to attach the antenna, connect a wire to the nut at the bottom of the antenna, then solder the other end of the wire to the ANT hole on the FM transmitter's circuit board.

Note: If you would like to 3D print the frame and antenna stand as shown in the above pictures, download the STL file here.  The FM transmitter enclosure can be found here: https://www.thingiverse.com/thing:2247929

Also, buy/build a network IP camera using the instructions here.

 

Configuring the software

The goal is to combine the video feed from your network IP camera with the audio feed from Falcon Player on your Raspberry Pi.  OBS Studio is used to do this.  Then, you create an account on Twitch, a free streaming service.  OBS Studio is configured to send the combined video/audio feed to Twitch.  Finally, you update the index.php file on the voting system with the URL to your Twitch streaming account.  This way, your website will embed the video feed for visitors to see (and hear) your lights.



Creating a Twitch account

  1. Go to www.twitch.tv then create a free account.
  2. Login to Twitch using your account.
  3. In the Twitch top-right toolbar, click the icon for your account, then choose "Creator Dashboard" from the menu.
  4. On the Dashboard page, choose Settings > Channel from the left-side bar.
  5. On the Stream Key & Preferences page, you will see "Primary Stream key".  Click the Show link to reveal it.
  6. Copy & paste this key to your computer's clipboard (press [Ctrl-C] or click the [Copy] button on this page).  You will use this key when setting up OBS Studio below.  It's also a good idea to paste this key into a text file as a backup copy.

 

Add Twitch stream to the Internet control website

In order for Internet viewer to view your video feed, you need to include your twitch account in the index.php file on your website.  This is very easy to do!

  1. Edit index.php on your website with a text editor.
  2. On line 156, replace the text after "?channel=" with your Twitch channel name and "parent=" with the root URL to our Internet control website (do not include https://www).  In my case, my Twitch channel name is "tominohio" and my Internet control website root is "itwinkle.org", so line 156 on my website looks like:

    src="https://player.twitch.tv/?channel=tominohio&parent=itwinkle.org"

  3. Save the file, then upload the file to your Internet control website.

Note: Twitch requires that your Internet control website has SSL (HTTPS) enabled. 

 

Install and configure OBS Studio

  1. Download and install the free OBS Studio program here.



  2. Start OBS Studio.  If a window doesn't appear, click the related icon in your system tray (near the clock, if you are running Windows).

  3. We need to create a new "Scene" with two "Sources" in it.
    1. Click the [+] button under the Scenes section to create a new scene. 
    2. Enter name for the scene (I called mine "Christmas lights"), then click the [OK] button.



  4. Now create a "source" for the video feed.  OBS will read the video feed coming from your network IP camera, like this:
    1. Click the [+] button under the Sources section to create a new source.
    2. Choose "BrowserSource" from the menu that appears.
    3. In the Properties window that appears:
      1. For the "URL" field, enter the address of your network IP camera.  For example, the address for my camera is "http://169.101.200.199:8080".
      2. For the "Width" and "Height" fields, enter the resolution that your network IP camera is using.  My camera uses 1280x720.
      3. For the "FPS" field, enter the framerate that your network IP camera is using.  Mine is set to 20 frames per second.

        Note: If your resulting video feed is slow and choppy, your Internet provider bandwidth may be too slow.  Either ask your Internet provider for more bandwidth or lower the resolution and/or framerate on your network IP camera.

      4. Click the [OK] button to save your settings.



  5. Now create a  "source" for the audio feed coming from the Raspberry Pi into your computer.
    1. Click the [+] button under the Sources section to create a new source.
    2. Choose "Audio Input Capture" from the menu that appears.
    3. In the Create/Select Source window that appears, click the [OK] button.
    4. In the Properties window that appears:
      1. Choose "Default" in the "Device" field.  This should relate to your computer's "audio in" jack, which is usually blue in color. 

        Note: If audio is not being added to the video when watching the Twitch stream, try choosing a different device in the "Device" field.

      2. Click [OK] to save your settings.
    5. You will notice a Mixer section next to the Sources section.  This is where you can monitor the audio coming into your computer from the Raspberry Pi.  As sound comes in, an animated bar should pulsate to the music.  You can also increase/decrease the volume coming in.  If you click the "gear" icon in the Mixer section, you can edit the sound volume even more.

  6. Now configure OBS Studio to use your Twitch account
    1. Click the [Settings] button on the right-side of the screen.
    2. In the window that appears, click the "Stream" tab on the left sidebar.
      1. In the "Stream Type" field, choose "Streaming Services.
      2. In the "Service" field, choose "Twitch".
      3. In the "Server" field, choose "Auto (Recommended)".
      4. In the "Stream key" field, enter the key that Twitch provided when you created your account.



    3. Click the "Output" tab on the left sidebar.
      1. Place a checkmark in the "Rescale Output" field, then enter your network IP camera's resolution next to the checkbox.
      2. Choose "CBR" for the "Rate Control" field.
      3. Enter "1700" for the Bitrate field.

        Note: If your resulting video feed is slow and choppy, your Internet provider bandwidth may be too slow.  Either ask your Internet provider for more bandwidth or lower the bitrate here.



    4. Click the "Video" tab on the left sidebar.
      1. In the "Base (Canvas) Resolution" and "Output (Scaled) Resolution" fields, enter your network IP camera's resolution.
      2. In the "Integer FPS Value" field, enter your network IP camera's frame rate (in my case, it's "20").

        Note: If your resulting video feed is slow and choppy, your Internet provider bandwidth may be too slow.  Either ask your Internet provider for more bandwidth or lower the resolution and/or framerate on your network IP camera.

    5. Click the [OK] button to save these settings.




  7. Configure general settings in OBS Studio

    1. The following setting tells OBS Studio to start as an icon in your system tray.  This way you can keep using your computer for other tasks while OBS Studio is operating your video feed.
      1. Click the [Settings] button on the right-side of the screen.
      2. In the window that appears, click the "General" tab on the left sidebar.
      3. In the "System Tray" section, enable all three checkboxes.
      4. Click the [OK] button to save these settings.



    2. The following settings allow you to enable/disable video streaming with hotkeys on the keyboard.
      1. Click the [Settings] button on the right-side of the screen.
      2. In the window that appears, click the "Hotkeys" tab on the left sidebar.
      3. Click in the "Start Streaming" field, then press the hotkey that you wish to use to begin sending video/audio to Twitch.  I used Ctrl-F1.
      4. Click in the "Stop Streaming" field, then press the hotkey that you wish to use to begin sending video/audio to Twitch.  I used Ctrl-F2.
      5. Click the [OK] button to save these settings.

 

Configure your computer to automatically start OBS Studio

Your computer can start OBS Studio and begin streaming on a schedule, such as several times a day, daily, weekly, etc.  This is accomplished through the Windows Task Scheduler program that comes with Windows.

First, we need to know where OBS Studio was installed on your computer. 

  1. There should be a shortcut on your desktop to start it.  Right-click this shortcut, then click Properties from the menu that appears.

  2. Highlight the text in the Target field, then press [Ctrl-C] to copy it.  Click the [Cancel] button.



  3. Open Windows Task Manager and create a new task on a schedule.  These webpages have helpful information for doing this:

    https://www.thewindowsclub.com/how-to-schedule-batch-file-run-automatically-windows-7

    http://www.get-itsolutions.com/create-windows-task-scheduler-and-schedule-to-run-bat-file

    https://www.computerhope.com/issues/ch000785.htm

  4. During the instructions above, when you are prompted for a program to run on a schedule, press [Ctrl-V] to paste the text from Step 2 above.  At the end of the text, add this command: --startstreaming.  For instance, here would be the program for my computer:

    "D:\Program Files\obs-studio\binbit\obs64.exe" --startstreaming



  5. Save your task in Windows Task Scheduler, then close the program.

  6. To stop outputting video at a certain time each day, go to the Tools > Output Timer menu in OBS Studio.  Specify the number of hours and minutes to stop streaming in the "Stop streaming after" field.  For instance, if Windows Task Scheduler is starting OBS Studio at 7:00 each night and you want to stop the video stream at 10:00, enter three hours in this field.

  7. You're done!  OBS Studio should automatically start on a schedule; you will see an icon in your System Tray while it's running.

  8. Needless to say, your computer must be powered on in order for all of this to work.  If you don't want your computer running 24x7 over the holidays, your computer's BIOS may have an option to automatically turn itself on each day at a certain time.  Check your computer's manual for how to do this.

 

 

 

You can control your projector from a computer running Windows.  It can turn your projector on & off, change video sources, and do just about anything that your remote can do.  The projector is connected to your compute via a serial cable and commands are given through shell commands.  This can be done on a schedule, too, thanks to the Windows Task Scheduler feature built into Windows.

 

To control your projector with Windows, you will need these things

1. Projector with an RS232 serial port.  This port can have a DB9 serial port (most common) or a round DIN serial port.  A DB serial port has five pins in one row, and four pins in the second row.  Projectors with only USB ports are not able to be used for control.

2. "Straight through" serial cable, DB9 to DB9.  Typically this is a female to female cable.

3. Null modem adapter like this.  This may be needed for some projectors.  If your projector does not respond to commands, add this to the "straight through" serial cable above.

4. USB to serial adapter cable, such as this.  This cable adapts the USB port on the Windows computer to communicate to the DB9 serial port on the projector.

 

Finding hex control codes for your projector

Your projector listens for commands entering its serial port.  This allows you to turn the projector on, off, change video sources, etc., simply by sending commands to this port.  These commands are in the "hex" language, such as 00, AB, F1, B12, etc.

Different brands and models of projectors use different hex codes for these commands.  Your projector's manual should have an area that list these codes.  If you do not have the manual, search Google for "hex codes xxx projector" where "xxx" is the brand and model of your projector.  You can also find manuals for projectors by googling "xxx projector Clary Business Machines".  

Here is an example of hex control codes for a Boxlight Seattle WX25NU projector.  For example, hex command "43 30 30 0D" will turn on the projector and "43 30 31 0D" will turn it off.

This document should also indicate your projector's serial port communication settings (baud rate, data length, parity, stop bit, and flow control).  This information is important for your Windows computer to properly communicate with the projector's serial port, so write it down.

 

Connect your projector to your Windows computer

1. If your USB serial adapter came with a driver installation CD, install the driver.  It is important to do this before connecting the adapter to your computer!

2. Connect the USB serial adapter cable to the computer's USB port.

3. Connect the DB9 serial cable to the USB serial adapter cable.

4. Connect the other end of the DB9 serial cable to your projector.  

5. Make sure the projector has its power cable connected.  It does not need to be turned on yet, but it does need to be in "standby" mode.  Some projectors indicate standby with a flashing power light.

 

Finding the COM port of your USB serial adapter 

When you connect the USB serial adapter to your computer, Windows will assign a COM port to it.  This could be "COM1", but could vary depending on the existing ports on your computer.  To find the port of your adapter, do the following:

1. From the Windows Start menu (press the [Windows] key on your keyboard), type "Device Manager" then press [Enter].

2. A list of devices appears.  

3. Double-click the Ports section to open it.

4. In the list of ports, you should be able to identify your adapter by its name or brand.  In my case, my adapter displays as "Tripp Lite USB to Serial port (COM3)".  If your device shows-up as "Unknown" or something similar, try reinstalling the driver that came with your adapter.

5. In my case, my adapter is connected to COM3.

6. You're done!

 

Create hex files

You need to create special "hex files" that contain the hex commands to control your projector.  However, these files cannot be created with a word processor nor Windows Notepad.  They must be created with a Hex Editor program such as UltraEdit, Notepad++ (with the hex editor plugin), or similar.

1. Start your Hex Editor program.

2. Enter the hex codes that turn on your projector.  For example, for a Boxlight projector, these codes are 43 30 30 0D

3. Save the hex file with the name on.bin

4. Create additional hex files with other projector commands, such as codes 43 30 31 0D into file off.bin which will turn the projector off.

 

Controlling the projector

Now it's time to see if everything works!

1. Open a command prompt.

2. The first step is to set the port settings so that the projector can understand the commands coming to it.  Refer to the projector's serial port communication settings (baud rate, data length, parity, stop bit, and flow control) that your wrote-down in the earlier steps.

3. Enter this command: mode com3 baud=9600 parity=n data=8 stop=1    (change the COM port, baud, parity, data, and stop setting to match your projector)

4. Enter this command: copy /b on.bin com3

5. If all works well, your projector will turn on (wait a minute for the lamp to warm up).

 

If the projector is not responding...

1. Make sure the projector is connected to power.

2. Make sure the projector is in "standby" mode (not completely off).

3. The serial cable may need a "null modem adapter" added to it.  This adapter reverses pins 2 & 3 for the receive & transmission lines; some projectors need this.  Add the null modem adapter to the serial cable, then play the playlist again.

4. Your on.bin file was not created with a true hex editor.  Remember, you cannot use Windows Notepad nor a word processor to create this file.  Use UltraEdit or Notepad++ with the hex editor plugin installed to create this file.

 

Control the projector on a schedule

Your computer can turn on/off your projector on a schedule, such as several times a day, daily, weekly, etc.  This is accomplished through Windows Task Scheduler program that comes with Windows.

1. Create a batch file that turns on your projector:

a. Start Notepad, then enter these commands:

mode com3 baud=9600 parity=n data=8 stop=1

copy /b on.bin com3

b. Save the batch file with the name: projector-on.bat

2. To test the batch file, enter "projector-on.bat" at the shell prompt.  Your projector should turn on.

3. Configure Windows Task Scheduler so that it runs this script daily/weekly/etc.  These webpages have helpful instructions for using Windows Task Scheduler:

https://www.thewindowsclub.com/how-to-schedule-batch-file-run-automatically-windows-7

http://www.get-itsolutions.com/create-windows-task-scheduler-and-schedule-to-run-bat-file

https://www.computerhope.com/issues/ch000785.htm

4. That's it!

  •  Start 
  •  Prev 
  •  1  2  3  4  5 
  •  Next 
  •  End 
Page 1 of 5

Overview

Learn how to make computer controlled, affordable, and Internet capable Christmas lights.

Decorations

See what animated lights (a.k.a. "props") I have made for my Christmas display.

Build It

Step-by-step instructions how to build your own Christmas light display.

Media

Project photos, videos, and news coverage.

Support

FAQs, instructional videos, and community support.

Go to top
JSN Boot template designed by JoomlaShine.com