Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hectorta1989/serverless-security-camera
https://github.com/hectorta1989/serverless-security-camera
camera ifttt-webhooks messagebroker mqtt serverless
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/hectorta1989/serverless-security-camera
- Owner: HectorTa1989
- License: apache-2.0
- Created: 2023-03-25T21:00:55.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2023-03-25T21:02:38.000Z (almost 2 years ago)
- Last Synced: 2024-11-10T09:29:47.367Z (3 months ago)
- Topics: camera, ifttt-webhooks, messagebroker, mqtt, serverless
- Language: Jupyter Notebook
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Security: SecurityClient.ipynb
Awesome Lists containing this project
README
# Serverless security camera
The goal of the project is to develop an application for the communication of one or more sensors with a broker of messages through the MQTT protocol, the analysis of data and the notification of the end-user if a particular condition is met.## Overall architecture
The project can be divided into 3 main parts:
* Sending client
* Message broker
* Receiving clientA sending client (CameraClient) sends frames to topics of the broker in specific time slots. On the other side, two receving clients (MonitorClient, SecurityClient) subscribe to those topics and receive the information. The SecurityClient analyzes the image and detects the number of faces. This information is sent back to the message broker which triggers the [IFTTT](https://ifttt.com/) API and send a notification to the Telegram chat of the user.
### Camera client
The Camera client is made in Python 3.6 and uses the library [pika](https://pypi.org/project/pika/) to establish a connection with the message broker.
The client uses the camera of the computer to register the video stream and, from all the frames deteced in the stream, send some frames to the message broker in two different topics, "view" and "security", according to the future use. The number of frames sent in the two streams is different.
### Message broker
The technologies involved to develop the message broker are Nuclio, RabbitMQ and Docker in a Linux environment.
We used Docker as a container, and Nuclio and RabbitMQ to set up the infrastructure to manage the MQTT messages.
The message broker also is responsible for the communication between the Security client and the IFTTT WebHooks.
### Monitor client
The monitor client subscribes to the topic "view" using pika and shows the corresponding frames in a video.
### Security client
The security client subscribes to the topic "security" using pika and analyzes the frames to recognize the number of faces present in the image. Each time it recognize any face, it sends a message to the broker which triggers the IFTTT WebHooks API.
### IFTTT WebHooks
To make this part to work, it is needed to create an applet. Log in with your account and select "New Applet". Select as "this" condition the WebHooks and as "that" condition the one you prefere. We used a Telegram chat notification.