Hands-On Edge Analytics with Azure IoT

Book description

Design, secure, and protect the privacy of edge analytics applications using platforms and tools such as Microsoft's Azure IoT Edge, MicroPython, and Open Source Computer Vision (OpenCV)

Key Features

  • Become well-versed with best practices for implementing automated analytical computations
  • Discover real-world examples to extend cloud intelligence
  • Develop your skills by understanding edge analytics and applying it to research activities

Book Description

Edge analytics has gained attention as the IoT model for connected devices rises in popularity. This guide will give you insights into edge analytics as a data analysis model, and help you understand why it's gaining momentum.

You'll begin with the key concepts and components used in an edge analytics app. Moving ahead, you'll delve into communication protocols to understand how sensors send their data to computers or microcontrollers. Next, the book will demonstrate how to design modern edge analytics apps that take advantage of the processing power of modern single-board computers and microcontrollers. Later, you'll explore Microsoft Azure IoT Edge, MicroPython, and the OpenCV visual recognition library. As you progress, you'll cover techniques for processing AI functionalities from the server side to the sensory side of IoT. You'll even get hands-on with designing a smart doorbell system using the technologies you've learned. To remove vulnerabilities in the overall edge analytics architecture, you'll discover ways to overcome security and privacy challenges. Finally, you'll use tools to audit and perform real-time monitoring of incoming data and generate alerts for the infrastructure.

By the end of this book, you'll have learned how to use edge analytics programming techniques and be able to implement automated analytical computations.

What you will learn

  • Discover the key concepts and architectures used with edge analytics
  • Understand how to use long-distance communication protocols for edge analytics
  • Deploy Microsoft Azure IoT Edge to a Raspberry Pi
  • Create Node-RED dashboards with MQTT and Text to Speech (TTS)
  • Use MicroPython for developing edge analytics apps
  • Explore various machine learning techniques and discover how machine learning is related to edge analytics
  • Use camera and vision recognition algorithms on the sensory side to design an edge analytics app
  • Monitor and audit edge analytics apps

Who this book is for

If you are a data analyst, data architect, or data scientist who is interested in learning and practicing advanced automated analytical computations, then this book is for you. You will also find this book useful if you're looking to learn edge analytics from scratch. Basic knowledge of data analytics concepts is assumed to get the most out of this book.

Table of contents

  1. Title Page
  2. Copyright and Credits
    1. Hands-On Edge Analytics with Azure IoT
  3. Dedication
  4. About Packt
    1. Why subscribe?
  5. Contributors
    1. About the author
    2. About the reviewers
    3. Packt is searching for authors like you
  6. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
      1. Download the example code files
      2. Download the color images
      3. Conventions used
    4. Get in touch
      1. Reviews
  7. Section 1: Getting Started with Edge Analytics
  8. Introduction to Edge Analytics
    1. What is edge analytics?
      1. Early computers
      2. The rise of the personal computer
      3. Peer-to-peer networks
      4. Cloud computing
      5. Edge computing
      6. Early IoT applications
      7. Edge analytics
    2. Applying and comparing architectures
      1. The standard IoT solution
      2. Edge analytics-based IoT solution
    3. Key benefits of edge analytics
      1. Privacy
      2. Latency
      3. Reliability
    4. Edge analytics architectures
      1. Basic edge analytics architecture
      2. Azure IoT Edge-based edge analytics architecture
        1. Understanding Microsoft Azure IoT
        2. Understanding Microsoft Azure IoT Edge
    5. Using edge analytics in the real world
    6. Summary
    7. Questions
  9. How Does IoT Edge Analytics Work?
    1. What are the components used in an edge analytics application?
      1. Basic edge analytics components
        1. Sensors
          1. DHT11 temperature and humidity sensor
          2. Soil moisture sensor
          3. Laser sensor
        2. Microcontrollers and computers
          1. The ESP8266
          2. Arduino
          3. PyCom boards
          4. The Raspberry Pi
          5. Personal computers
      2. Microsoft Azure IoT Edge components
        1. Devices
        2. Azure IoT Edge
          1. IoT Edge modules
          2. Azure IoT Edge runtime
          3. Cloud-based interface
    2. How do the components fit together?
      1. Connecting a sensor to the ESP-12F microcontroller
    3. More examples of real-world edge analytics applications
      1. KOM-MICS smart factory platform
    4. Summary
    5. Questions
    6. Further reading
  10. Communications Protocols Used in Edge Analytics
    1. Wi-Fi communication for edge analytics
      1. Understanding the RF spectrum
        1. VLF and LF
        2. Medium frequency
        3. High frequency
        4. Very high frequency
        5. Ultra high frequency
        6. Super high frequency
        7. Extremely high frequency
      2. What is bandwidth?
      3. Using Wi-Fi for our edge analytics applications
    2. Bluetooth for edge analytics communication
      1. What is Bluetooth?
      2. Enhancing our smart heater application with Bluetooth
    3. Cellular technologies for edge analytics communication
      1. The generations of cellular network technology
      2. What is 5G?
      3. How would 5G enhance our edge analytics applications?
    4. Long-distance communication using LoRa and Sigfox for edge analytics
      1. The Friis transmission equation
      2. Sigfox
      3. LoRa and LoRaWAN
    5. Summary
    6. Questions
    7. Further reading
  11. Section 2: Understanding Edge Analytics Technologies
  12. Working with Microsoft Azure IoT Hub
    1. What is Microsoft Azure?
      1. Cloud service providers
        1. Storage
        2. Processing
          1. Virtual machines
          2. Containers
          3. Serverless computing
      2. A look at Microsoft Azure
        1. Infrastructure as a service
        2. Platform as a Service
        3. Software as a Service
        4. Functions as a Service
      3. Setting up a Microsoft Azure account
        1. Exploring the Azure portal
    2. What is Azure IoT Hub?
    3. A quick tutorial on Azure IoT Hub
      1. Creating an Azure IoT Hub
      2. Connecting to Azure IoT Hub with the Device Explorer tool
      3. Creating simulated sensor data using Python
      4. Viewing usage from the Azure portal
    4. Summary
    5. Questions
    6. Further reading
  13. Using the Raspberry Pi with Azure IoT Edge
    1. Installing Azure IoT Edge on the Raspberry Pi
      1. Installing the Raspbian Stretch operating system
        1. Downloading and flashing Stretch
        2. Installing Stretch on the Raspberry Pi
      2. Installing libraries needed for Azure IoT Edge
        1. Installing the repository configuration
        2. Installing the Moby container runtime
          1. What is Moby?
          2. Installing Moby onto our Raspberry Pi
      3. Installing the Azure IoT Edge security daemon
    2. Connecting our Raspberry Pi edge device
      1. Creating an Azure IoT Edge resource
        1. Creating an IoT Hub
        2. Creating an Azure IoT Edge resource
      2. Connecting the Raspberry Pi
    3. Adding a simulated temperature sensor to our edge device
      1. Adding a module to our edge device
      2. Viewing telemetry data from our edge device
    4. Summary
    5. Questions
    6. Further reading
  14. Using MicroPython for Edge Analytics
    1. Understanding MicroPython
      1. Developing with Arduino C
      2. Developing with MicroPython
      3. MicroPython's REPL
        1. Installing MicroPython on an ESP32
        2. Using REPL with our ESP32
    2. Exploring the hardware that runs MicroPython
      1. Pyboard
      2. ESP8266
      3. ESP32
      4. Pycom WiPy
      5. Pycom LoPy
    3. Using MicroPython for an edge analytics application
      1. Connecting our edge device
      2. Writing the edge code
        1. Creating the edge device files
        2. Understanding the edge device code
      3. Creating the MQTT broker
      4. Creating our gateway (ESP32 LoRa)
        1. Creating the gateway files
        2. Understanding the gateway code
          1. LoRaMessage
          2. HeaterStatus
      5. Creating the dashboard
      6. Putting it all together
    4. Summary
    5. Questions
    6. Further reading
  15. Machine Learning and Edge Analytics
    1. Understanding machine learning and how it works with edge analytics
      1. Machine learning libraries and tools
      2. An example using OpenCV and the Raspberry Pi
        1. Running the code
        2. Explaining the code
    2. Using edge intelligence with microcontrollers
      1. Exploring the various models of camera-based microcontrollers
      2. Using machine vision to read a QR code
        1. Running the code
        2. Explaining the code
    3. Other offerings of machine learning and Azure IoT Edge
      1. Azure Machine Learning designer
      2. Azure IoT Edge custom vision
    4. Summary
    5. Questions
    6. Further reading
  16. Designing a Smart Doorbell with Visual Recognition
    1. Setting up the environment
      1. Understanding the application
      2. Setting up the development environment
        1. Creating a Python virtual environment
      3. Installing the required libraries
        1. OpenCV for Python
        2. face_recognition
        3. paho-mqtt
    2. Writing the edge code
      1. Creating the Face class
      2. Creating the Message class
      3. The Camera script
    3. Creating the Node-RED dashboard
      1. Adding the components
        1. The mqtt in component
        2. The function component
        3. The text dashboard component
        4. The audio out component
      2. Running the application
    4. Summary
    5. Questions
    6. Further reading
  17. Section 3: The Road Ahead
  18. Security and Privacy in an Edge Analytics World
    1. An overview of the Internet-of-Things security
    2. Types of attacks against our edge analytics applications
      1. Vulnerability issues
      2. Sniffing
      3. Spoofing
    3. Protecting our edge analytics applications
      1. Passwords and updates
      2. Cross-site scripting and phishing attack prevention
      3. Physical security
      4. Using SSL certificates
      5. Azure Security Center for IoT
    4. Monitoring and auditing our edge analytics applications
      1. Monitoring our edge analytics applications
      2. Taking an audit of our edge analytics devices
    5. Summary
    6. Questions
    7. Further reading
  19. What Next?
    1. Recapping what we have learned about edge analytics
      1. Chapter 1
      2. Chapter 2
      3. Chapter 3
      4. Chapter 4
      5. Chapter 5
      6. Chapter 6
      7. Chapter 7
      8. Chapter 8
      9. Chapter 9
    2. Looking at the future of edge analytics
      1. A day in the life of Oliver
      2. What will your future be like?
  20. Other Books You May Enjoy
    1. Leave a review - let other readers know what you think

Product information

  • Title: Hands-On Edge Analytics with Azure IoT
  • Author(s): Colin Dow
  • Release date: May 2020
  • Publisher(s): Packt Publishing
  • ISBN: 9781838829902