On a Raspberry Pi with Falcon Player installed

A number of Christmas lights enthusiasts animate digital LED lights with a free program called xLights.  Starting with a photo of your house, you draw strings of lights on it that correspond to the lights actually hung on your house.  Strings of lights are connected to "controllers" that speak the protocol or languages of different kinds of strings.  When you create animations in xLights on your computer, these animations are sent via Ethernet to the controllers which then light-up your lights.  

Falcon Player is a program that allows your house lights to function without needing your computer to do the job.  You create animations with xLights, save them as "fseq" files, then load these files into Falcon Player.  The Player plays the fseq files to animate your lights.

Falcon Player can do a lot more than just animate lights.  It can control a projector, sending videos to it while animating lights at the same time.  Videos are saved in MP4 format and stored in Falcon Player.  Player can also create a "virtual matrix" with your projector, allowing animations to be created in xLights that will display on the projector.  Player can turn your projector on & off, change video sources, and do just about anything that your remote can do.  This can be done on a schedule, too.  So you can use Falcon Player to simply control your projector to play videos or coordinate this with animating lights, too.

 

 To control your projector with Falcon Player, 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 Raspberry Pi to communicate to the DB9 serial port on the projector.

5. Raspberry Pi 3 single board computer.  Don't use a Raspberry Pi 1 or 2 as they may not be fast enough to play MP4 video and control lights at the same time.

6. 5V power adapter with micro USB connector, rated at 2.5A or higher.  This is to power the Raspberry Pi 3.

7. Eight gigabyte microsSD card.  Falcon Player will consume four gigabytes, leaving you with four gigabytes for your videos.  Buy a larger memory card if you intend to use more videos.

8. Long Ethernet cable to connect the Rapsberry Pi to your home network.

  

Basic Steps to Install Falcon Player

(detailed instructions can be found here and here)

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

2. Download the latest Falcon Player image file here.  These instructions work best with Falcon Player v4.6.1.  Falcon Player v5.x should work, but it has not been tested with these instructions and the web interface may not match these instructions perfectly.

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.

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.

 

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 Falcon Player to properly communicate with the projector's serial port, so write it down.

 

Connect your projector to the Raspberry Pi

1. Connect the USB serial adapter cable to the Raspberry Pi's USB port.

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

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

4. 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.

 

Installing projector control feature to Falcon Player

1. From the Falcon Player web interface, choose Content Setup > Plugins from the menu.

2. In the list of plugins provided, find "Projector Control" then click the button for installing (the "down arrow" icon).

3. The Input/Output Control menu should now have an entry called "Projector Control".  Choose this from the Input/Output Control menu.

4. Place a checkmark in the Enable Plugin field.

5. Choose "Serial" for "Connection type".

6. Choose your projector in the Projector field.  If it is not listed, you can manually add your own projector with these steps:

a. Click Help > SSH Shell from the menu.

b. Login with "fpp" for the username and "falcon" for the password.

c. At the shell prompt, type: sudo nano media/plugins/FPP-Plugin-Projector-Control/projectorCommands.inc

d. When you press [Enter], a list of information appears.  

e. Find the line "To add another projector..." line near the top. 

f. Remove the double slashes at the beginning of each line starting with "Array" and ending with "),".  

g. Enter your projector's hex codes for "ON", "OFF", and "VIDEO".  Each hex code precedes with "\x", so hex codes "43 30 30 0D" to turn on a Boxlight projector would be entered as "\x43\x30\x30\x0D".  "VIDEO" means the hex codes for the projector video input that want to use, such as HDMI or DVI.

h. Enter your projector's baud rate, data length / char bits, stop bit, and parity as specified.

i. To save your changes, press [Ctrl-O] then [Enter].  To exit the editor, press [Ctrl-X].  

j. To exit the shell, type "exit" then press [Enter].

k. Reboot Falcon Player.

m. After rebooting, choose Input/Output Control > Projector Control from the menu.

n. Choose your projector from the list in the Projector field.

7. Click [Save Config] to save your changes.

 

Upload video(s) into Falcon Player

Falcon Player can store and play videos for your projector to display.  These videos must be in MP4 format and the microSD card must have enough room for them.  You can check free space by clicking Help > About from the menu; free space is listed under the Disk Utilization section.

1. Click Content Setup > File Manager from the menu.

2. Click the [Video] tab, then click the blue [Select Files] button.

3. Browse your computer for the MP4 files that you wish to upload, then click the [Open] button.

4. That's it!

 

Create playlist to control your projector and play videos

1. Click Content Setup > Playlists from the top menu.

2. Give your playlist a name (no spaces) in the New Playlist field, then click the [Add] button.

3. In the Type field in the lower Playlist Details section, choose "Script".  In the Script field right below it, choose "PROJECTOR-ON.sh".  Then click the [Add] button below it.  This will tell the projector to turn on.

4. Let's add a delay to allow the projector to warm up.  In the Type field, choose "Pause".  In the Pause Time field, enter "60", then click the [Add] button.

5. To switch the projector video input to the desired input, in the Type field, choose "Script".  In the Script, choose "PROJECTOR-VIDEO.sh", then click the [Add] button.

6. To play a video, choose "Media only" in the Type field.  Click the drop-down arrow in the Media field to choose the video that you use to use, then click the [Add] button.

7. To turn off the projector after playing the video, choose "Script" in the Type field, choose "PROJECTOR-OFF.sh" in the Script field, then click the [Add] button.

8. To save the playlist, click the [Save] button in the middle of the screen.

 

Controlling the projector and playing a video

Now it's time to see if everything works!

1. Click Status/Control > Status Page from the menu.

2. Choose the playlist that you created in the Playlist field.

3. Click the [Play] button near the bottom of the screen.

4. If all works well, your projector will turn on, wait a minute for the lamp to warm up, play your video, then the projector will turn off.

 

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. If the projector is still not responding, try manually controlling the projector using Linux or Windows.  Instructions are on this website.

5. To aid in troubleshooting, you could also create a playlist that only plays the video (no projector on/off control).  Manually turn on the projector, then play the playlist that you created.  If this works, at least you know that the video output from the Raspberry Pi to the projector is working.

 

Control the projector and video playback on a schedule

Falcon Player can turn on/off your projector and play videos on a schedule, such as several times a day, daily, weekly, etc.  This is accomplished through the Content Setup > Scheduler menu.  For instance, if you want the projector to turn on each evening at 6:00, play a video at 7:00, then turn off the projector at 8:00, do the following:

1. Set the current day & Time on the Raspberry Pi via the Status/Control > Config/Set Time menu, then click the [Submit] button.

2. Create three playlists: one to turn on the projector, another to play a video, and a third to turn off the projector.  

3. Click Content Setup > Scheduler from the menu, then click the [Add] button.

4. In the Playlist column, choose the "projector on" playlist that you created.  In the Start Time column, choose 18:00 (which is 6:00 p.m. in military time).

5. Click the [Add] button to create another scheduled entry.  Choose the "play video" playlist that you created, then choose "19:00" for the Start Time.

6. Click the [Add] button once more to create the third scheduled entry.  Choose the "projector off" playlist that you created, then choose "20:00" for the Start Time.

7. That's it!

Note that the Raspberry Pi does not have a built-in clock.  When it is turned off, it forgets the current time.  You can easily add a real-time clock with something like this.

Last modified on Wednesday, 25 August 2021 03:08

More in this category:

Go to top
JSN Boot template designed by JoomlaShine.com