-
-
Notifications
You must be signed in to change notification settings - Fork 139
Questions about Birdnet-Pi files, debugging and Apprise #881
Replies: 2 comments · 5 replies
-
Hi @Astrobirder, Unfortunately I think that since that BirdNET pre-installed image you used is almost a year old now, and had network and system modifications that were never fully tested to begin with, that a fresh install using the official Installation Guide should be performed before we spend any more time diagnosing these issues. If you oblige, here are some files and directories that you're going to want to make sure you backup so that you can restore them later:
As for your questions 6, and 7, I can have a crack at answering them now.
And here's a description of some of the services:
|
Beta Was this translation helpful? Give feedback.
All reactions
-
OK! As you suggested, I started over with a clean Raspberry Pi OS Lite (64-bit). I restored the files/directories in BirdNET-Pi and BirdSongs, with one minor mod--the default user on the old image was birdie, and I changed back to birder, as was the case when I started last year, and per the directions. This meant I had a few errors in pathing in birdnet.conf, which were easily remedied with a quick edit. I did once again have to unplug and replug the soundcard (twice) to get detections to start. I'm currently using the BirdNET_GLOBAL_3K_V2.3_Model_FP16, since I'm in eastern North America. It was working with correct IDs and this model First detection: Lazuline Saberwing! Now, as much as I'd love to see/hear one of these I'm pretty sure they don't visit eastern North America. I confirmed by sitting near my mic and via the sounds recorded that it's getting this from a BLUE JAY. Perhaps I should switch back to the older model? Second detection: Bar-tailed Trogon! We are getting about now!--from N. South America to equatorial Africa! Yes, my location is indeed set in settings and appears correct (it was pulled in from the birdnet.conf file that I had pushed back onto the system. I checked the recording and it might REALLY be a distant Red-shouldered Hawk or Blue Jay--hard to tell, but I lean toward the former. Third detection: White Woodpecker--off to SE South America! Which appears to be from a singing White-throated Sparrow Interestingly, if I do a playback of a Lang Elliot recording from Florida--it is also IDed as Lazuline Saberwing. strange. As for #6. I did accidentally find the ** ** bold last night after posting and it is working! Unfortunately \n (and \r and I also found a new/interesting/bug? with respect to the Apprise "Notification Title" settings in Tools->Settings. If you try and put a # or a ## at the front, Birdnet gets rather upset, deletes the contents of the field completely and doesn't send the "headings" markup as I had hoped. I'm still searching for a way to split up the detections. Thanks for the nice overview of the system! That really helps. Now I have a map for further exploration. I clearly need to brush up on my php and my python! So, critical issues to resolve:
Nice to have: Some way of putting a CR/LF into the Apprise Notification, or alternatively, finding a better notification service to use. What are others using? I'm not much of a fan of Twitter, based on recent changes there. Really just want a semi-private notification I can share with other family and friends--Discord seemed a good choice. Anyone have other ideas I should try? I also noticed that the TIMES on the IDs weren't right--and the response from a command line "date" command showed:
Clearly wrong--and yes, I set it in the Raspberry Pi Imager! So, I reset my TZ in raspi-config (and my WiFi and keyboard localization too), and now time is right at both command line and on the Today's Detections. Also, I finally got a Blue Jay detection--not sure which change caused it, but probably the Model reversion. Thanks again for your assistance and all the work you and the other community members do for this project! |
Beta Was this translation helpful? Give feedback.
All reactions
-
To me this signals a hardware issue, especially since you're on a fresh image and I haven't seen anyone else have the same problem before. I'd wager that getting a new soundcard or microphone would resolve this issue. But it sounds like plugging/unplugging it may be acceptable for now?
I've seen this issue pop up a few times but the vast majority of people using the new model aren't experiencing it... so... could you try this:
So I think what's going on here is due to your microphone issues from #1 ^^. I think that your microphone gets unplugged, so the live audio stream service fails due to being unable to detect an input device, then when you get your mic plugged in and working again, the service is never restarted and thus the live audio and live Spectrogram never get initialized again. What you can do is, once your mic is plugged in and working, go to Tools -> Services -> Restart Core Services, and see if that resolves your issue.
You're welcome! 😄 |
Beta Was this translation helpful? Give feedback.
All reactions
-
Well, not for long, as I want to make a permanent mount in a waterproof case soon! If it is a H/W issue, it must be with the USB soundcard. I have a White UGREEN I can try as well, and see if it improves the boot-up behavior. I did have another thought along the "hardware" line. I know that @DD4WH has mentioned that birdnetpi only does recognition of a mono signal. Is that signal ALWAYS the TIP to ground signal of the 1/8" jack, or does it switch occasionally to the RING to ground signal? The RING terminal is currently "unconnected", which is how I interpreted the directions.
OK, so yesterday, I went to the older model and all was well. Then I switched back to the new model, and everything was fine. No idea why it was giving me the recognition of things from all over the place. I AM doing the recommended test from above anyway, and here are the results (Lat/Lon have been obscured):
To me, this all looks good for species that I'd expect to be possible in my area (I've been an avid birder for more than 25 years, and have lived in the same area all my life, so I'm pretty familiar with what to expect here.
I don't think it's a microphone issue--I think it's now MUCH more interesting. Here's why: I poked a port forwarding hole in my router so that I could get to the birdnet webpage from the internet (after securing the Tools page with a new password!).
|
Beta Was this translation helpful? Give feedback.
All reactions
-
Okay that is interesting, and I'm not really sure how to interpret this... there should be absolutely no difference between the internet page and the local page. Does this behavior persist even when you refresh the two pages a few times? i.e. it's not a fluke? The reason I ask is that you saying that you "SOMETIMES get more than a blank purple page" indicates to me that your And I know you said you don't think it's a hardware issue, but my reasoning for going down this line of inquiry is that you're on a completely fresh install, which we know for 99.99% of users doesn't have this issue. So that rules out the software being the problem in my mind. (of course I may be biased because I helped build the thing, heh). Could you do me a favor and run the following command on your Pi and paste the output here? There may be some clues hidden in the logs. Make sure to censor any IP addresses you don't want to show:
Also I'm sorry but I don't know the answer to your question about the wiring of the mics. There are some pics in that thread somewhere or how it's all supposed to be wired up. |
Beta Was this translation helpful? Give feedback.
All reactions
-
Yes, it "persists" in that sometimes, I get the 15 second snapshot, and under as-yet-undetermined situations I get the blank purple page, with the labels when it gets a match. See the screenshot attached, which shows that today, we're back in "screenshot" mode. I guess I should mention that I have been unplugging the microphone from the USB soundcard but NOT unplugging the USB soundcard from the Pi. I've been doing this as I don't yet have my permanent installation setup and I'm running a short microphone cable out the sliding door. I'm wondering if somehow the UGREEN sound card is doing something (as I know some of these jacks have a switch that flips when a plug is inserted). Not sure, but something to consider.
I've ordered a couple more UGREEN sound cards and more 1/8" plugs to make more microphones (I have plenty of capsules), so I can do more testing when those arrive.
Here's the output, after a very recent reboot. I did the reboot to see if I still get "snapshots" on the birdnetpi.local page, and I am. Also, I don't seem to be getting LIVE audio again, even on the "internet page". I'm going to go plug and unplug the USB sound card to see what it does (this will be done AFTER the log below was taken). Last login: Tue May 2 16:41:10 2023 May 02 16:41:10 birdnetpi caddy[883]: {"level":"info","ts":1683060070.3124866,"msg":"using provided configuration","config_file":"/etc/caddy/Caddyfile","config_adapter":""} ========== birdnet_analysis status ========== May 02 16:45:48 birdnetpi systemd[1]: Started BirdNET Analysis. ========== birdnet_log status ========== May 02 16:40:54 birdnetpi systemd[1]: Started BirdNET Analysis Log. ========== birdnet_recording status ========== May 02 16:41:13 birdnetpi systemd[1]: Started BirdNET Recording. ========== birdnet_server status ========== May 02 16:45:15 birdnetpi python3[375]: READING AUDIO DATA... DONE! READ 5 CHUNKS. ========== birdnet_stats status ========== May 02 16:40:54 birdnetpi systemd[1]: Started BirdNET Stats. ========== chart_viewer status ========== ========== extraction status ========== May 02 16:43:36 birdnetpi env[4662]: Line = 2023-05-02-birdnet-16:43:13.wav.csv ========== web_terminal status ========== May 02 16:40:54 birdnetpi systemd[1]: Started BirdNET-Pi Web Terminal. ========== spectrogram_viewer status ========== May 02 16:40:54 birdnetpi systemd[1]: Started BirdNET-Pi Spectrogram Viewer. ========== livestream status ========== May 02 16:41:42 birdnetpi livestream.sh[1270]: [mp3 @ 0x5593824990] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 1340641 >= 1329722 ========= Syslog snippet ========== ========== Memory Usage ========== ========== Load Averages ========== ========== CPU Info ========== processor : 1 processor : 2 processor : 3 Hardware : BCM2835 ========== System Temperature ========== ========== Extra Info ========== SHELL=/bin/sh 17 * * * * root cd / && run-parts --report /etc/cron.hourly ========== Connected Microphone Devices ========== null ========= Date and Time ==========
|
Beta Was this translation helpful? Give feedback.
All reactions
-
OK, I think I did track down a hardware problem. Both the black AND the white UGREEN interfaces would occasionally (especially after running for a while), start popping and cutting out. I think both are marginal at best. A brand new BLACK UGREEN ran for 36 straight hours without issue. I'm closing this issue now. Thanks @ehpersonal38 for helping me get my system up and running. It has been most enjoyable to hear the wave of warblers starting to arrive here in the Midwest this year! |
Beta Was this translation helpful? Give feedback.
-
Hello,
I FINALLY got my birdnet-Pi up and running after having set it aside during fall and winter (real life intruded).
Config: Running a Pi 4, with 4GB.
Started with the BirdNET-Pi_v14.2 Image.
Did apt get update / upgrade on command line
Did a Tools->System Controls->Update (I probably should have just done a fresh Raspberry Pi OS install and the curl install of Birdnet, but I didn't).
Am using Frank's Solder your own Microphone Thanks Frank!
Using the Black UGREEN USB soundcard on an 2.5 meter USB extension and a very short (20cm) shielded audio cable for the mic.
However, I'm still not at a reliable setup. So, here are a few questions to help me figure out the issues.
I'm not getting a very reliable Wi-Fi connection, even though the Pi is now CLOSER to my router than when I tested on the bench. Not sure why. Also, I noticed that it did NOT reconnect to my router after the router was power-cycled. I'm trying a bash script and crontab entry to reconnect--is there a better way now?
On some power-ups, I don't appear to be getting audio. If I unplug and replug the Black UGREEN USB soundcard, it seems to come back. What /dev/ device should be showing up? I'm not seeing /dev/audio which I expected. Is there some other thing I should be looking for on command line to help debug?
How can I make sure it is selecting the correct audio device and that audio is actually getting to the recognition system?
I can't seem to hear the live audio on either iPhone in Safari or on Chrome on Win 10 (haven't tried under Ubuntu yet). Any ideas? The system IS getting detections and they are appropriate (i.e. it matches things I'm seeing), HOWEVER, when I playback the audio samples of detections, many times I cannot hear the bird that BIRDNET detected IN THE RECORDING, but I do know that bird was singing.
I can't seem to change the "playback speed" back to 1x nor can I click the gray PLAY button in the upper right corner on Chrome. Any ideas?
I DO have working apprise notifications via Discord to my personal server and those are GREAT! I would like to change the formatting to potentially use markdown instead, so that the species name stands out a bit more, and maybe I can put a blank line at the end so that I can have some whitespace between detections. Any pointers on where I can look to customize Apprise notifications, or potentially switch to another notification service to get slightly better looking notifications?
Is there anywhere that I can get an overview of the structure of Birdnet, as far as all the services, scripts, and other code, as far as it's purpose and how it all fits into the system? I'm reasonably conversant in Linux/Unix and bash, and can make my way through most other types of code, with a bit of googling :-).
Thank you in advance for the help!
Beta Was this translation helpful? Give feedback.
All reactions