This repo supports creation of a fleet of systems for the Motus acoustic monitoring project.
TLDR: A Raspberry Pi records from a USB AudioMoth and uploads files to an Amazon S3 bucket where a machine-learning pipeline extracts bird night-flight calls.
- ffmpeg: recording, resampling and compressing audio
- AWS client: uploading files to an Amazon S3 bucket
- shiftwrap: scheduling recordings
- ampi: in-field configuration via bluetooth, live listening, superglue
- fleetsie: provisioning a fleet of devices
- zabbix: fleet monitoring
- sqlite: device config storage (on device); fleet config storage (on server)
These are saved within the fleetsie framework, in my_work/part_2/opt/fleetsie/custom_pre,
but symlinks from the top of this repo are included for convenience.
There is a google doc here that explains how to set up and configure an ampi device.
There is another google doc here which describes the device provisioning process in more detail.
You will need to clone https://github.com/jbrzusto/fleetsie
For this doc, we'll assume that fleetsie and ampi have been cloned into sibling directories (i.e. both directories
are in the same parent directory).
Run this command:
cd PATH_TO_AMPI
../fleetsie/fleetsie_srv USER@SERVER
../fleetsie/fleetsie_gen FLEET_NAME SERVER 100 sda1
ssh USER@SERVER
# remaining commands are run on the server
# fill in amazon credetentials in these commands before running them
cat > /tmp/awscreds.txt <<EOF
mycreds_amazon_secrets.txt
BUCKET_NAME=my-bucket-name
AWS_ACCESS_KEY_ID=my-aws-access-key-id
AWS_SECRET_ACCESS_KEY=my-aws-secret-access-key
EOF
X=`cat /tmp/awscreds.txt | tr '\n' ','`
sqlite3 ~fleetsie/fleets/FLEET_NAME/fleet.sqlite "insert into fleet_extra(fleet, extra) values ('FLEET_NAME','$X')"