Remote FPP Control

This is a guide on how to control your local FPP from your website.

The first step is to log in to your router. The method of logging into your router will vary based on the brand of router you have. I have a Netgear router, so the screenshots below will reflect that. If you're having problems logging into your router, here's a link to a Router Login Guide where you can find your router brand and corresponding credentials.

Once logged into your router, you will land on the home screen. Again, your router interface will vary by brand.
-- Note there are certain parts of the images below that are hidden for security purposes.

Typically, the Port Forwarding options are found under Advance settings. For my router, I clicked the Advanced tab then Advanced Setup. Under Advanced Setup, there is the option to add Port Forwarding/Port Triggers.

If you have never added a port forward or trigger, then your list will be blank. There should be a button that allows you to add a new port setup.

The following screen has several different options to fill out. Here is a description of each one:

Service Name: Yours may not be this exact title, but it's just the name you give to this port foward setup.
Service Type: Without getting into too much technical details, this is simply the portocal to be used when sending data.
External Starting Port: This is the port that FPP will be called from. More on this in a second.
External Ending Port: This allows you to set a port range. For most purposes it suffices to keep the start and end ports the same.
Internal Starting Port: This is the port on your computer you are wanting to make available.
Internal Ending Port: Allows an internal port range to be set.
Internal IP Address: This is the IP address you want the external traffic to be routed to, i.e., the IP address of your FPP.
External IP Address: This is where you can limit what IP addresses are allowed to be forwared to your computer.

This is how the form looks after it has been filled out. Here is a breakdown of what is happening:
Using both TCP and UDP protocols, any website or computer that calls my computer's IP Address with port 9999, will get redirected to the internal IP address and port of 192.168.0.15:80, which is my local FPP IP address (FPP does not use a specific port, so it defaults to 80). In this example I am allowing any IP address with port 9999 to forward to FPP.

Time to test! To find your computer's IP address, you can go to What Is My IP and it will provide you your IPv4 address. Enter your IP Address plus port (eg. 12.345.678.910:9999) in your browser and you should see your local FPP!

The next step is to set up a script on FPP that you want to be able to fire off from your website. From FPP, click on Content Setup and select Script Repository Browser.

Find the StartPlaylist.sh script and click install.

After the script is installed, go back to Content Setup and click File Manager and open the Scripts tab.

You should now see the StartPlaylist.sh script. Select the script and click Edit.

In the script editor window, replace PLAYLISTNAME with your playlist and click Save.

The last step is to add the script to your website. I personally used HTML, JQuery (Javascript), and PHP, but you're welcome to use whatever is easiest for you. I will still provide some basic code so at the very least you can spin up a working example.

HTML code example with Javascript:

<!DOCTYPE html>
<html>
<body>

<button onclick="runScript()">Run Script</button>

<script>
function runScript() {
$.post('runScript.php', function() { //This should point to your PHP script
alert("Script is Running!");
});
}
</script>

</body>
</html>

PHP Code:

<?php

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://{YOUR_IP_AND_PORT}/runEventScript.php?scriptName=StartPlaylist.sh");
//{YOUR_IP_AND_PORT} should be changed to whatever your computer's IP address is and the port you set up for forwarding
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_exec($ch);
curl_close($ch);

?>

If you have any quesions or issues, you can contact us via socal media or by using the contact form below!

Contact Us

Have a question? Drop us a line!

Send Us A Message

Sending...
Something went wrong. Please try again.
Your message was sent, thank you!