Bukit Mertajam, Penang

Home Notification using Telegram and Raspberry Pi

In this tutorial, I’ll share with you on how to build a home notification using Telegram and Raspberry Pi. The notification will be sent to the telegram bot when a human or animal passes by. It’s quite easy to do it. Now, let’s do it!

Hardware Preparation

This tutorial use :

  1. Raspberry PI Zero WH
  2. Maker pHAT
  3. Low Cost PIR Sensor Module
  4. Jumper Wire

You can make the hardware connection based on the diagram and table below.

Connection
PIR Sensor : VCC Raspberry Pi (Maker pHAT) : 5V
PIR Sensor : GND Raspberry Pi (Maker pHAT) : GND
PIR Sensor : Signal Raspberry Pi (Maker pHAT) : GPIO 17
Figure 1 : Hardware connection

Video Reference

Please refer to this video to setup the telgram bot.

Sample Code

This is the sample code used for this tutorial. Try it!

Thank you

Thank you for reading this tutorial and we hope it helps your project development. If you have any technical inquiry, please post at Cytron Technical Forum.

Comments (7)

CODE ERROR

Traceback (most recent call last):
File “/home/pi/Documents/homenotification.py”, line 1, in
import telepot
File “/usr/lib/python3/dist-packages/thonny/backend.py”, line 305, in _custom_import
module = self._original_import(*args, **kw)
ImportError: No module named ‘telepot’

Hi, you need to install the telepot library first. For more technical inquiry, please post at our Technical Forum. Thanks.

how does one configure the amg8833 sensor instead of the PIR
sensor

Hi Tega, sorry we never used AMG8833 sensor. Thanks.

where’s the code??

Traceback (most recent call last):
File “/home/pi/Documents/homenotification.py”, line 1, in
import telepot
File “/usr/lib/python3/dist-packages/thonny/backend.py”, line 305, in _custom_import
module = self._original_import(*args, **kw)
ImportError: No module named ‘telepot’

Hi, please install telepot library first. Thanks.

Leave a comment