Learn how to use the Telegram Bot library, host a Telegram Bot on your NodeMCU Board, and use the messaging application (Telegram) to interact with your device.
It currently works on NodeMCU. You can view the last released Telegram API documentation here.
EXPANDED TECHNICAL DETAILS
Secure Bot-Based Home Control
This IoT project uses the Telegram messenger API as a highly secure, universal remote control for home appliances.
BotFather Integration: The ESP8266/ESP32 connects to a custom Telegram Bot. The Arduino firmware utilizes a "Secure Bot Token" to ensure only authorized users can send commands.
Command Parsing: When the user types /light_on in their Telegram chat, the Arduino receives the JSON message, extracts the command text, and triggers an opto-isolated relay.
Connectivity Feedback
Status Replies: After executing a command, the Arduino sends a confirmation message back (e.g., "Kitchen light is now ON"), providing the user with instant verified feedback from anywhere in the world.
ข้อมูล Frontmatter ดั้งเดิม
title: "Turn a Light On/Off with Telegram"
description: "How to turn a light on/off at anytime and from anywhere via smartphone using Telegram."
author: "di2tnugraha"
category: ""
tags:
- "smart appliances"
- "remote control"
- "internet of things"
views: 6565
likes: 0
price: 1499
difficulty: "Intermediate"
components:
- "1x Jumper wires (generic)"
- "1x NodeMCU ESP8266 Breakout Board"
- "1x 4-CHANNEL RELAY CONTROLLER FOR I2C"
- "1x Arduino UNO"
tools: []
apps:
- "1x Telegram"
downloadableFiles: []
documentationLinks: []
passwordHash: "4810cc7ae5066333e80bd6a74e5fc768b0b9b30d32d3101b4cca7e3433367dd6"
encryptedPayload: "U2FsdGVkX1/JqU1XCek6qeI1VdBrTwYpoYDRBbei2O2AfGlBgiI4yX1gHiSHdYC5+nWjTzY+YLpIMD29/4n7rQ=="
seoDescription: "Control a Light anytime from anywhere via Smartphone using Telegram."
videoLinks:
- "https://www.youtube.com/embed/i8drbmdYqes"
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/turn-a-light-onoff-with-telegram-db8a84_cover.jpg"
lang: "en"