harryjubb / bee_iot

Beekeeping IOT project
http://centaurea.land
MIT License
31 stars 2 forks source link
beekeeping docker iot python3 raspberry-pi

Bee IOT

A beekeeping IOT project: A/V streaming and sensor monitoring of hive activity.

Setup

Hive Pi setup

Prequisites

Write a Raspberry Pi OS Image

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
}

Set up Ansible for deployment

Pi 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.

Requirements
Setup
python3 -m venv ansible && source ansible/bin/activate && pip3 install -r requirements.txt

See the Python documentation for more information on creating virtual Python environments.

Set up the Ansible inventory file

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.

Running

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