iot-curriculum/labs/digital-agriculture/plant-monitor
Jim Bennett 5e4dced27b Updating tracking codes 2020-11-17 11:09:45 -08:00
..
Code Adding copyright notices 2020-09-02 17:19:56 -07:00
Images Moving images 2020-09-05 13:29:48 -07:00
Steps Updating tracking codes 2020-11-17 11:09:45 -08:00
README.md Updating tracking code to new format 2020-10-23 09:28:21 -07:00

README.md

Plant monitor

This workshop is a hands on lab for building an AgroTech solution using Azure IoT.

Author Jim Bennett
Target platform Raspberry Pi
Hardware required
Software required There are optional installs for Windows and Linux that you may need to install later to connect to the Pi, depending on which version of the OS you are using.
Azure Services
Programming Language
  • Python
Prerequisites You will need to be reasonably proficient at using a computer, including installing software and running commands from a command line or terminal.
These labs will use Python, but if you are not proficient in Python you can simply copy and paste the provided code and run it to see the end results, rather than trying to understand the code.

You will also need an Azure subscription
Date August 2020
Learning Objectives
  • Set up IoT Central
  • Send IoT Data from a device to IoT Central
  • Export data from IoT Central
  • Use Stream Analytics to send aggregate data for processing
  • Query Azure Maps for weather
  • Control IoT Central from Azure Functions
Time to complete 4 hours

The final project that will be created is an internet connected plant with environment sensors, that connects to a set of services that will store the telemetry data and predict the weather using Azure Maps. This weather prediction will be combined with soil moisture data, and used to send a signal back to the device to indicate if the plants need watering, and this will be indicated by an LED, lit if the plant needs watering.

Most of this implementation will use a no-code IoT platform called Azure IoT Central, an IoT Software-as-a-service (SaaS) platform. There will be some coding required for the connected device, and this will all be in Python.

Steps

  1. Set up the environment monitor

  2. Create the application in Azure IoT Central

  3. Write the code to capture telemetry from the Raspberry Pi

  4. Export IoT telemetry to Azure Event Hubs

  5. Create a storage account to store telemetry data

  6. Use Azure Stream Analytics to stream data into the storage account

  7. Create an Azure Function triggered by Azure Stream Analytics to check soil moisture

  8. Trigger an Azure IoT Central command if the soil moisture is too low

  9. Call Azure Maps to check the weather forecast before sending the needs watering command

  10. Summary

  11. Clean up

Clean up

Don't forget to clean up your Azure resources when you are finished, to avoid spending money, or using up your credit from your free subscription. All the instructions to clean up are in the Clean up you Azure resources guide.