Config files for deploying BirdNET-Pi in field


/etc/wpa-supplicant-wlan0.conf

Rename original file

Install this first - autoAP

  GNU nano 5.4                   wpa_supplicant.conf *
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
ap_scan=1

network={
        ssid="BirdNET"  # This is a guest network on my home router
        psk="secretpwd"
        key_mgmt=WPA-PSK
        id_str="Home"
        priority=20
}


network={
        ssid="WildBirds" # This is the AP that the Pi will set up
        psk="reallysecretpwd"
        key_mgmt=WPA-PSK
        mode=2
        id_str="BirdNet"
        priority=10
}

/etc/rc.local

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
  printf "My IP address is %s\n" "$_IP"
fi

vcgencmd display_power 0 # shuts down HDMI after boot - it takes a minute to shut down

bash /usr/bin/ups.sh &  # PIJuice
sudo hwclock -s  # syncs RTC on PiJuice with RPI
sudo shutdown -h +120 # shuts down Pi 120 minutes after boot
exit 0


crontab

I use bnet.temps.py to log Pi temps, but because I can change the measurment frequency, it also provides a good proxy for when the Pi is shutting down and starting back up.


@reboot /usr/bin/python3 /home/AzureBovine/wakeup_enable.py  # this is part of PiJuice install
                                                            # needs to be executable and have owner changed
@reboot /usr/bin/python3 /home/AzureBovine/bnet_temps.py  # a script for monitoring Pi temps

WittyPI4 config

Install from here

Ran /uwi/diagnose.sh which picked up the correct ip number but then had to change the port to :8001 from :8000 because birdnet had other stuff running on :8000

/uwi/uwi.conf

README='This configuration file will be used by BASH and Javascript file.';
README='Please make sure to use syntax that supported by both languages.';

host='192.168.50.2';  # ip of the pi - diagnose.sh will figure this out for you
port=8001;  # BirdNet is using 8000
web_socket_url='ws://'+host+':'+port+'/';
response_timeout=5000;
reconnect_timeout=1000;
debug=0;

wittypi3='/home/pi/wittypi';
wittypi4='/wittypi';  # Had to edit the path to wittypi4 folder because of nonstandard install
zero2go='/home/pi/zero2go';
mega4='/home/pi/mega4';
pgnano='/home/pi/pgnano';

Scheduling app for WittyPi4

http://192.168.50.2:8001/wittypi4/ # Url for wittypi control app - change ip number to match your setup if you don’t run diagnose.sh. You’ll still have to manuall modify the port to something other than :8000

If you are accessing the Pi through the AP you’ll have to change the host to 192.168.16.1 in uwi.conf to access the control app through a browser.

It was easier to do sudo /wittypi/wittyPi.sh and make changes there. I could still paste pre-saved schedules through that interface.

The following schedule starts @ 0615 on Jan 10 On for 2 hrs & 15 min - then off for remainder of day. Repeat until Feb 28

# Turn on 0615 - off @ 0830
BEGIN 2023-01-10 06:15:00
END   2023-02-28 09:00:00
ON    H2 M15
OFF   H21 M45