Closed Frono closed 2 years ago
Have a look at Tools --> System Info In the upper part it says "Usage" of the SD card in %
Would that be sufficient ?
@Frono I may or may not get to this as a feature -- in the meantime, however, you can access the "percentage" at which point the system is considered full within the ~/BirdNET-Pi/scripts/disk_check.sh
tool.
Near the top of that file (which you can edit within BirdNET-Pi itself using "Tools" > "File Manager"), you'll see the following:
#!/usr/bin/env bash
set -x
used="$(df -h / | tail -n1 | awk '{print $5}')"
if [ "${used//%}" -ge 95 ]; then
source /etc/birdnet/birdnet.conf
...
You can change "95
" to the "Full disk is considered to be less XX% free space" option you mention.
After changing that value, you shouldn't have to do anything else -- it will simply check against the new value each time disk_check.sh
is fired as a cron job (every 5 minutes by default).
I hope that is helpful info for you. Looking forward to feedback from others.
My best, Patrick
This feature is available in the new repo -- I may backport the code to this repo, but wanted to let you all know that the new repo will allow this to be user-defined.
@mcguirepr89 Patrick, I feel a little lost. What is the "new repo"? Did you start a different project?
The new repo is my fork of the new model's repo, https://github.com/mcguirepr89/BirdNET-Analyzer-Pi.git
It is still very much in development, but Stefan released the 3K model earlier last week and I've been putting together a new BirdNET-Pi around that ever since.
BirdNET-Pi's success has surprised me, to say the absolute least. As (one of) its steward(s), I do want to improve how it is put together and how others develop around it.
I've been doing a shit load of homework over the last several weeks to get a feel for what type of development would suit the needs for this unexpected success while providing fertile scaffolding for continued growth.
With the homework complete, Laravel 9 is the framework I've chosen to use to rebuild BirdNET-Pi around the new model.
It will be superior in all regards, but will be in development for a long while (I suspect).
Basically, once this current repo became popular, more feature requests and bugs cropped up than I can sustainably address. That was, of course, a result of putting all this together while learning as I go.
The new Laravel platform will let me address bugs and feature requests with much less "hacking" and much better development practices.
As it is now, were I to disappear, this project would need someone who understands how I put the system together in order to make any meaningful adjustments. My goal with this new build is that I will follow best practices as much as I possibly can so that my savoir faire is not required for folks who wish to develop around (or customize) the software.
I will be sure to let you know when the new repo can be tested -- as it is now, the core services are intact and I am building out the UI--
There are still SOOOO many BirdNET-Pi features that I need to port over, but many of them will disappear because either a) the new model handles the scenarios for which we've built tool so it is no longer needed, or b), Laravel is better isolated from the underlying system, so less configuration is needed overall.
With all of that said, I've valued your testing since first making this project public, so I am of course 100% eager to get you testing sooner than later, though I don't think the model's species list is quite where it would need to be for your purposes.
Also, instead of an installer, I will (I'm about 90% sure on this) only offer pre-installed images so that I can better support the software. The mysteries that surround what folks actually do with their installations is getting old :) -- I'd rather know that if the system booted, everything is installed correctly because I'm the one who installed it.
Anywho, there is SOOOOO much about the new iteration to discuss, but I'm not quite at a place where I'm open for discussion just yet -- I don't want to open the feature-request flood-gates (from the hoi polloi, not you), until there is a stable version and want to remove bells and whistles as I go and ask that users make solid cases for requests for new bells and whistles. I'd like your help in assessing those requests, btw -- I don't want BirdNET-Pi to turn into a toy and I want to prioritize research over hobby interests.
Lastly, I'm getting really excited about bats and finally have access to a mic that can listen in those frequencies -- depending on how my tinkering with that goes, I may also want to bring some of those things into the new version. (For now, it's basically a customized version of the custom-recording stuff I put together for you, where it checks for a second sound card, if it is there and is listed with the frequency range > 48000, it should record in the evenings and extract all events as spectrograms -- no species classification, just capturing spectrograms)
The new Laravel platform will let me address bugs and feature requests with much less "hacking" and much better development practices.
Ahoy Patrick! May I offer you the chance to implement my feature into the new repo? It's a cron job that calls systemctl analyze_recordings start
every 3 minutes, and at the end of that service the service calls stop
on itself, which is managed by another service that watchdogs when that stop is issued - then a .txt is updated with a '1' meaning the service is ready to be started again, which another cron job reads from (every 2 mins) and then queues the analysis for a start
again. After this sequence the /etc/crontab is completely wiped and a new job is inserted which uses a new .txt file. Hoping it will make the new repo more efficient while more importantly protecting my job security. Let me know if you're interested. 🙂
Sounds like a keeper!
@DD4WH I emailed you a walk-through of the new app -- it may be too late where you are to walk through the app tonight, but let me know if you can go through it tomorrow. There is not much to see, but you will be able to get a feel for the new UI at least.
@mcguirepr89 Thanks Patrick, looks very good! only one comment from my side on Bats/ultrasound and BirdNET-Pi:
https://github.com/FloMee/cloudedbats_wurb_2020 Here is a screenshot of the system from today, it produces a simple realtime graph:
1.) Clouded bats - the original https://github.com/cloudedbats/cloudedbats_wurb_2020 2.) Bat Classify - the original https://bitbucket.org/chrisscott/batclassify/src/master/
I have had a problem where my disk filled up and it may or may not have been due to birdnetpi. I have a fairly large SSD and really do not need to keep a whole disk worth of recordings, as the detection statistics (Species, Times, Dates, etc...) are what I'm really interested in preserving year over year. I generally only listen to daily recordings for new birds that show up in the data. I do like to have best recordings for each as I like to have one good example in the application.
If everybody agrees, I'd like to see an option in the advanced menu that either specifies a level at which purge/keep operates based on how full the birdsong folder is, or an option to just say "Full disk is considered to be less than XXXgb free space" or "Full disk is considered to be less XX% free space" The measurement could be in percentage to make it easier for a default, or an absolute. It would be very handy for me either way.