From 7e5e75561ebbf5fefcc6da0385d74e78324b6ca4 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Tue, 23 Apr 2024 11:59:17 +0200 Subject: [PATCH] Add external drives support --- birdnet-go/CHANGELOG.md | 4 +-- birdnet-go/Dockerfile | 2 +- birdnet-go/README.md | 6 ++-- birdnet-go/config.json | 67 ++++++++++++++++++++++++++++++++++++++--- 4 files changed, 69 insertions(+), 10 deletions(-) diff --git a/birdnet-go/CHANGELOG.md b/birdnet-go/CHANGELOG.md index d2763cb56..9f4a541b4 100644 --- a/birdnet-go/CHANGELOG.md +++ b/birdnet-go/CHANGELOG.md @@ -1,4 +1,4 @@ -## 0.5.1-2 (22-04-2024) -- Minor bugs fixed +- Feat : Allow mounting of SMB and local drives to store the audio clips on an external drive + ## 0.5.1 (22-04-2024) - Initial build diff --git a/birdnet-go/Dockerfile b/birdnet-go/Dockerfile index 7aa4cd2a8..8c0a5ba14 100644 --- a/birdnet-go/Dockerfile +++ b/birdnet-go/Dockerfile @@ -41,7 +41,7 @@ RUN if [ ! -f /bin/sh ] && [ -f /usr/bin/sh ]; then ln -s /usr/bin/sh /bin/sh; f if [ ! -f /bin/bash ] && [ -f /usr/bin/bash ]; then ln -s /usr/bin/bash /bin/bash; fi # Modules -ARG MODULES="" +ARG MODULES="00-local_mounts.sh 00-smb_mounts.sh" # Automatic modules download ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_automodules.sh" "/ha_automodules.sh" diff --git a/birdnet-go/README.md b/birdnet-go/README.md index 1a917741b..9ced9be7a 100644 --- a/birdnet-go/README.md +++ b/birdnet-go/README.md @@ -28,11 +28,11 @@ This addon is based on their docker image. ## Configuration -Install, then start the addon a first time -Webui can be found at . - +Install, then start the addon a first time. Webui can be found at . You'll need a microphone : either use one connected to HA or the audio stream of a rstp camera. +The audio clips folder can be stored on an external or SMB drive by mounting it from the addon options, then specifying the path instead of "clips/". For example, "/mnt/NAS/Birdnet/" + Options can be configured through three ways : - Addon options diff --git a/birdnet-go/config.json b/birdnet-go/config.json index 99cba87ee..f2aa12735 100644 --- a/birdnet-go/config.json +++ b/birdnet-go/config.json @@ -5,6 +5,58 @@ ], "audio": true, "codenotary": "alexandrep.github@gmail.com", + "devices": [ + "/dev/dri", + "/dev/dri/card0", + "/dev/dri/card1", + "/dev/dri/renderD128", + "/dev/vchiq", + "/dev/video10", + "/dev/video11", + "/dev/video12", + "/dev/video13", + "/dev/video14", + "/dev/video15", + "/dev/video16", + "/dev/ttyUSB0", + "/dev/sda", + "/dev/sdb", + "/dev/sdc", + "/dev/sdd", + "/dev/sde", + "/dev/sdf", + "/dev/sdg", + "/dev/nvme", + "/dev/nvme0n1p1", + "/dev/nvme0n1p2", + "/dev/mmcblk", + "/dev/fuse", + "/dev/sda1", + "/dev/sdb1", + "/dev/sdc1", + "/dev/sdd1", + "/dev/sde1", + "/dev/sdf1", + "/dev/sdg1", + "/dev/sda2", + "/dev/sdb2", + "/dev/sdc2", + "/dev/sdd2", + "/dev/sde2", + "/dev/sdf2", + "/dev/sdg2", + "/dev/sda3", + "/dev/sdb3", + "/dev/sda4", + "/dev/sdb4", + "/dev/sda5", + "/dev/sda6", + "/dev/sda7", + "/dev/sda8", + "/dev/nvme0", + "/dev/nvme1", + "/dev/nvme2" + ], "description": "Realtime BirdNET soundscape analyzer", "environment": { }, @@ -13,9 +65,11 @@ "image": "ghcr.io/alexbelgium/birdnet-go-{arch}", "init": false, "map": [ - "addon_config:rw" + "addon_config:rw", + "media:rw", + "share:rw" ], - "name": "birdnet-go", + "name": "Birdnet-go", "options": { "COMMAND": "realtime" }, @@ -29,9 +83,14 @@ "schema": { "ALSA_CARD": "int?", "COMMAND": "str", - "TZ": "str?" + "TZ": "str?", + "cifsdomain": "str?", + "cifspassword": "str?", + "cifsusername": "str?", + "localdisks": "str?", + "networkdisks": "str?" }, "slug": "birdnet-go", "url": "https://github.com/alexbelgium/hassio-addons/tree/master/birdnet-go", - "version": "0.5.1-2" + "version": "0.5.1-3" }