Skip to content

A live bird collage card for your Home Assistant dashboard.

best version so far

mcguirepr89744ccc49a25e
diff --git a/scripts/advanced.php b/scripts/advanced.php
index 852d211b..96c9d7f2 100644
--- a/scripts/advanced.php
+++ b/scripts/advanced.php
@@ -152,7 +152,6 @@ if(isset($_POST['submit'])) {
}
}
?>
-
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
</style>
@@ -232,15 +231,16 @@ foreach($formats as $format){
<input name="sensitivity" type="number" min="0.5" max="1.5" step="0.01" value="<?php print($newconfig['SENSITIVITY']);?>" required/><br>
<p>Min=0.5, Max=1.5</p>
<br><br>
+ <input type="hidden" name="view" value="Advanced">
<button type="submit" name="submit" value="advanced">
<?php
-if(isset($_SESSION['success'])){
+if(isset($_POST['submit'])){
echo "Success!";
- unset($_SESSION['success']);
} else {
echo "Update Settings";
}
-?> </button>
+?>
+ </button>
<br>
</form>
<form action="" method="POST">
diff --git a/scripts/filemanager/filemanager.php b/scripts/filemanager/filemanager.php
index 79e9df1d..1db4bb8c 100644
--- a/scripts/filemanager/filemanager.php
+++ b/scripts/filemanager/filemanager.php
@@ -3344,7 +3344,7 @@ function fm_show_nav_path($path)
<nav class="navbar navbar-expand-lg <?php echo $getTheme; ?> mb-4 main-nav <?php echo $isStickyNavBar ?>">
<a class="navbar-brand" href="../../">BirdNET-Pi Homepage </a>
<a class="navbar-brand" href="../"><?php echo lng('Tools'); ?></a>
- <a class="navbar-brand" href="http://birdnetpi.local:8080" target="_"><?php echo lng('WebTerminal'); ?></a>
+ <a class="navbar-brand" href="http://birdnetpi.local:8888" target="_"><?php echo lng('WebTerminal'); ?></a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
diff --git a/scripts/index.html b/scripts/index.html
index 5686399b..cfafa779 100644
--- a/scripts/index.html
+++ b/scripts/index.html
@@ -73,7 +73,11 @@ a {
</form>
</div>
<div class="column second">
+<<<<<<< Updated upstream
<form action="http://birdnetpi.local:8080" target="top">
+=======
+ <form action="http://192.168.0.100:8888" target="top">
+>>>>>>> Stashed changes
<button type="submit" class="block">Web Terminal</button>
</form>
<form action="/scripts/service_controls.php">
diff --git a/scripts/server.py b/scripts/server.py
index 5ca50647..b3cab1af 100755
--- a/scripts/server.py
+++ b/scripts/server.py
@@ -349,7 +349,7 @@ def handle_client(conn, addr):
Week = str(args.week)
Sens = str(args.sensitivity)
Overlap = str(args.overlap)
- Com_Name = Com_Name.replate("'", "")
+ Com_Name = Com_Name.replace("'", "")
File_Name = Com_Name.replace(" ", "_") + '-' + Confidence + '-' + \
Date.replace("/", "-") + '-birdnet-' + Time + audiofmt
diff --git a/scripts/write_config.php b/scripts/write_config.php
deleted file mode 100644
index c5091831..00000000
--- a/scripts/write_config.php
+++ /dev/null
@@ -1,38 +0,0 @@
-<?php
-error_reporting(E_ALL);
-ini_set('display_errors',1);
-
-if(isset($_POST["latitude"])){
-$latitude = $_POST["latitude"];
-$longitude = $_POST["longitude"];
-$birdweather_id = $_POST["birdweather_id"];
-$pushed_app_key = $_POST["pushed_app_key"];
-$pushed_app_secret = $_POST["pushed_app_secret"];
-
-$contents = file_get_contents("/home/pi/BirdNET-Pi/birdnet.conf");
-$contents = preg_replace("/LATITUDE=.*/", "LATITUDE=$latitude", $contents);
-$contents = preg_replace("/LONGITUDE=.*/", "LONGITUDE=$longitude", $contents);
-$contents = preg_replace("/BIRDWEATHER_ID=.*/", "BIRDWEATHER_ID=$birdweather_id", $contents);
-$contents = preg_replace("/PUSHED_APP_KEY=.*/", "PUSHED_APP_KEY=$pushed_app_key", $contents);
-$contents = preg_replace("/PUSHED_APP_SECRET=.*/", "PUSHED_APP_SECRET=$pushed_app_secret", $contents);
-
-$contents2 = file_get_contents("/home/pi/BirdNET-Pi/thisrun.txt");
-$contents2 = preg_replace("/LATITUDE=.*/", "LATITUDE=$latitude", $contents2);
-$contents2 = preg_replace("/LONGITUDE=.*/", "LONGITUDE=$longitude", $contents2);
-$contents2 = preg_replace("/BIRDWEATHER_ID=.*/", "BIRDWEATHER_ID=$birdweather_id", $contents2);
-$contents2 = preg_replace("/PUSHED_APP_KEY=.*/", "PUSHED_APP_KEY=$pushed_app_key", $contents2);
-$contents2 = preg_replace("/PUSHED_APP_SECRET=.*/", "PUSHED_APP_SECRET=$pushed_app_secret", $contents2);
-
-$fh = fopen("/home/pi/BirdNET-Pi/birdnet.conf", "w");
-$fh2 = fopen("/home/pi/BirdNET-Pi/thisrun.txt", "w");
-fwrite($fh, $contents);
-fwrite($fh2, $contents2);
-
-$language = $_POST["language"];
-if ($language != "none"){
- $command = "sudo -upi mv /home/pi/BirdNET-Pi/model/labels.txt /home/pi/BirdNET-Pi/model/labels.txt.old && sudo -upi unzip /home/pi/BirdNET-Pi/model/labels_l18n.zip $language -d /home/pi/BirdNET-Pi/model && sudo -upi mv /home/pi/BirdNET-Pi/model/$language /home/pi/BirdNET-Pi/model/labels.txt";
- $command_output = `$command`;
-}
-}
-?>
-