PilotB, Remote Data Collection Using UAV
The pilot concentrates on collecting data using IoT devices from an unmanned aerial vehicle (UAV). Originally, the pilot covered investigations of both moving sensor tags on animals and stationary environmental sensors. As sensors for animals were not feasible to deploy due to battery life, Pilot B has focused on environmental sensors.
The sensors, created under the AGILE project are capable of measuring temperature, humidity, GPS position and radio signal quality and are portable (and could be placed on moving objects).
The App has the following steps/parts in order to collect, visualize and off-load sensor data:
- [Sensor HW] Collect sensor data
- [Sensor HW] Send data over loRaWAN
- [LoRaWAN GW and App-Server] Handle LoRaWAN traffic locally when not connected, pair the LoRaWAN sensors.
- [MQTT Broker] Post sensor data to the AGILE GW
- [AGILE] Subscription to MQTT for sensor data
- [AGILE] Auto-registration of sensor devices
- [AGILE] Receive sensor data
- [AGILE] Persistance and encryption of sensor data
- [AGILE] Visualization of sensor data
- [AGILE] Off-load sensor data to the cloud
The hardware requirements are split between that on the drone, and the hardware used for sensors.
Drone GateWay Hardware
For the drone, we choose one of our existing models, integrating the Agile GW for collecting sensor data.
Each sensor node is a small LoRaWAN node that wakes up periodically, makes a few readings, and sends the values to the drone.
- Seeeduino LoRaWAN - Arduino board with integrated LoRaWAN and Battery management.
- GPS, temperature and humidity sensors on board
Development Step by Step
Development for the Agile GW is mostly done directly on the Raspberry PI. The Sensor nodes are developed using Arduino IDE.
- Setup Raspberry
- The Raspberry PI should be setup using a standard LITE image (without UI) 
- Install docker
curl -sSL https://get.docker.com | sh
- Install git
apt update && apt install -y git
- Setup/Build LoRaWAN stack
Run the following on the RPI:
git clone https://github.com/skywatch-jtv/agile-lorawan-support cd agile-lorawan-support docker-compose run
First-time invocation takes a long time, as docker needs to build several images from scratch.
Note that Raspberry PI thermo throttles if it is getting hot, prolonging build time.
Once the composition has started, the app-server should be available at http://<rpi ip>:8080
- Setup Sensor Node
- On the PC, make sure you have Arduino IDE installed, then clone https://github.com/skywatch-jtv/agile-lorawan-support
- Open the code under Seeeduino-Node
- Modify the code to suit your array of sensors
- Upload code to the Seeeduino node
- Test LoRaWAN infrastructure
Configure the nodes with pass phrases inside TTN (the things network) and check debug trace for receiving messages on LoRaWAN.
- Setup Agile GW stack
- Integrate LoRaWAN stack into Agile GW
Add the docker installation by editing the docker-compose.yml fil located in the home directory.
- Configure/Program Agile GW
Use Agile UI to select which records that are to be stored locally and at what retention level.
Agile cloud storage can be used, by selecting sensor and date/time for export.
This pilot has used OwnCloud on another computer to offload data from the Agile gateway.
- AGILE Getting Started
- GIT Repository for LoRaWAN stack and example sensor node
-  Docker images related to Agile