this is my major project which is controlling light by a telegram bot
these are the following steps to do the project:
- creating telegram bot:
firstly, create your telegram account then search for bot father after that hit on “/start”. now, Send another “/newbot” message ,then follow the instructions to setup a name and a user name. Your bot is now ready , be secure to save a backup of your API token. Copy the API Key for further use.
2. acquiring your adafruit keys:
create your adafruit.io account and create a dashboard from that extract your username and key in scripting from my key section and keep it saved.
2. programming in python using google colaboratory:
At first adafruit -io and python-telegram-bot must be installed onto the python file.next step will be writing your code on google colab which will be in python language.
On writing the program and running all the cells,the last cell will keep on running and now open the telegram app on your mobile and enter the chat with your bot and type ‘/on’ or’/off’ depending on your requirement.
The bot must be able to respond or reply back and the output can be seen at the adafruit dashboard created.
3. getting on with github :
now create your github account and create a new repository
now, create a new file for writing the code of telegram bot,procfile and requirements
4. next, will be deployment into heroku
this can be done by creating a heroku account and then click on click on new app then connect with github.
then, after it will ask for your repository name, give it and connect
deploy the app
my github link : https://github.com/shivanireddy01/major_project1
after deploying now again check on your telegram by typing /on and /off