Raspberry Pi and Telegram Based Simple Home Automation

Introduction: Raspberry Pi and Telegram Based Simple Home Automation

About: College student.. Arduino, Raspberry pi and 3d printer lover !

This is very easy project...

if you doing what i show you then it's complete in about 40-60min..

let's start !!!

Step 1: Things You Need

1) Raspberry Pi

2) Smartphone (Android/Ios/Windows)

3) Raspberry Pi Accessories

Keyboard,Mouse,Power (charger/Powerbank)

Step 2: Install Telegram and Create BOT !

1

search bot father and type /start

2

type /newbot

3

after you receive message from bot father and you have to create your bot username

4

bot father send you token

this token is unique so it helps you when you work on later !

Step 3: Install Putty !

open terminal

1 sudo apt-get install putty

2 After installed you have to click option RUN

3 search puuty and click

4 here open window and type your username/hostname

(The default user is pi , and thepassword is raspberry)

if you change and don't know then open terminal and type

sudo raspi-config

here you change your password,username and etc...

5) after complete task 4... one terminal open on your screen.

6) type username and password.

7) sudo apt-get install python-pip

8) sudo pip install telepot

Step 4: Code in Python

minimize all windows and open file manager and open Telegram Bot folder

you see two files

now open 2nd no file and you see "bot token" in python code

now enter your bot token number and save this file !

Step 5: Last Step

Open terminal Window

1) cd TelegramBot/

2) python telegrambot.py

and now it works !

here is code !

P.S

if you not see any telegrambot.py...then just download my code and place to TelegramBot Folder !

if you face any problems then comment !

thank you guys

Be the First to Share

    Recommendations

    • Make it Glow Contest

      Make it Glow Contest
    • First Time Author Contest

      First Time Author Contest
    • PCB Challenge

      PCB Challenge

    5 Discussions

    0
    atalpurohit
    atalpurohit

    7 months ago

    raise exception.TelegramError(description, error_code, data)
    telepot.exception.TelegramError: ('Bad Request: message text is empty', 400, {'error_code': 400, 'ok': False, 'description': 'Bad Request: message text is empty'})

    this shows me error when i give 'on' command in raspberry pi...

    0
    frederico.dos.santos

    On video you copy the IP address and then go to I DONT KENOW WHERE?

    0
    frederico.dos.santos
    frederico.dos.santos

    Reply 2 years ago

    You said step-by-step. Now I discovered what is this.

    0
    johng630
    johng630

    3 years ago

    Greetings and thanks for the tutorial.

    I have trouble with step 4. I can't see the folder TelegramBot on my Pi. Where should I be looking, please?

    Best, Auralay

    0
    iaprock
    iaprock

    Reply 3 years ago

    then just create new folder and rename !