# An Internet of Things-Based Low-Power Integrated Beekeeping Safety and Conditions Monitoring System
## 2 Related Work on Internet of Things (IoT) Beehive Incident Response and Management Systems
### IoT Beehive Conditions Monitoring Systems
The automated beehive cells transmit their data to the central hive, using wireless low power, low throughput, and short distance RF technologies [31; 32], described in the communication protocols section that follows. The central hive is responsible for recording sensory data, forwarding incidents from the other automated beehives, as well as performing per beehive actuator control based on environmental conditions. Data transmissions, notifications forwarding between the central hive and the cloud information system, is performed using the chirp spread spectrum LoRaWAN class-A specification [33] for long-range low-power communications. That is, transmitted data is stored to intermediate LoRaWAN gateways [34] prior to submission to the appropriate cloud data logging service via MQTT. LoRaRAN gateways are the IoT IBSMC system backbones and have to be installed and maintained throughout the area of interest or the beekeeping migration areas. The LoRaWAN gateways are placed in locations of uninterruptible power supply and Internet connectivity. LoRaWAN gateways are responsible for the beehive arrays authentication and data forwarding to the appropriate IBSMC cloud service. LoRaWAN mechanisms such as over the air activation (OTAA), statically set AES-128 app-key join authentication, payload encryption and adaptive data rates functionality (ADR) [35; 36], have been preferred over custom LoRa-based protocols, due to easy to maintain implementations and scalability features [35; 37]. Furthermore, LoRaWAN presents higher probability of success over distance,  
Figure 1: Architectural structure of the proposed Integrated Beekeeping active Management and conditions Control System (IBSMC) system. less jitter and at least 20-50 times less energy consumption in comparison to IEEE802.15.4 and ZigBee devices already used in many IoT paradigms [34; 36; 38; 39]. Regarding IoT data security in LoRaWAN OTAA mode, symmetric encryption AES-128 is used. The devices motes themselves generate and exchange with the LoRa server, the network session, and application session keys during the OTAA join request phase, using an AES-128 commonly shared application key stored both at the LoRaWAN server and motes. The integrity of those key exchange messages is assured with an AES 128-CMAC process (MIC generation) that includes devEUI values, a frame counter value and a nonce value. Data encryption between automated beehive cells and the central hive is performed with the use of an AES-128 symmetric encryption algorithm and a common node pre-shared encryption key for all the beehive array cells. The usage of a static encryption key can be replaced in the future with a more adaptive authentication and key exchange mechanism similar to that in reference [40]. Furthermore, AES-128 data encryption delays can be improved with a more efficient symmetric encryption algorithm, such as Twofish for IoT implementation, as mentioned in reference [41], or TEA(XXTEA), as implemented for IoT devices by the authors in reference [42]. * A cloud-based Information System for Management and Control of Apiaries (ISMCA) is offering cloud services for logging of conditions (logging service) and store-forward of notifications-alerts (push notifications service) of beehive arrays. These services exchange data over TCP/UDP-based communication protocols with the beekeeping arrays LoRaWAN gateways. That is, MQTT/TCP protocol [43] is used as the transport medium for sensory data by the gateways, and CoAP/UDP protocol [44] for the data transmission of control signaling to the beehives, from the server to the central hive via the gateways. Both protocols have been selected for their IoT performance characteristics in terms of asynchronous functionality and low throughput footprint [45; 46]. ISMCA systems also implement a LoRaWAN server functionality [33; 34] for the purpose of authenticating gateways and nodes of each beekeeping arrays central hives, responsible for the cloud data exchange of each array. The Over-The-Air-Activation (OTAA) method is used for LoRaWAN node joins.