Creating a new home security dashboard

In Chapter 9, Building a Home Security Dashboard, we created a home security dashboard using CherryPy. The power behind the IoT is the ability to build an application with devices, located anywhere in the world, that are connected to each other. We will take this idea to our home security dashboard. If not already assembled, build the home security dashboard with the temperature sensor from Chapter 9, Building a Home Security Dashboard:

  1. We will start our code by encapsulating our sensory data in a class container. Open up Thonny and create a new file called SensoryData.py:
from gpiozero import MotionSensorimport Adafruit_DHTclass SensoryData:    humidity=''    temperature=''    detected_motion=''     dht_pin = ...

Get Internet of Things Programming Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.