Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Python wording #11

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion commonFunctions.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function updatePluginFromGitHub($gitURL, $branch="master", $pluginName) {
exec($pluginUpdateCMD, $updateResult);

//logEntry("update result: ".print_r($updateResult));

//
//loop through result
return;// ($updateResult);

Expand Down
15 changes: 15 additions & 0 deletions fpp_uninstall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/php
<?php
$eventDirectory = "/home/fpp/media/events";


$dir = new DirectoryIterator ($eventDirectory); //iterate through event files
foreach ($dir as $fileinfo) {
$fileName = $eventDirectory . "/" . $fileinfo -> getfilename();
$fileContents = file_get_contents($fileName);
if (strpos($fileContents, "PROJECTOR-") !== false) {
unlink($fileName);
}
}

?>
39 changes: 32 additions & 7 deletions functions.inc.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,27 @@
<?php
function sendTCP($IP, $PORT, $cmd) {



if($PORT == "23") {

logEntry("We have a TELNET port");


$fp=pfsockopen($IP,23);

logEntry("Telnet session opening ...");

sleep(4);

//fputs($fp,$header1);
$cmd .= "\r";
fputs($fp,$cmd);
//fputs($fp,"(LMP?)\r");
sleep(2);
fclose($fp);
return;
}

/* Create a TCP/IP socket. */
$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
if ($socket === false) {
Expand Down Expand Up @@ -139,12 +159,17 @@ function createProjectorEventFiles() {
$MAJOR=substr($nextEventFilename,0,2);
$MINOR=substr($nextEventFilename,3,2);
$eventData ="";
$eventData = "majorID=".(int)$MAJOR."\n";
$eventData .= "minorID=".(int)$MINOR."\n";
$eventData .= "name='PROJECTOR-".$key."'\n";
$eventData .= "effect=''\n";
$eventData .= "startChannel=\n";
$eventData .= "script='PROJECTOR-".$key.".sh'\n";
$eventData ="{\n";
$eventData .= "\t\"command\": \"Run Script\",\n";
$eventData .= "\t\"args\": [\n";
$eventData .= "\t\t\"PROJECTOR-".$key.".sh\",\n";
$eventData .= "\t\t\"\",\n";
$eventData .= "\t\t\"\"\n";
$eventData .= "\t],\n";
$eventData .= "\t\"name\": \"PROJECTOR-".$key."\",\n";
$eventData .= "\t\"majorId\": ".(int)$MAJOR.",\n";
$eventData .= "\t\"minorId\": ".(int)$MINOR."\n";
$eventData .= "}";

// echo "eventData: ".$eventData."<br/>\n";
file_put_contents($eventDirectory."/".$nextEventFilename, $eventData);
Expand Down
26 changes: 18 additions & 8 deletions help/plugin_setup.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
<b>Projector Control help</b>



<p>
Welcome to the Projector Control plugin

</p>
<table border="1">
<tr>
<td>
Expand All @@ -17,10 +14,9 @@
Cable
</td>
<td>
Link to Manual (if available>
Notes
</td>
</tr>

<tr>
<td>
Hitatchi
Expand All @@ -31,7 +27,21 @@
<td>
USB / Serial
</td>
<td>
</td>
</tr>
<tr>
<td>
Epson
</td>
<td>
Powerlite 410w
</td>
<td>
Cat5
</td>
<td>
In the menu under extended, Standby mode needs to be "network on"
</td>
</tr>

</table>

26 changes: 26 additions & 0 deletions pluginInfo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"repoName": "FPP-Plugin-Projector-Control",
"name": "Projector Control",
"author": "Ben Shaver (bshaver) and Pat Delaney (patdelaney)",
"description": "Basic projector control for FPP",
"homeURL": "https://github.com/FalconChristmas/FPP-Plugin-Projector-Control",
"srcURL": "https://github.com/FalconChristmas/FPP-Plugin-Projector-Control.git",
"bugURL": "https://github.com/FalconChristmas/FPP-Plugin-Projector-Control/issues",
"allowUpdates": 1,
"versions": [
{
"minFPPVersion": "2.0",
"maxFPPVersion": "0",
"branch": "master",
"sha": "",
"dependencies": {
"plugins": [
],
"packages": [
],
"scripts": [
]
}
}
]
}
9 changes: 6 additions & 3 deletions plugin_setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

$myPid = getmypid();

$gitURL = "https://github.com/LightsOnHudson/FPP-Plugin-Projector-Control.git";
$gitURL = "https://github.com/FalconChristmas/FPP-Plugin-Projector-Control.git";

//arg0 is the program
//arg1 is the first argument in the registration this will be --list
Expand Down Expand Up @@ -125,7 +125,10 @@

<p>Configuration:
<ul>
<li>Configure your connection type, IP/PJLINK, Serial</li>
<li>Configure your connection type, IP/PJLINK or Serial</li>
<li>If using <b>PJLINK</b>, you will also need to install the <b>PJLINK</b> library.</li>
<li>SSH into the Pi that is running the plugin, and type the following command: <b>sudo cpan Net::PJLink</b></li>
This should download the library and then the plugin should work.
</ul>

<form method="post" action="http://<? echo $_SERVER['SERVER_ADDR'].":".$_SERVER['SERVER_PORT']?>/plugin.php?plugin=<?php echo $pluginName;?>&page=plugin_setup.php">
Expand Down Expand Up @@ -240,7 +243,7 @@
</form>


<p>To report a bug, please file it against the Projector Control plug-in project on Git: https://github.com/LightsOnHudson/FPP-Plugin-Projector-Control
<p>To report a bug, please file it against the Projector Control plug-in project on Git: https://github.com/FalconChristmas/FPP-Plugin-Projector-Control

<form method="post" action="http://<? echo $_SERVER['SERVER_ADDR'].":".$_SERVER['SERVER_PORT']?>/plugin.php?plugin=<?php echo $pluginName;?>&page=plugin_setup.php">
<?
Expand Down
4 changes: 3 additions & 1 deletion proj.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
include_once '/opt/fpp/www/config.php';
include_once '/opt/fpp/www/common.php';

$pluginName = "ProjectorControl";
//$pluginName = "ProjectorControl";
$pluginName = basename(dirname(__FILE__)); //pjd 8-10-2019 added per dkulp


include_once 'functions.inc.php';
include_once 'commonFunctions.inc.php';
Expand Down
Loading