mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-09-05 17:33:33 +02:00
Merge branch 'master' into claude/birdnet-go-startup-errors-ttace
This commit is contained in:
@@ -164,7 +164,7 @@ If you want to do add the repository manually, please follow the procedure highl
|
||||
![smb][smb-badge]
|
||||
![localdisks][localdisks-badge]
|
||||
|
||||
✓  [Birdnet-go](birdnet-go/) : Realtime BirdNET soundscape analyzer
|
||||
✓  [Birdnet-go](birdnet-go/) : Realtime BirdNET and Battybirdnet soundscape analyzer
|
||||
|
||||
  
|
||||

|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
## nightly-20260525-2 (26-05-2026)
|
||||
- Suppress noisy startup logs: silence `chmod /dev/snd` errors on the read-only HA mount, and hide unavailable ALSA plugins (JACK, OSS, dsnoop) from device enumeration so libjack and pcm_oss/dsnoop probes no longer print at launch. ALSA overrides are written to `/root/.asoundrc` (since `/etc/asound.conf` is read-only in this environment).
|
||||
- Allow advanced users to override the ALSA config by dropping a custom `asound.conf` into the addon config folder.
|
||||
- Add LOG_MAX_SIZE_MB and LOG_MAX_AGE_DAYS addon options to manage log storage size
|
||||
- Automatically trim log files exceeding configured age on startup
|
||||
|
||||
## nightly-20260525 (26-05-2026)
|
||||
- Minor bugs fixed
|
||||
|
||||
## nightly-20260511-414-2 (22-05-2026)
|
||||
- Minor bugs fixed
|
||||
|
||||
|
||||
@@ -86,6 +86,8 @@ name: Birdnet-go
|
||||
options:
|
||||
env_vars: []
|
||||
BIRDSONGS_FOLDER: /config/clips
|
||||
LOG_MAX_SIZE_MB: 50
|
||||
LOG_MAX_AGE_DAYS: 7
|
||||
homeassistant_microphone: false
|
||||
panel_admin: false
|
||||
panel_icon: mdi:bird
|
||||
@@ -104,6 +106,8 @@ schema:
|
||||
- name: match(^[A-Za-z0-9_]+$)
|
||||
value: str?
|
||||
BIRDSONGS_FOLDER: str?
|
||||
LOG_MAX_SIZE_MB: int(1,1000)?
|
||||
LOG_MAX_AGE_DAYS: int(1,365)?
|
||||
TZ: str?
|
||||
cifsdomain: str?
|
||||
cifspassword: str?
|
||||
|
||||
@@ -100,3 +100,26 @@ bashio::log.info "Correcting configuration for defaults"
|
||||
# Update database location in config files
|
||||
yq -i -y ".output.sqlite.path = \"/config/birdnet.db\"" "$CONFIG_LOCATION"
|
||||
bashio::log.info "... database is located in /config/birdnet.db"
|
||||
|
||||
####################
|
||||
# Log Management
|
||||
####################
|
||||
LOG_MAX_SIZE_MB="$(bashio::config "LOG_MAX_SIZE_MB")"
|
||||
LOG_MAX_SIZE_MB="${LOG_MAX_SIZE_MB:-50}"
|
||||
LOG_MAX_AGE_DAYS="$(bashio::config "LOG_MAX_AGE_DAYS")"
|
||||
LOG_MAX_AGE_DAYS="${LOG_MAX_AGE_DAYS:-7}"
|
||||
|
||||
bashio::log.info "Configuring log rotation: max ${LOG_MAX_SIZE_MB}MB per file, max ${LOG_MAX_AGE_DAYS} days retention"
|
||||
|
||||
# Configure log rotation in birdnet-go config
|
||||
yq -i -y ".logging.file_output.max_size = ${LOG_MAX_SIZE_MB}" "$CONFIG_LOCATION"
|
||||
yq -i -y ".logging.file_output.max_age = ${LOG_MAX_AGE_DAYS}" "$CONFIG_LOCATION"
|
||||
yq -i -y ".logging.file_output.max_rotated_files = 3" "$CONFIG_LOCATION"
|
||||
yq -i -y ".logging.file_output.compress = true" "$CONFIG_LOCATION"
|
||||
|
||||
# Trim existing log files that exceed the configured max age
|
||||
LOG_DIR="/config/logs"
|
||||
if [ -d "$LOG_DIR" ]; then
|
||||
bashio::log.info "Trimming log files older than ${LOG_MAX_AGE_DAYS} days in ${LOG_DIR}"
|
||||
find "$LOG_DIR" -type f -name "*.log*" -mtime +"$LOG_MAX_AGE_DAYS" -delete 2>/dev/null || true
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user