MohammadVahid Mazaherireyhane_ahmadiEhsan Aerabi
Published

Trespass Alert System

In this project we plan to check the arrival and departure of people at home or work.

BeginnerFull instructions provided4 hours2,302
Trespass Alert System

Things used in this project

Story

Read more

Schematics

circuit

Code

warning message function

JavaScript
if (msg.payload ==1){
msg.payload = { "chatId": 112615695, "type":"message","content":"warning" };
return msg;
}

picture sender function

JavaScript
msg.payload = { "chatId": 112615695, "type":"photo","content":"/home/pi/mm.jpg" };
return msg;

json code

JSON
[{"id":"f00703d4.9b554","type":"camerapi-takephoto","z":"cf0ea375.a95","filemode":"1","filename":"pi/mm.jpg","filedefpath":"0","filepath":"/home/","fileformat":"jpeg","resolution":"1","rotation":"0","fliph":"0","flipv":"0","brightness":"50","contrast":"0","sharpness":"0","imageeffect":"none","name":"camera","x":480,"y":260,"wires":[["9176016.785be"]]},{"id":"b87c4651.f305f8","type":"function","z":"cf0ea375.a95","name":"warning message function","func":"if (msg.payload ==1){\nmsg.payload = { \"chatId\": 112615695, \"type\":\"message\",\"content\":\"warning\" };\nreturn msg;\n}","outputs":1,"noerr":0,"x":420,"y":120,"wires":[["f00703d4.9b554","968daacf.37b548"]]},{"id":"9176016.785be","type":"function","z":"cf0ea375.a95","name":"picture sender function","func":"msg.payload = { \"chatId\": 112615695, \"type\":\"photo\",\"content\":\"/home/pi/mm.jpg\" };\nreturn msg;","outputs":1,"noerr":0,"x":700,"y":320,"wires":[["968daacf.37b548"]]},{"id":"daabddfc.8269d","type":"telegram command","z":"cf0ea375.a95","name":"","command":"/capture","bot":"1c63a169.da1e0f","x":110,"y":280,"wires":[["f00703d4.9b554"],[]]},{"id":"968daacf.37b548","type":"telegram sender","z":"cf0ea375.a95","name":"","bot":"1c63a169.da1e0f","x":870,"y":180,"wires":[[]]},{"id":"a6037902.f68318","type":"rpi-gpio in","z":"cf0ea375.a95","name":"pir","pin":"11","intype":"tri","debounce":"25","read":false,"x":90,"y":120,"wires":[["b87c4651.f305f8"]]},{"id":"1c63a169.da1e0f","type":"telegram bot","z":"","botname":"AlarmSystem788BOT","usernames":"","chatids":""}]

Credits

MohammadVahid Mazaheri
1 project • 4 followers
reyhane_ahmadi
1 project • 4 followers
Ehsan Aerabi
18 projects • 61 followers
Researcher on IoT and Embedded Systems

Comments