mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-17 12:59:13 +02:00
Updated
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
- Add weekly report button to views
|
- Add weekly report button to views
|
||||||
- Use optional iframe for Adminer
|
- Use optional iframe for Adminer
|
||||||
|
- Enable species converter by default (only active if used)
|
||||||
|
|
||||||
## 0.13-46 (23-05-2024)
|
## 0.13-46 (23-05-2024)
|
||||||
- Security : enable double layer basic auth with caddy in addition to php when connecting without ingress
|
- Security : enable double layer basic auth with caddy in addition to php when connecting without ingress
|
||||||
|
|||||||
@@ -114,11 +114,11 @@ Example : https://www.amazon.fr/HUAREW-Valeurs-Ferrite-Suppresseur-Diam%C3%A8tre
|
|||||||
|
|
||||||
### Microphone comparison
|
### Microphone comparison
|
||||||
|
|
||||||
Recommended microphones ([full discussion here](https://github.com/mcguirepr89/BirdNET-Pi/discussions/39)):
|
Recommended microphones ([full discussion here](https://github.com/mcguirepr89/BirdNET-Pi/discussions/39)):
|
||||||
- Clippy EM272 (https://www.veldshop.nl/en/smart-clippy-em272z1-mono-omni-microphone.html) + ugreen aux to usb connector
|
- Clippy EM272 (https://www.veldshop.nl/en/smart-clippy-em272z1-mono-omni-microphone.html) + ugreen aux to usb connector
|
||||||
- Boya By-LM40
|
- Boya By-LM40
|
||||||
|
|
||||||
Conclusion, using mic from Dahua is good enough, but Boya by-lm40 is more optimal for range as birndet model analysis the 150-15000Hz range
|
Conclusion, using mic from Dahua is good enough, EM272 is optimal, but Boya by-lm40 is a very good compromise as birndet model analysis the 150-15000Hz range
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|||||||
@@ -94,7 +94,6 @@
|
|||||||
"schema": {
|
"schema": {
|
||||||
"BIRDSONGS_FOLDER": "str?",
|
"BIRDSONGS_FOLDER": "str?",
|
||||||
"BIRDS_ONLINE_INFO": "list(allaboutbirds.org|ebird.org)",
|
"BIRDS_ONLINE_INFO": "list(allaboutbirds.org|ebird.org)",
|
||||||
"SPECIES_CONVERTER": "bool?",
|
|
||||||
"TZ": "str?",
|
"TZ": "str?",
|
||||||
"certfile": "str",
|
"certfile": "str",
|
||||||
"cifsdomain": "str?",
|
"cifsdomain": "str?",
|
||||||
@@ -111,6 +110,6 @@
|
|||||||
"udev": true,
|
"udev": true,
|
||||||
"url": "https://github.com/alexbelgium/hassio-addons/tree/master/birdnet-pi",
|
"url": "https://github.com/alexbelgium/hassio-addons/tree/master/birdnet-pi",
|
||||||
"usb": true,
|
"usb": true,
|
||||||
"version": "0.13-46",
|
"version": "0.13-47",
|
||||||
"video": true
|
"video": true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ echo " "
|
|||||||
bashio::log.info "Adding new features"
|
bashio::log.info "Adding new features"
|
||||||
|
|
||||||
# Set the online birds info system
|
# Set the online birds info system
|
||||||
|
##################################
|
||||||
if [[ "$(bashio::config "BIRDS_ONLINE_INFO")" == *"ebird"* ]]; then
|
if [[ "$(bashio::config "BIRDS_ONLINE_INFO")" == *"ebird"* ]]; then
|
||||||
echo "... using ebird instead of allaboutbirds"
|
echo "... using ebird instead of allaboutbirds"
|
||||||
# Set ebird database
|
# Set ebird database
|
||||||
@@ -36,26 +37,26 @@ else
|
|||||||
sed -i "s|https://allaboutbirds.org/guide/\$comname|https://allaboutbirds.org/guide/\$comnameen|g" "$HOME"/BirdNET-Pi/scripts/stats.php
|
sed -i "s|https://allaboutbirds.org/guide/\$comname|https://allaboutbirds.org/guide/\$comnameen|g" "$HOME"/BirdNET-Pi/scripts/stats.php
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Add birds change option
|
# Convert Adminer to iframe
|
||||||
if [ ! -f /home/pi/BirdNET-Pi/scripts/birdnet_changeidentification.sh ]; then
|
###############################
|
||||||
echo "... adding option to change detected birds"
|
if ! grep "iframe src=\'scripts/adminer.php" "$HOME"/BirdNET-Pi/homepage/views.php; then
|
||||||
# Clean previous files
|
sed -i '/scripts\/adminer.php\\/c\ <button type=\\"submit\\" name=\\"view\\" value=\\"Adminer\\" form=\\"views\\">Database Maintenance</button>' "$HOME"/BirdNET-Pi/homepage/views.php
|
||||||
rm /home/pi/BirdNET-Pi/scripts/play.php
|
sed -i "/advanced.php/a\ if(\$_GET\['view'\] == \"Adminer\"){echo \"<iframe src='scripts/adminer.php'></iframe>\";}" "$HOME"/BirdNET-Pi/homepage/views.php
|
||||||
rm /home/pi/BirdNET-Pi/homepage/style.css
|
sed -i "s|deny|SameOrigin|g" "$HOME"/BirdNET-Pi/scripts/adminer.php
|
||||||
# Download new files
|
sed -i "1a echo '<a href=\"'.\$_SERVER\['PHP_SELF'\]\.'\" target=\"_blank\">Open in new page</a>';" "$HOME"/BirdNET-Pi/scripts/adminer.php
|
||||||
curl -s -o /home/pi/BirdNET-Pi/homepage/images/bird.svg https://raw.githubusercontent.com/alexbelgium/BirdNET-Pi/patch-1/homepage/images/bird.svg
|
fi
|
||||||
curl -s -o /home/pi/BirdNET-Pi/scripts/birdnet_changeidentification.sh https://raw.githubusercontent.com/alexbelgium/BirdNET-Pi/patch-1/scripts/birdnet_changeidentification.sh
|
|
||||||
curl -s -o /home/pi/BirdNET-Pi/scripts/play.php https://raw.githubusercontent.com/alexbelgium/BirdNET-Pi/patch-1/scripts/play.php
|
# Add weekly report button
|
||||||
curl -s -o /home/pi/BirdNET-Pi/homepage/style.css https://raw.githubusercontent.com/alexbelgium/BirdNET-Pi/patch-1/homepage/style.css
|
###############################
|
||||||
# Correct permissions
|
if ! grep -q "Weekly Report" "$HOME"/BirdNET-Pi/homepage/views.php; then
|
||||||
chmod 777 /home/pi/BirdNET-Pi/scripts/birdnet_changeidentification.sh
|
sed -i "67a\ <button type=\"submit\" name=\"view\" value=\"Weekly Report\" form=\"views\">Weekly Report</button>" "$HOME"/BirdNET-Pi/homepage/views.php
|
||||||
chmod 777 /home/pi/BirdNET-Pi/scripts/play.php
|
|
||||||
chmod 777 /home/pi/BirdNET-Pi/homepage/style.css
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Add species conversion system
|
# Add species conversion system
|
||||||
if bashio::config.true "SPECIES_CONVERTER"; then
|
###############################
|
||||||
bashio::log.yellow "... adding feature of SPECIES_CONVERTER, a new tab is added to your Tools"
|
|
||||||
|
if ! grep -q "Converted" "$HOME"/BirdNET-Pi/homepage/views.php; then
|
||||||
|
echo "... adding feature of SPECIES_CONVERTER, a new tab is added to your Tools"
|
||||||
touch /config/convert_species_list.txt
|
touch /config/convert_species_list.txt
|
||||||
chown pi:pi /config/convert_species_list.txt
|
chown pi:pi /config/convert_species_list.txt
|
||||||
sudo -u pi ln -fs /config/convert_species_list.txt "$HOME"/BirdNET-Pi/
|
sudo -u pi ln -fs /config/convert_species_list.txt "$HOME"/BirdNET-Pi/
|
||||||
@@ -116,16 +117,4 @@ if bashio::config.true "SPECIES_CONVERTER"; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Convert Adminer to iframe
|
|
||||||
if ! grep "iframe src=\'scripts/adminer.php" "$HOME"/BirdNET-Pi/homepage/views.php; then
|
|
||||||
sed -i '/scripts\/adminer.php\/c\ <button type=\\"submit\\" name=\\"view\\" value=\\"Adminer\\" form=\\"views\\">Database Maintenance</button>' "$HOME"/BirdNET-Pi/homepage/views.php
|
|
||||||
#sed -i "/if\(\$_GET\['view'\] == \"Webterm\"\){/i test" "$HOME"/BirdNET-Pi/homepage/views.php
|
|
||||||
sed -i "s|deny|SameOrigin|g" "$HOME"/BirdNET-Pi/scripts/adminer.php
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Add weekly report button
|
|
||||||
if ! grep -q "Weekly Report" "$HOME"/BirdNET-Pi/homepage/views.php; then
|
|
||||||
sed -i "67a\ <button type=\"submit\" name=\"view\" value=\"Weekly Report\" form=\"views\">Weekly Report</button>" "$HOME"/BirdNET-Pi/homepage/views.php
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo " "
|
echo " "
|
||||||
|
|||||||
Reference in New Issue
Block a user