Sunday, 17 December 2023

BirdNET-Pi: direct file editing

I've been editing files on my BirdNet-Pi systems via my laptop.

This post just describes the procedure I use.

There are any number of ways of approaching this, but basically I do this:-

  • connect to file system via network using laptop file manager
  • open/edit/save file via laptop editor
  • reboot BirdNET-Pi
  • test changes

...and in more detail for most files, except those owned by root:-

  1. Check that Linux laptop can 'see' BirdNET-Pi on home network; e.g. use web browser to view interface (I currently have a network issue where I can't always see the system if I'm using the same AP but on different frequency bands!)
  2. Open laptop file manager and select Connect to Server; on my file manager (Nemo) this is in the File menu.
  3. Enter details for your BirdNET-Pi; Port:22, Type:SSH, Folder:/home/{your name}, User Name:{your user name}, Password:{your password}
  4. If this works you should see the BirdNET-Pi file system including folders; BirdNET-Pi, BirdSongs, .cache & so on
  5. Bookmark this connection for the next time!
  6. Select file to open/edit with text editor (Geany is a great choice); the BirdNET-Pi/homepage folder contains .php & .css files which may be of interest and the BirdNET-Pi/scripts folder contains more .php, .py & scripting stuff
  7. Save any changes, exit the file and close the editor
  8. From the BirdNet-Pi web interface select menu Tools > Reboot
  9. Wait a minute or so for BirdNET-Pi to reboot, then check system via web interface.

Note: as usual I'll say: "I'm not your mummy, so you figure out the risks!"


For files belonging to root (e.g. wpa_supplicant) open a terminal on Linux laptop:-

  1. at the prompt type: ssh {name}@birdnetpi and enter password when prompted.
  2. type: ls -l to see where you are in the file system
  3. if your looking for wpa_supplicant.conf type: cd /etc/wpa_supplicant then: ls -l
  4. Use whichever hideous line editor you prefer; e.g. type: sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
  5. when you've done tinkering you can reboot BirdNET'Pi from the laptop terminal by typing: sudo shutdown now -r
  6. once again, wait for system to reboot then test changes
That's it!

No comments:

Post a Comment