A live bird collage card for your Home Assistant dashboard.
add DATA_MODEL_VERSION to config.php
frederik299c4cee2804
diff --git a/scripts/config.php b/scripts/config.phpindex 08c3af76..d1c73f31 100644--- a/scripts/config.php+++ b/scripts/config.php@@ -83,6 +83,11 @@ if(isset($_GET["latitude"])){$timezone = $_GET["timezone"];$model = $_GET["model"];$sf_thresh = $_GET["sf_thresh"];+ if(isset($_GET['data_model_version'])) {+ $data_model_version = 2;+ } else {+ $data_model_version = 1;+ }$only_notify_species_names = $_GET['only_notify_species_names'];$only_notify_species_names_2 = $_GET['only_notify_species_names_2'];@@ -179,6 +184,7 @@ if(isset($_GET["latitude"])){$contents = preg_replace("/APPRISE_MINIMUM_SECONDS_BETWEEN_NOTIFICATIONS_PER_SPECIES=.*/", "APPRISE_MINIMUM_SECONDS_BETWEEN_NOTIFICATIONS_PER_SPECIES=$minimum_time_limit", $contents);$contents = preg_replace("/MODEL=.*/", "MODEL=$model", $contents);$contents = preg_replace("/SF_THRESH=.*/", "SF_THRESH=$sf_thresh", $contents);+ $contents = preg_replace("/DATA_MODEL_VERSION=.*/", "DATA_MODEL_VERSION=$data_model_version", $contents);$contents = preg_replace("/APPRISE_ONLY_NOTIFY_SPECIES_NAMES=.*/", "APPRISE_ONLY_NOTIFY_SPECIES_NAMES=\"$only_notify_species_names\"", $contents);$contents = preg_replace("/APPRISE_ONLY_NOTIFY_SPECIES_NAMES_2=.*/", "APPRISE_ONLY_NOTIFY_SPECIES_NAMES_2=\"$only_notify_species_names_2\"", $contents);@@ -199,6 +205,7 @@ if(isset($_GET["latitude"])){$contents2 = preg_replace("/APPRISE_MINIMUM_SECONDS_BETWEEN_NOTIFICATIONS_PER_SPECIES=.*/", "APPRISE_MINIMUM_SECONDS_BETWEEN_NOTIFICATIONS_PER_SPECIES=$minimum_time_limit", $contents2);$contents2 = preg_replace("/MODEL=.*/", "MODEL=$model", $contents2);$contents2 = preg_replace("/SF_THRESH=.*/", "SF_THRESH=$sf_thresh", $contents2);+ $contents2 = preg_replace("/DATA_MODEL_VERSION=.*/", "DATA_MODEL_VERSION=$data_model_version", $contents2);$contents2 = preg_replace("/APPRISE_ONLY_NOTIFY_SPECIES_NAMES=.*/", "APPRISE_ONLY_NOTIFY_SPECIES_NAMES=\"$only_notify_species_names\"", $contents2);$contents2 = preg_replace("/APPRISE_ONLY_NOTIFY_SPECIES_NAMES_2=.*/", "APPRISE_ONLY_NOTIFY_SPECIES_NAMES_2=\"$only_notify_species_names_2\"", $contents2);@@ -383,6 +390,8 @@ function sendTestNotification(e) {</select><br><span <?php if($config['MODEL'] == "BirdNET_6K_GLOBAL_MODEL") { ?>style="display: none"<?php } ?> id="soft">+ <input type="checkbox" name="data_model_version" <?php if($config['DATA_MODEL_VERSION'] == 2) { echo "checked"; };?> >+ <label for="data_model_version">Species range model V2.4 - V2</label> [ <a target="_blank" href="https://github.com/kahst/BirdNET-Analyzer/discussions/234">Info here</a> ]<br><label for="sf_thresh">Species Occurence Frequency Threshold [0.0005, 0.99]: </label><input name="sf_thresh" type="number" max="0.99" min="0.0005" step="any" value="<?php print($config['SF_THRESH']);?>"/> <span onclick="document.getElementById('sfhelp').style.display='unset'" style="text-decoration:underline;cursor:pointer">[more info]</span><br><p id="sfhelp" style='display:none'>This value is used by the model to constrain the list of possible species that it will try to detect, given the minimum occurence frequency. A 0.03 threshold means that for a species to be included in this list, it needs to, on average, be seen on at least 3% of historically submitted eBird checklists for your given lat/lon/current week of year. So, the lower the threshold, the rarer the species it will include.<br><img style='width:75%;padding-top:5px;padding-bottom:5px' alt="BirdNET-Pi new model detection flowchart" title="BirdNET-Pi new model detection flowchart" src="https://i.imgur.com/8YEAuSA.jpeg">