Smart Cities - BirdNET-Pi Project: Difference between revisions
Jump to navigation
Jump to search
| Line 75: | Line 75: | ||
* Most Bird NET Pi systems are available through [https://app.birdweather.com/stations/428 Bird Weather] | * Most Bird NET Pi systems are available through [https://app.birdweather.com/stations/428 Bird Weather] | ||
* Adam has also made his Bird NET Pi installation directly available on the internet [https://birdnet.bobblybook.com Online example of Raspberry Pi Bird NET Pi] | * Adam has also made his Bird NET Pi installation directly available on the internet [https://birdnet.bobblybook.com Online example of Raspberry Pi Bird NET Pi] | ||
= Microphone installation for testing = | = Microphone installation for testing = | ||
Revision as of 17:03, 6 March 2023
BirdNET-Pi Course Overview
Overview
- BirdNET-Pi uses a USB microphone connected to a Raspberry Pi to record and identify bird calls.
- The system runs 24/7 and can upload data in real time to https://app.birdweather.com
- Data can also be downloaded via an API so that you can do some additional data processing using Node-RED.
Learning Objectives
- Learn about the important role of vegetation in supporting small birds
- Learn how to install BirdNET-Pi on a Raspberry Pi 4
- Learn how to interpret data from a local installation of BirdNET-Pi
- Learn how to use an API to retrieve data from the BirdNET-Pi installed in Bundoora
Small Birds
- Small birds need protection from thick scrubby vegetation so they can build nests and also hide from larger birds.
- Examples of small birds include:
- White-browed Scrubwrens
- Brown Thornbills
- Spotted Pardalotes
- Willy Wagtails
- Yellow Robins
- Golden Whistlers
- Eastern Spinebills
- Grey Fantails
- Government agencies, conservation groups and schools are working together to plant more shrubs and bushy vegetation to encourage small birds to come back to our local parks.
- There is also a documentary you can watch on ABC iView called The Secret Lives of our Urban Birds. Start at the 41 minute mark to see the section on Noisy Minors.
https://www.abc.net.au/catalyst/the-secret-lives-of-our-urban-birds/13734884
- Friends of Darebin Creek - Small Woodland Birds
http://friendsofdarebincreek.org.au/wp-content/uploads/Small-Woodland-Birds-V2.pdf
Hardware requirements
- Raspberry Pi 4 or Pi 3 B+.
- USB Microphone - (e.g. Gyvazla USB Microphone Lavalier Clip-on Omnidirectional Condenser Microphone for Computer)
- Heat sink and fan for Raspberry Pi. Optional, but highly recommended because it will keep the processor temperature less than 40degC and prolong the life of your Raspberry Pi.
Full Installation instructions
- Installation instructions are also available from the creator of BirdNET Pi (Patrick McGuire) - Lite version (no GUI interface)
https://github.com/mcguirepr89/BirdNET-Pi/wiki/Installation-Guide
Bird NET Pi - Adam's system
- Most Bird NET Pi systems are available through Bird Weather
- Adam has also made his Bird NET Pi installation directly available on the internet Online example of Raspberry Pi Bird NET Pi
Microphone installation for testing
- Plug the microphone into the USB 3.0 port.
- The USB 3.0 plug is coloured, either blue or yellow.
Microphone final installation
- The microphone needs to be installed on the exterior of the house to receive bird calls.
- Open a window and place the microphone in a sheltered location under and eave so that the microphone doesn't get wet.
- Use sticky tape to attach the microphone to the house.
- Close the window carefully so that the cable connected to the microphone is not damaged.
Installing the BirdNET-Pi app
- Open the Terminal
- Enter the following code curl -s https://raw.githubusercontent.com/mcguirepr89/BirdNET-Pi/main/newinstaller.sh | bash
- The code was obtained from this site https://birdnetpi.com
- If prompted, answer Y (yes) to any questions.
- The installation will take approximately 15 minutes.
- The Raspberry Pi will reboot once the installation is complete.
Demonstrating BirdNET-Pi
- In this example, the installation will be reachable at "http://birdnetpi1.local",
- Open up a Web Browser on any computer on the same local network as the Raspberry Pi running BirdNET-Pi
- This will open up the BirdNET-Pi Home Page.
Checking microphone settings
- In the main menu select Tools
- You will be asked to enter a username and password.
- The username is birdnet
- The password is empty. You can change this later.
- Click on Web Terminal
- Enter alsamixer -m to enter the ALSA sound mixer.
- The -m option permits "mouse" mode.
Swap file expansion
[Expanding the swap file on the Raspberry Pi]
Testing a Bird Call
Maintenance Requirements for BirdNET-Pi
- General maintenance requirements are explored in this Dropbox video https://www.dropbox.com/s/vpv6z15gsozkqvn/video1668020945.mp4?dl=0
- Restart BirdNET-Pi Raspberry Pi once per week.
- Monitor temperature of Raspberry Pi to check to see if it has been throttled due to exceeding 60degC.
- Check to see if the Micro SSD card is full.
- Complete any updates.
BirdNET-Pi API
- BirdWeather has an API in place and the BirdWeather (web) App makes use of it in producing the results seen via the web page portal.
- Documentation is here - [1] https://app.birdweather.com/api/index.html
- There is also an online query tool for testing queries here - https://app.birdweather.com/graphiql
Example Python code
- This is a simple python program that will return some BirdWeather results from station 273 (my station in Bundoora, Victoria Australia)
- Here is the Python code that can be copied.
import requests
import json
query = """query{
station(id: "273") {
id
location
name
topSpecies {
averageProbability
species {
id
commonName
scientificName
}
}
}
}"""
url = 'https://app.birdweather.com/graphql'
r = requests.post(url, json={'query': query})
#print(r.status_code)
#print(r.json())
data_json = json.dumps(r.json())
print(data_json)
- The output is shown in the Python Shell.
- The data is in JSON format
- Copy this output and paste it in JSONviewer to make the data human readable https://jsonviewer.com
- The data should be similar to the screen shot below.
BirdWeather online GraphiQL tool
- An online query tool for testing queries at this URL - https://app.birdweather.com/graphiql
- An example output is presented for station 273.
- Use the online documentation to modify your query https://app.birdweather.com/api/index.html.
- This will help you understand how the API work.
- In this example below the wikipediaSummary has been added to the query.