Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publishing past detections to BirdWeather in case of intermittent network access #228

Open
tvoirand opened this issue Nov 4, 2024 · 1 comment

Comments

@tvoirand
Copy link

tvoirand commented Nov 4, 2024

Hi,

As of now, if the BirdNET-Pi station is not connected to the internet when a detection occurs, that detection is not published to BirdWeather.

This can be an issue for some users, for example users who turn their WiFi router off when leaving home for some time (as is my case ;) ), or stations in the field with inconsistent connectivity as mentioned in this (old) post in a discussion on mcguirepr89’s repo.

One possible solution could be a dedicated service that would monitor network status change and automatically publish any past detection to BirdWeather when connectivity is restored.

I have already started working on this, and my draft is accessible here. It’s been working fine on my station for a couple of weeks. However, there are a few pending points to complete:

  • I have written a new birdweather_publication.py script, which currently includes code duplication, notably with reporting.py. I plan to refactor this.
  • Publishing detections to BirdWeather involves specifying a “soundscape” (an audio file) with its start/end datetimes, and a “detection” with its start/end datetimes. As of now, multiple detections from the same original audio file share the same timestamp in BirdNET-Pi’s DB, meaning they can’t be published as distinct detections to BirdWeather. I have already thought of a solution for this, which I describe in this issue.

If maintainers of this project agree that this would be a useful feature, I would be happy to finalize this, and then submit a PR :).

Thanks!

@tvoirand
Copy link
Author

tvoirand commented Dec 7, 2024

I’ve completed the points I was mentioning in my previous comment. I just opened a PR to illustrate the propose changes with code and describe them in more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant