Light Controlling BOT using Telegram API
This is a project where the light is controlled by user using a telegram and the data will be sent to the cloud using Adafruit and is deployed using Heroku Cloud service . The entire project is linked using Python Script. This project is based on IOT architecture using cloud platform and API keys
Prerequisites for this project
- An Adafruit Account

2. A Heroku Account

3. A Telegram Account

The python code was initially done on Google Collab by importing the libraries of Adafruit and Telegram so that the required inbuilt functions can be called.
A bot is created on telegram using BOTFATHER and the API keys are taken after creating a bot . By creating the bot we can send and receive data. The screenshot of the creation of the bot is as shown:

After the bot is created we move onto the coding part where we create a feed on Adafruit using Python code by importing the library
GitHub Link:https://github.com/srivatsan1892/ctrllight
After the code is ready we move on to Heroku so that the data is automatically deployed on to the cloud . Here in Heroku the respective Adafruit key and the Telegram bot key are given and the once the project is ready to be deployed the bot is given commands via telegram and the desired output is obtained
To turn on the lights /turnon is used and to turn off the lights /turnoff is used. The bot sends the message that the lights are on/off with the respective images

The same input is also recorded in the Adafruit server at same time when the command was given
The Adafruit entries are shown below:



This was regarding the project of controlling a light using telegram bot. I would like to take this opportunity to thank Mr. Mohammad Ameer who has been a support throughout this internship.
Thank you for checking out this blogpost hope it helped you.
Peace!