Hallo zusammen.
Ich hatte auf meinem Pi2 letztes Jahr mir ein Webinterface mit html und php geschrieben (Code unten!). Außerdem sind wiringPi und raspberry remote installiert um mittels eines kleinen 443Mhz Sendemoduls Funksteckdosen zu schalten (nach dieser Anleitung habe ich alles erstellt ----> http://www.raspberrypi-tutorials.de/projekte/funks…p-schalten.html). Das hat auch super funktioniert.
Es hat super funktioniert. Nun habe ich alles auf meinen Pi3 übertragen sowie wiringPi und raspberry-remote installiert und über Webinterface probiert und es funktionierte nicht. Wenn ich in die Shell das entsprechende Kommando zum Schalten eingebe funktioniert alles super, nur halt nicht über das Webinterface. Weiß jemand woran das liegen könnte?
<!DOCTYPE html>
<head>
<meta name="viewport" content="widht=device-widht"/>
<meta charset="UTF-8">
<title>Schaltzentrale</title>
</head>
<body bgcolor="#ffffff">
<font face="Arial" font color="red" font size="30 px">Schaltzentrale</font>
<table border bgcolor="red">
<tr bgcolor="a9a9a9">
<td>
<form method="get" action="Schaltzentrale.php">
<input type="submit" value="Musikanlage einschalten" name="Musikanlageein">
</form>
</td>
<td>
<form method="get" action="Schaltzentrale.php">
<input type="submit" value="Musikanlage ausschalten" name="Musikanlageaus">
</form>
</td>
</tr>
<tr bgcolor="9b9b9b">
<td>
<form method="get" action="Schaltzentrale.php">
<input type="submit" value="Schreibtisch einschalten" name="Schreibtischein">
</form>
</td>
<td>
<form method="get" action="Schaltzentrale.php">
<input type="submit" value="Schreibtisch ausschalten" name="Schreibtischaus">
</form>
</td>
</tr>
<tr bgcolor="7c7c7c">
<td>
<form method="get" action="Schaltzentrale.php">
<input type="submit" value="Steckdose einschalten" name="Steckdoseein">
</form>
</td>
<td>
<form method="get" action="Schaltzentrale.php">
<input type="submit" value="Steckdose ausschalten" name="Steckdoseaus">
</form>
</td>
</tr>
</table>
<?php
if(isset($_GET['Musikanlageein'])){
exec("sudo /home/pi/raspberry-remote/./send 11010 1 1 ");
}
if(isset($_GET['Musikanlageaus'])){
exec("sudo /home/pi/raspberry-remote/./send 11010 1 0");
}
if(isset($_GET['Schreibtischein'])){
exec("sudo /home/pi/raspberry-remote/./send 11010 2 1");
}
if(isset($_GET['Schreibtischaus'])){
exec("sudo /home/pi/raspberry-remote/./send 11010 2 0");
}
if(isset($_GET['Steckdoseein'])){
exec("sudo /home/pi/raspberry-remote/./send 11010 3 1");
}
if(isset($_GET['Steckdoseaus'])){
exec("sudo /home/pi/raspberry-remote/./send 11010 3 0");
}
?>
</body>
</html>
Display More
Danke im Vorraus und Gruß Oli