Purpose and Scope


Bee Happy is a smart system designed in order to help the beekeeper in the managing both of the hive and the bees according to the status of the bees and the environment.

The system provides a set of features to monitor and manage the hive:

  • Sensors for temperature and humidity to enact grooming;
  • Regulation of food and sugar provided to the bees;
  • A camera to monitor the direction of the bees in case of swarms;
  • A smoke releaser in case the bees are not calm when the beekeeper is in loco.

The system is not an automated replacement of the beekeeper rather than a smart setup which can assist both amateurs and professionals.

Glossary


  • BH: Acronym for Bee Happy.

  • Hive: A contaier built with separate panels on which the bees can nest. An average hive usually contains from 10.000-20.000 bees during winter to 50.000-100.000 bees during summer. An hive is a very delicate ecosystem which greatly influenced by the environment around it.

  • Swarm: the Swarm behaviour, or swarming, is a collective behaviour exhibited by animals of similar size which aggregate together, perhaps milling about the same spot or perhaps moving en masse or migrating in some direction. In the case of bees, swarming can be critical to the safety of the hive: if too many bees swarm away from the hive, it could die, resulting in a great loss for the beekeeper and the environment.

  • Feeding the bees: bees need food, mostly sugar, and the beekeeper often needs to provide a solution of sugar and water to ensure the survival of the colony.

  • Override: to give priority to user commands over automated ones, in order to ensure that the beekeeper never loses control of the system.

  • SOC: acronym for System On Chip, it refers to a circuit or embedded device on which the system runs.

  • Daemon: a program which usually runs continuously in background, meaning that it doesn’t provide a direct user interface. We use a Daemon and a Server to be able to manage incoming request easily and reduce the complexity of our system, whose heart is the Daemon itself.

  • CGI: the Common Gateway Interface is a standard protocol that allows a webserver to execute console programs or scripts. In our case, the Nginx webserver uses a CGI to redirect the HTTP requests received towards a RESTful service.

  • RESTful service: Representational State-Transfer or REST is one way to provide interoperability between computer systems on the Internet. REST-compliant Web services allow requesting systems to access and manipulate textual representations of Web resources using a uniform and predefined set of stateless operations, meaning operations of which neither the sender nor the receiver retain the status.

  • OTS: Off the shelf.

  • Kotlin: A modern, open source language which runs on the JVM and that can be used as full replacement of Java on Android

ACTORS

  • User: the main user, owner of the system and the hive

System Requirements


Functional Area Description
1-USR user facilities
2-NOTIF notification sent by the system to user device
3-SNS sensing activity performed by the system on the hive
4-AUT autonomous activities performed by the system on the hive
5-COMM command sent by the user to the system controlling the hive
6-OVR facilities to override some features of the system remote or in loco
7-SET settings

Functional Requirements


  • 1.1 - User authentication: Authentication to the system is provided through a unique token user defined. It acts similar to a passhprase but doesn’t require any registration nor username. They are more disposable.

Priority 3

  • 1.2 - User interface: The system provides an interface to the user on a mobile device, using which the user can receive the data needed.

Priority 1

  • 2.1 - Swarm notification: In case the bees in the hive are swarming the system warns the user by a push notification on the phone.

Priority 1

  • 2.2 - Environmental notifications: On request, the system records and informs the user wheter it has regulated the temperature and humidity and how often, in order to provide some insights to the user.

Priority 1

  • 2.3 - Feeding notifications: The system notifies the user if and when the last feeding occurred.

Priority 3

  • 3.1 - Temperature and Humidity sensing: Through sensors the system monitors temperature and humidity and displays them on the user interface.

Priority 1

  • 3.2 - Swarm sensing: The system is able to detect whether the bees are swarming or not through noise sensors, if the noise is below critical levels.

Priority 2

  • 3.3 - Agitation sensing: Noise sensors are used to detect if the agitation of the hive is above critical levels.

Priority 3

  • 4.1 - Actuation of smoke release: When the bees agitation levels are critical, the systems activates a smoke releaser.

Priority 2

  • 4.2 - Grooming control: The system can affect the grooming behavior of the bees by modifying humidity inside the hive.

Priority 1

  • 4.3 - Swarm monitoring actuation: Swarm can be monitored using a camera which is activated as soon as a swarming behavior is detected.

Priority 2

  • 5.1 - Feed command: The user can send the system a command to distribute sugar and edibles to the bees. He can also schedule an automatic feeding.

Priority 2

  • 6.1 - Override facilties: The user can decide to override or temporarily shutdown some or all system features.

Priority 1

  • 7.1 - Language settings: The user is able to select the language of the interface.

Priority 5

  • 7.2 - Push notification settings: The amount of notification displayed to the user by the system.

Priority 5

Non Functional Requirements


Portability

  • 1.1 - User interface: BH requires an Android operating system.

Interoperability

  • 2.1 - Connectivity: The system needs to be connected to a wireless or mobile network. It can be provided by a 3g router or module, or it can directy be a Wifi network (especially in case of commercial indoor solutions).

  • 2.2 - Localization: No localization facilities are provided in order to maintain a lightweight system, given that hives must always be moved by the beekeeper himself.

Usability:

  • 3.1 - Language: User interface will be available in English and Italian.

  • 3.2 - System Working Condition: The system is always running but the user can interact with it only using a network connection.

Efficiency:

  • 4.1 - Space: The system is deployed in very little space inside the hive.

External Requirements:

  • 5.1 - Ethic: The system in no way endangers the bees.

  • 5.2 - Safety: Humidity, temperature and smoke sensors are kept within safety boundaries and each feature can be overridden by the user.

System Architecture


Architecture

Hardware Architecture


Hive

  1. A SOC system is connected to each sensor:
    • Temperature sensor
    • Humidity sensor
    • Noise sensor
  2. Webcam (Raspberry Pi Camera)
  3. Peristaltic Pump connected to a feeding bottle
  4. Air pump connected to a smoke releaser

Server

Raspberry Pi connected to the Internet via mobile network or Wifi.

User’s Smartphone

An Android device connected to the internet provides the front-end to the system.

Software Architecture


Android App

  • Functions:
    1. Storage of hive addresses as IDs
    2. Http Asynchronous requests to the server
    3. Display of monitoring information about the hive
    4. Allows the end user to interact with the hive remotely
  • Runs on Android 5.0 or higher.

  • Interacts with the end user and the server.

Server

  • Functions:
    1. Load balancing of app requests
    2. Parsing of the HTTP requests coming from the Daemon and the app
    3. RESTful API provided with Flask
    4. CGI serialization of HTTP payloads towards the RESTful service
  • Runs on the Raspberry Pi.

  • Interacts with the Android app and the Daemon.

Daemon

  • Functions:
    1. Polling sensors for data
    2. Data storage and processing to obtain useful statistics
    3. Comunication of processed data to the Server
    4. Response to Server requests by providing data or activating features
    5. Control of automated features such as feeding, swarming control, smoke release
  • Runs on the Raspberry Pi.

  • Interacts with the server and the sensors.

Network Architecture


  • Inside the hive, sensors and actuators are wired to the Raspberry Pi which provides the Server and the Daemon
  • Unix pipes connect the daemon and the server, that run on the same machine.
  • The Android app and the server are connected through a Wifi or mobile network.

Hardware Components


  • OTS
    1. Raspberry Pi
    2. Temperature and Humidity sensor
    3. Peristatic pump for the feeding system
    4. Air Blower for the smoke generator
    5. Raspberry Pi Camera for swarming control
  • Self made
    1. Smoke generator (Air blower, relay module, 500 mOhm resistor, pipes)
    2. Microphone module (Microphone, self-built preamp circuit)
    3. Feeding system (Peristatic pump, bottles and pipes)

Software Components


  • Raspbian Linux on a Raspberry Pi
  • Python3
  • Nginx webserver
  • Python Flask and Flask-RESTful
  • an Android smartphone
  • Kotlin for the Android app
  • Android-Async-Http-Client Java library
  • fswebcam

Open Issues


  • Smoke generator system.
  • Case studies of wireless technologies for open rural areas.