O'Reilly logo

Raspberry Pi Blueprints by Dan Nixon

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Web applications

The security system will be based on a web application that will be used to record and view events from the sensors and will allow a configuration of sensors and alarms.

For this, we will use the Flask framework for Python, which was used in the previous chapter, and the MQTT protocol to establish communication between the sensors and web application. This protocol is a publisher and subscriber model, where clients can subscribe to information (topics) they are interested in and receive new data as it is made available (published) by other clients.

An overview of the structure of the web application is shown in the following diagram. As we did in the previous chapter, we will use the SQLite database engine:

Deploying our application ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required