Merge branch 'main' into ui-tweaks
This commit is contained in:
@@ -713,7 +713,7 @@ consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
||||
=============================================================================
|
||||
Caddy, ,Streamlit, and Adminer use the Apache License Version 2.0
|
||||
Caddy, WiFi-Connect,Streamlit, and Adminer use the Apache License Version 2.0
|
||||
=============================================================================
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
@@ -918,7 +918,7 @@ Caddy, ,Streamlit, and Adminer use the Apache License Version 2.0
|
||||
limitations under the License.
|
||||
|
||||
=============================================================================
|
||||
GoTTY and autoAP scripts use the MIT License
|
||||
GoTTY and Apprise Notifications use the MIT License
|
||||
=============================================================================
|
||||
MIT License
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ Check out birds from around the world
|
||||
- [Private Nature Garden, Grevenbroich, Germany](http://grevenbroich-elsen.birdnetpi.com)<br>
|
||||
- [Norman, Oklahoma, United States](https://normanok.birdnetpi.com)<br>
|
||||
- [Nijmegen, the Netherlands](https://nijmegen.birdnetpi.com)<br>
|
||||
- [Murrysville, Pennsylvania, United States](https://murrysvillepa.birdnetpi.com/)
|
||||
|
||||
[Share your installation!!](https://github.com/mcguirepr89/BirdNET-Pi/wiki/Sharing-Your-BirdNET-Pi)
|
||||
|
||||
@@ -53,7 +54,7 @@ Currently listening in these countries . . . that I know of . . .
|
||||
* SQLite3 Database
|
||||
* Adminer database maintenance
|
||||
* [phpSysInfo](https://github.com/phpsysinfo/phpsysinfo)
|
||||
* New species mobile notifications from [Pushed.co](https://pushed.co/quick-start-guide) (for iOS users only)
|
||||
* [Apprise Notifications](https://github.com/caronc/apprise) supporting 70+ notification platforms
|
||||
* Localization supported
|
||||
|
||||
## Requirements
|
||||
@@ -90,10 +91,7 @@ Please take a look at the [wiki](https://github.com/mcguirepr89/BirdNET-Pi/wiki)
|
||||
|
||||
## Updating
|
||||
|
||||
Since the change in RaspiOS that has discontinued the default `pi` user, the recommended update instructions for installations that _do_ have the default `pi` user:
|
||||
1. Go to "Tools" > "Web Terminal"
|
||||
2. Type ```git pull```
|
||||
3. Go to "Tools" > "System Controls" > "Update" > "OK"
|
||||
Use the web interface and go to "Tools" > "System Controls" > "Update." If you encounter any issues with that, or suspect that the update did not work for some reason, please save its output and post it in an issue where we can help.
|
||||
|
||||
## Uninstallation
|
||||
```
|
||||
@@ -107,7 +105,12 @@ Submit an issue or discussion.
|
||||
Please join a Discussion!! and please join [BirdWeather!!](https://app.birdweather.com)
|
||||
I hope that if you find BirdNET-Pi has been worth your time, you will share your setup, results, customizations, etc. [HERE](https://github.com/mcguirepr89/BirdNET-Pi/discussions/69) and will consider [making your installation public](https://github.com/mcguirepr89/BirdNET-Pi/wiki/Sharing-Your-BirdNET-Pi).
|
||||
|
||||
## ToDo, Notes, and Coming Soon
|
||||
## Project Links
|
||||
|
||||
- [Marie Lelouche's <i>Out of Spaces</i>](https://www.lestanneries.fr/exposition/marie-lelouche-out-of-spaces/) using BirdNET-Pi in post-sculpture VR! [Press Kit](https://github.com/mcguirepr89/BirdNET-Pi-assets/blob/main/dp_out_of_spaces_marie_lelouche_digital_05_01_22.pdf)
|
||||
- [Research on noded BirdNET-Pi networks for farming](https://github.com/mcguirepr89/BirdNET-Pi-assets/blob/main/G23_Report_ModelBasedSysEngineering_FarmMarkBirdDetector_V1__Copy_.pdf)
|
||||
- <ins>[Core-Electronics](https://core-electronics.com.au/projects/bird-calls-raspberry-pi)</ins> Build Article
|
||||
|
||||
|
||||
### Internationalization:
|
||||
The bird names are in English by default, but other localized versions are available thanks to the wonderful efforts of [@patlevin](https://github.com/patlevin). Use the web interface's "Tools" > "Settings" and select your "Database Language" to have the detections in your language.
|
||||
|
||||
@@ -33,8 +33,8 @@ if(isset($_GET['submit'])) {
|
||||
if(isset($_GET["caddy_pwd"])) {
|
||||
$caddy_pwd = $_GET["caddy_pwd"];
|
||||
if(strcmp($caddy_pwd,$config['CADDY_PWD']) !== 0) {
|
||||
$contents = preg_replace("/CADDY_PWD=.*/", "CADDY_PWD=$caddy_pwd", $contents);
|
||||
$contents2 = preg_replace("/CADDY_PWD=.*/", "CADDY_PWD=$caddy_pwd", $contents2);
|
||||
$contents = preg_replace("/CADDY_PWD=.*/", "CADDY_PWD=\"$caddy_pwd\"", $contents);
|
||||
$contents2 = preg_replace("/CADDY_PWD=.*/", "CADDY_PWD=\"$caddy_pwd\"", $contents2);
|
||||
$fh = fopen('/etc/birdnet/birdnet.conf', "w");
|
||||
$fh2 = fopen("./scripts/thisrun.txt", "w");
|
||||
fwrite($fh, $contents);
|
||||
@@ -235,7 +235,7 @@ foreach($formats as $format){
|
||||
<label for="caddy_pwd">Password: </label>
|
||||
<input name="caddy_pwd" type="text" value="<?php print($newconfig['CADDY_PWD']);?>" /><br>
|
||||
<h3>Custom URL</h3>
|
||||
<p><a href="mailto:@gmail.com?subject=Request%20BirdNET-Pi%20Subdomain&body=<?php include('birdnetpi_request.php'); ?>" target="_blank">Email Me</a> if you would like a BirdNETPi.com subdomain. This would be, <i>https://YourLocation.birdnetpi.com</i></p>
|
||||
<p><a href="mailto:mcguirepr89@gmail.com?subject=Request%20BirdNET-Pi%20Subdomain&body=<?php include('birdnetpi_request.php'); ?>" target="_blank">Email Me</a> if you would like a BirdNETPi.com subdomain. This would be, <i>https://YourLocation.birdnetpi.com</i></p>
|
||||
<p>When you update the URL below, the web server will reload, so be sure to wait at least 30 seconds and then go to your new URL.</p>
|
||||
<label for="birdnetpi_url">BirdNET-Pi URL: </label>
|
||||
<input name="birdnetpi_url" type="url" value="<?php print($newconfig['BIRDNETPI_URL']);?>" /><br>
|
||||
|
||||
+49
-2
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
error_reporting(E_ALL);
|
||||
error_reporting(E_ERROR);
|
||||
ini_set('display_errors',1);
|
||||
|
||||
# Basic Settings
|
||||
@@ -21,6 +21,21 @@ if(isset($_GET['apprise_notify_each_species'])) {
|
||||
exec('sudo systemctl stop pushed_notifications.service');
|
||||
}
|
||||
|
||||
// logic for setting the date and time based on user inputs from the form below
|
||||
if(isset($_GET['date']) && isset($_GET['time'])) {
|
||||
// can't set the date manually if it's getting it from the internet, disable ntp
|
||||
exec("sudo timedatectl set-ntp false");
|
||||
|
||||
exec("sudo date -s '".$_GET['date']." ".$_GET['time']."'");
|
||||
} else {
|
||||
// user checked 'use time from internet if available,' so make sure that's on
|
||||
if(strlen(trim(exec("sudo timedatectl | grep \"NTP service: active\""))) == 0){
|
||||
exec("sudo timedatectl set-ntp true");
|
||||
sleep(3);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$contents = file_get_contents("/etc/birdnet/birdnet.conf");
|
||||
@@ -164,9 +179,41 @@ https://discordapp.com/api/webhooks/{WebhookID}/{WebhookToken}
|
||||
<option value="labels_uk.txt">Ukrainian</option>
|
||||
</select>
|
||||
<br><br>
|
||||
<script>
|
||||
function handleChange(checkbox) {
|
||||
// this disables the input of manual date and time if the user wants to use the internet time
|
||||
var date=document.getElementById("date");
|
||||
var time=document.getElementById("time");
|
||||
if(checkbox.checked) {
|
||||
date.setAttribute("disabled", "disabled");
|
||||
time.setAttribute("disabled", "disabled");
|
||||
} else {
|
||||
date.removeAttribute("disabled");
|
||||
time.removeAttribute("disabled");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<?php
|
||||
// if NTP service is active, show the checkboxes as checked, and disable the manual input
|
||||
$tdc = trim(exec("sudo timedatectl | grep \"NTP service: active\""));
|
||||
if (strlen($tdc) > 0) {
|
||||
$checkedvalue = "checked";
|
||||
$disabledvalue = "disabled";
|
||||
} else {
|
||||
$checkedvalue = "";
|
||||
$disabledvalue = "";
|
||||
}
|
||||
?>
|
||||
<label for="appt">Select a Date and Time:</label><br>
|
||||
<span>If connected to the internet, retrieve time automatically?</span>
|
||||
<input type="checkbox" onchange='handleChange(this)' name="apprise_notify_each_detection" <?php echo $checkedvalue; ?> ><br>
|
||||
<input onclick="this.showPicker()" type="date" id="date" name="date" value="<?php echo date('Y-m-d') ?>" <?php echo $disabledvalue; ?>>
|
||||
<input onclick="this.showPicker()" type="time" id="time" name="time" value="<?php echo date('H:i') ?>" <?php echo $disabledvalue; ?>>
|
||||
<br><br><br>
|
||||
|
||||
<input type="hidden" name="status" value="success">
|
||||
<input type="hidden" name="submit" value="settings">
|
||||
<button onclick="if(Boolean(Number(<?php print($config['APPRISE_NOTIFY_EACH_DETECTION']); ?>)) != document.getElementsByName('apprise_notify_each_detection')[0].checked) type="submit" name="view" value="Settings">
|
||||
<button type="submit" name="view" value="Settings">
|
||||
<?php
|
||||
if(isset($_GET['status'])){
|
||||
echo "Success!";
|
||||
|
||||
@@ -116,11 +116,11 @@ for h in "${SCAN_DIRS[@]}";do
|
||||
END=${RECORDING_LENGTH}
|
||||
fi
|
||||
|
||||
sox "${h}/${OLDFILE}" "${NEWSPECIES_BYDATE}/${NEWFILE}" \
|
||||
trim "${START}" "${END}"
|
||||
sox -V1 "${h}/${OLDFILE}" "${NEWSPECIES_BYDATE}/${NEWFILE}" \
|
||||
trim ="${START}" ="${END}"
|
||||
|
||||
# Create spectrogram for extraction
|
||||
sox "${NEWSPECIES_BYDATE}/${NEWFILE}" -n remix 1 rate 24k spectrogram \
|
||||
sox -V1 "${NEWSPECIES_BYDATE}/${NEWFILE}" -n remix 1 rate 24k spectrogram \
|
||||
-t "${COMMON_NAME}" \
|
||||
-c "${NEWSPECIES_BYDATE//$HOME\/}/${NEWFILE}" \
|
||||
-o "${NEWSPECIES_BYDATE}/${NEWFILE}.png"
|
||||
|
||||
@@ -212,7 +212,7 @@ http://localhost http://$(hostname).local ${BIRDNETPI_URL} {
|
||||
handle /Charts/* {
|
||||
file_server browse
|
||||
}
|
||||
basicauth views.php?view=File* {
|
||||
basicauth /views.php?view=File* {
|
||||
birdnet ${HASHWORD}
|
||||
}
|
||||
basicauth /Processed* {
|
||||
|
||||
@@ -7,7 +7,6 @@ my_dir=$HOME/BirdNET-Pi/scripts
|
||||
sudo systemctl stop birdnet_server.service
|
||||
sudo pkill server.py
|
||||
sudo systemctl stop birdnet_recording.service
|
||||
sudo rm -rf ${RECS_DIR}/$(date +%B-%Y/%d-%A)/*
|
||||
services=(web_terminal.service
|
||||
spectrogram_viewer.service
|
||||
pushed_notifications.service
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
source /etc/birdnet/birdnet.conf
|
||||
analyzing_now="$(cat $HOME/BirdNET-Pi/analyzing_now.txt)"
|
||||
spectrogram_png=${EXTRACTED}/spectrogram.png
|
||||
sox "${analyzing_now}" -n remix 1 rate 24k spectrogram -c "${analyzing_now//$HOME\/}" -o "${spectrogram_png}"
|
||||
sox -V1 "${analyzing_now}" -n remix 1 rate 24k spectrogram -c "${analyzing_now//$HOME\/}" -o "${spectrogram_png}"
|
||||
|
||||
@@ -6,6 +6,7 @@ USER=$(awk -F: '/1000/ {print $1}' /etc/passwd)
|
||||
HOME=$(awk -F: '/1000/ {print $6}' /etc/passwd)
|
||||
my_dir=$HOME/BirdNET-Pi/scripts
|
||||
|
||||
sudo -u$USER git -C $my_dir rm privacy_server.py
|
||||
sudo -u${USER} git -C $my_dir stash
|
||||
sudo -u${USER} git -C $my_dir pull -f
|
||||
sudo systemctl daemon-reload
|
||||
|
||||
@@ -18,7 +18,7 @@ http://localhost http://$(hostname).local ${BIRDNETPI_URL} {
|
||||
handle /Charts/* {
|
||||
file_server browse
|
||||
}
|
||||
basicauth views.php?view=File* {
|
||||
basicauth /views.php?view=File* {
|
||||
birdnet ${HASHWORD}
|
||||
}
|
||||
basicauth /Processed* {
|
||||
|
||||
Reference in New Issue
Block a user