Lesson24- how to use Telegram control KC868-A4 A8 (ESP32) relay output - Printable Version +- Smart Home Automation Forum (https://www.kincony.com/forum) +-- Forum: Technical Support (https://www.kincony.com/forum/forumdisplay.php?fid=1) +--- Forum: KC868-A series and Uair Smart Controller (https://www.kincony.com/forum/forumdisplay.php?fid=6) +--- Thread: Lesson24- how to use Telegram control KC868-A4 A8 (ESP32) relay output (/showthread.php?tid=985) |
Lesson24- how to use Telegram control KC868-A4 A8 (ESP32) relay output - admin - 10-28-2021 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: KC868-A4-A8-Telegram.zip (Size: 75.98 KB / Downloads: 680) 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. |