Hallo,
ich möchte einen 433 MHZ Sender über eine Webseite ansteuern (Die webseite ist auf dem Webserver(Apache2) vom PI).
Aber mein Skript funktioniert nicht. Diese tools Benutze ich zum ansteuern des Senders https://github.com/ninjablocks/433Utils.git
Hier mein Fehlerhaftes Skript ich hoffe jemand findet denn fehler wäre sehr dankbar
PHP
<!DOCTYPE html>
<html>
<head>
<style>
body {background-color:#0d0d0d;
color: white;
}
knopf {
position: absolute;
top: 10%;
left: 3%;
}
.button {
background-color: #666666;
border: 1px solid black;
color: white;
padding: 12px 16px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
cursor: pointer;
-webkit-transition-duration: 0.4s;
transition-duration: 0.4s;
}
.button1 {
background-color: #666666;
border: 1px solid black;
color: white;
padding: 12px 16px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
cursor: pointer;
-webkit-transition-duration: 0.4s;
transition-duration: 0.4s;
}
.button:hover {
background-color: #999999;
}
.sidenav {
height: 100%;
width: 0;
position: fixed;
z-index: 1;
top: 0;
opacity: 0.90;
left: 0;
background-color:#333333;
overflow-x: hidden;
transition: 0.5s;
padding-top: 60px;
}
.sidenav a {
padding: 8px 8px 8px 32px;
text-decoration: none;
font-size: 25px;
color: white;
display: block;
transition: 0.3s
}
.sidenav a:hover, .offcanvas a:focus{
color: #f1f1f1;
}
.closebtn {
position: absolute;
top: 0;
right: 25px;
font-size: 36px !important;
margin-left: 50px;
}
@media screen and (max-height: 450px) {
.sidenav {padding-top: 15px;}
.sidenav a {font-size: 18px;}
}
</style>
</head>
<body>
<span style="text-decoration: underline;font-size:32px;position: absolute;top: 1%;left: 45%;" onclick="openNav()">433 MHZ Senden</span>
<span style="font-size:32px;cursor:pointer" onclick="openNav()">☰</span>
</knopf>
<div id="mySidenav" class="sidenav">
<a href="javascript:void(0)" class="closebtn" onclick="closeNav()">×</a>
<a href="Pi.php">GPIO</a>
<a href="Abfolgen.php">>Abfolgen</a>
<a href="Sonstiges.php">Sonstiges</a>
</div>
<form action="433.php" method="post">
<p>Code: <input type="text" name="Code" maxlength="8"/></p>
<p><input type="submit" name="Code" value="Code Senden"/></p>
Gesendeter Code: <?php echo $_POST['Code'];
?>
<?php
if(isset($_GET['Code'])){
$val = trim(@shell_exec("home/pi/433Utils/RPi_utils/sudo ./codesend $_POST['Code']"));
}
?>
</form>
<script>
function openNav() {
document.getElementById("mySidenav").style.width = "250px";
}
function closeNav() {
document.getElementById("mySidenav").style.width = "0";
}
</script>
</body>
</html>
Alles anzeigen