I saw a post in Hackaday.com which was about using Telegram API to control LEDs attached to a Raspberry Pi. Telegram is a messaging service similar to Watsapp but it allows a unique bot API to support its non human machine to machine communication.
Because of this feature it is hacker friendly because the possibilities are only limited by imagination. I had a PIR sensor and a USB web camera lying around and thought it would be cool to put together something related to Telegram bot API using those.
In Sri Lanka CCTV cameras selling like hot cake and office and home security surveillance has become a high priority in the last couple of years. Because of this I thought it would be cool to put a Home security service for me using the aforementioned components.
Thus came up with the following schematic.
And attached the USB camera to the Raspberry Pi's USB port.
Finally a little bit of coding
After installing all important Telegram messenger and creating a bot by going through the Documentation of Telegram, finally I managed to get the whole thing working together. You can see the application in action in the following video.
References
7 comments:
This is really a great post. Thank you for taking time to provide us some of the useful and exclusive information with us. Keep on blogging
Hello,
i did exactly similar to what you did but it is not working. is it possible that you can help.
thank you
when i run this code say me error :
in module of sendphoto ......................
if you can help me
i'm very need to this program
thank's for all
regards
can you explain to me your program line of the line
what is token ="token"
thank salam from indonesia
I have problem when i run the code...the output is
Traceback (most recent call last):
File "/home/pi/Desktop/homesecurity.py", line 21, in
bot = telegram.Bot(token = token)
AttributeError: 'module' object has no attribute 'bot'
Can your help me?
What is problem?
@Adi Surahman
Wahalaikum salam, token="token" is the Token for Telegram API. You can get it from Telegram
Post a Comment