A beekeeping IOT project: A/V streaming and sensor monitoring of hive activity.
cd /Volumes/boot
touch ssh
to enable SSH access/Volumes/boot
), create a wpa_supplicant.conf
file, replacing the ssid and psk with the WiFi name, password, and security method as appropriate:country=GB # Your 2-digit country code
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
network={
ssid="YOUR_NETWORK_NAME"
psk="YOUR_PASSWORD"
key_mgmt=WPA-PSK
}
Unmount (software eject) the SD card
Remove the microSD card from your computer
Ensure all required hardware (Pi camera, microphone, environment sensors) are connected to the Pi
Insert the microSD card into the Raspberry Pi and power it on
SSH into the Raspberry Pi to confirm it is connected
arp -a
on your computer to help find the Pi on the networkPi setup to run A/V streaming and environment sensing is automated using Ansible.
Ansible runs on your computer and connects to one or more Pis remotely, and ensures that the hive software is installed and running on each Pi.
sshpass
sudo apt-get install sshpass
brew install hudochenkov/sshpass/sshpass
cd deployment/hives
python3 -m venv ansible && source ansible/bin/activate && pip3 install -r requirements.txt
source ansible/bin/activate
to activate the virtualenv and make Ansible availabledeactivate
to deactivate the virtualenv when doneSee the Python documentation for more information on creating virtual Python environments.
Configurations for hive Pis are kept in deployment/hives/inventory/static.yml
.
In the first instance, the static.yml
file will need to be created. Copy static.example.yml
in the inventory folder to static.yml
and edit accordingly: see the comments in the example file.
In a terminal on your computer:
# Activate the virtualenv if not done already
source ansible/bin/activate
# Run the playbook
# Assuming an inventory of Pis has been set up at inventory/static.yml
# see inventory/static.example.yml
ansible-playbook -i inventory/static.yml -v playbooks/hive.yml