This commit is contained in:
jokob-sk
2025-01-11 08:41:11 +11:00
11 changed files with 49 additions and 22 deletions

View File

@@ -1,4 +1,6 @@
- Install tensorflow if avx2 not available
## 2025.01-4 (08-01-2025)
- Older CPU support : install tensorflow if avx2 not available
- Align to upstream
## 0.13-106 (30-10-2024)
- Implement interactive plot

View File

@@ -120,6 +120,6 @@
"udev": true,
"url": "https://github.com/alexbelgium/hassio-addons/tree/master/birdnet-pi",
"usb": true,
"version": "0.13-106",
"version": "2025.01-4",
"video": true
}

View File

@@ -1,12 +0,0 @@
#!/command/with-contenv bashio
# shellcheck shell=bash
set -e
# Compensate for old cpu without avx2
if [[ "$(uname -m)" = "x86_64" && lscpu | grep -q "Flags" && ! lscpu | grep -q "avx2" ]]; then
bashio::log.warning "NON SUPPORTED CPU DETECTED"
bashio::log.warning "Your cpu doesn't support avx2, the analyzer service will likely won't work"
bashio::log.warning "Trying to install tensorflow instead of tflite_runtime instead"
$PYTHON_VIRTUAL_ENV /usr/bin/pip3 uninstall -y tflite_runtime
$PYTHON_VIRTUAL_ENV /usr/bin/pip3 install tensorflow
fi

View File

@@ -0,0 +1,18 @@
#!/command/with-contenv bashio
# shellcheck shell=bash
set -e
# Check if the CPU supports AVX2
if [[ "$(uname -m)" = "x86_64" ]]; then
if lscpu | grep -q "Flags"; then
if ! lscpu | grep -q "avx2"; then
bashio::log.warning "NON SUPPORTED CPU DETECTED"
bashio::log.warning "Your cpu doesn't support avx2, the analyzer service will likely won't work"
bashio::log.warning "Trying to install tensorflow instead of tflite_runtime instead"
chown "0:0" /home/pi/.cache/pip
$PYTHON_VIRTUAL_ENV /usr/bin/pip3 uninstall -y tflite_runtime
$PYTHON_VIRTUAL_ENV /usr/bin/pip3 install tensorflow
chown "$PUID:$PGID" /home/pi/.cache/pip
fi
fi
fi

View File

@@ -51,7 +51,7 @@ def get_bird_code(scientific_name):
def automatic_mqtt_publish(file, detection, path):
bird = {}
bird['Date'] = file.date
bird['Date'] = file.file_date
bird['Time'] = file.time
bird['ScientificName'] = detection.scientific_name.replace('_', ' ')
bird['CommonName'] = detection.common_name

View File

@@ -1,3 +1,5 @@
## v2.4.2-2 (08-01-2025)
- Minor bugs fixed
## v2.4.1-2 (21-12-2024)
- Minor bugs fixed

View File

@@ -1,4 +1,3 @@
## ⚠ Open Issue : [🐛 [Mealie] Mealie does not start since last updates (opened 2025-01-07)](https://github.com/alexbelgium/hassio-addons/issues/1700) by [@duczz](https://github.com/duczz)
## ⚠ Open Issue : [🐛 [Mealie] redirecting to localhost:9000 when Accepting invitation or changeing language (opened 2025-01-07)](https://github.com/alexbelgium/hassio-addons/issues/1703) by [@phlo-c](https://github.com/phlo-c)
# Hass.io Add-ons: Mealie

View File

@@ -115,5 +115,5 @@
"slug": "mealie",
"udev": true,
"url": "https://github.com/alexbelgium/hassio-addons",
"version": "v2.4.2"
"version": "v2.4.2-2"
}

View File

@@ -33,3 +33,11 @@ sed -i "s|%%interface%%|${ingress_interface}|g" /etc/nginx/servers/ingress.conf
sed -i "s|%%ingress_entry%%|${ingress_entry}|g" /etc/nginx/servers/ingress.conf
sed -i "s|%%base_subpath%%|${base_path}|g" /etc/nginx/servers/ingress.conf
sed -i "s|%%base_subpath%%|${base_path}|g" /etc/nginx/servers/ssl.conf
if bashio::config.has_value "BASE_URL"; then
BASE_URL="$(bashio::config "BASE_URL")"
BASE_URL="${BASE_URL#*://}:$(bashio::addon.port 9001)"
sed -i "s|%%BASE_URL%%|$BASE_URL|g" /etc/nginx/servers/ssl.conf
else
sed -i "/BASE_URL/d" /etc/nginx/servers/ssl.conf
fi

View File

@@ -1,5 +1,4 @@
server {
server {
listen 9001;
include /etc/nginx/includes/server_params.conf;
@@ -8,6 +7,10 @@
ssl_certificate /ssl/%%certfile%%;
ssl_certificate_key /ssl/%%keyfile%%;
proxy_buffering off;
gzip_static off;
client_max_body_size 0;
location / {
# Proxy pass
proxy_pass http://localhost:9000;
@@ -18,17 +21,25 @@
proxy_set_header Connection "upgrade";
# Improve ip handling
proxy_hide_header X-Powered-By;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Accept-Encoding "";
proxy_read_timeout 90;
# Correct base_url
# Ensure the backend knows the correct host
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $host;
# Correct base_url
absolute_redirect off;
sub_filter_once off;
sub_filter_types *;
sub_filter %%base_subpath%% /;
}
# Rewrite URLs in the response
sub_filter localhost:9000 %%BASE_URL%%;
}
}

View File

@@ -1,4 +1,3 @@
## ⚠ Open Issue : [🐛 [Whatsapper] Fails to start on RPI4 (opened 2024-12-27)](https://github.com/alexbelgium/hassio-addons/issues/1683) by [@paoloantinori](https://github.com/paoloantinori)
# Home assistant add-on: Whatsapper
[![Donate][donation-badge]](https://www.buymeacoffee.com/alexbelgium)