Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Lesson24- how to use Telegram control KC868-A4 A8 (ESP32) relay output
#1

1. Creating a Telegram Bot

Open Telegram and follow the next steps to create a Telegram Bot. First, search for “botfather” and click the BotFather as shown below. Or open this link t.me/botfather in your smartphone.

2. The following window should open and you’ll be prompted to click the "start" button.

3. Type "/newbot" and follow the instructions to create your bot. Give it a name and username.

4. If your bot is successfully created, you’ll receive a message with a link to access the bot and the "bot token". Save the bot token because you’ll need it so that the ESP32/ESP8266 can interact with the bot.

5. Get Your Telegram User ID

a. In your Telegram account, search for “IDBot” or open this link t.me/myidbot in your smartphone.
b. Start a conversation with that bot and type /getid. You will get a reply back with your user ID. Save that user ID, because you’ll need it later in this tutorial.

6. Preparing Arduino IDE

a. download arduino library and source code: 
.zip   KC868-A4-A8-Telegram.zip (Size: 75.98 KB / Downloads: 578)
b. install "Universal Telegram Bot Library" : Go to Sketch > Include Library > Add.ZIP Library...
c. install "ArduinoJson Library" :
  Go to Skech > Include Library > Manage Libraries.
  Search for “ArduinoJson”.
  Install the library.
d. open source code, replace ssid , password, CHAT_ID, BOTtoken for youself.
e. download firmware and test.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)