This project was built as the final deliverable for our Embedded System course.
IntroductionSuppose parents want to know when their little children leave their homes or if the manager wants to know when employees arrive and leave their company and even the company is closed or no one is at home if someone intends to unauthorized entry, we will be notified by this project
Hardware Design:1) HR-SR501: we use this module to detect motion
2) Camera-pi: we use this module to take pictures
3)
4)
First we have to create a Telegram Bot. First you search @botfather in telegram app and follow this example for create one:
We have made this project through NodeRed. NodeRed does not have the camera and telegram nodes by default, and we need to install them before starting this project.
To install them follow these links:
After installing them, we start creating the project with NodeRed:
- Open the terminal and write:
node-red-start
- Enter the 127.0.0.1:1880 in the browser for opening NodeRed
- We make the PIR sensor settings to do this. Choose RPi GPIO in the Raspberry Pi directory. Whenever you make any changes click on the deploy button.
- GPIO 17---------Out pin of PIR sensor
- And create function node contain warning message:
- To send a message to our Telegram we need an ID chat follow the pictures below:
- Now we want to take pictures of the environment from Telegram bot without motion detection:
- we need create a camera node
- We need a function node for sending pictures:
- We need a telegram sender node:
- Now connect the nodes according to the image:
- Result:
Comments
Please log in or sign up to comment.