Telegram
Telegram access uses Bot API long polling so users can DM the bot, mention it in a group, or reply to it to query and control devices; photo, voice, and document messages are received as hints but do not replace full vision or voice access.
Usage Modes
| Mode | Trigger | Notes |
|---|---|---|
| Bot DM | Send text directly to the bot | Good for personal remote status queries and control commands. |
| Group mention | Type @bot_username with a message | Good for team collaboration. Group text triggers the device agent when the bot is mentioned or replied to. |
| Reply to bot | Reply to the bot's previous message | Useful for continuing a group conversation without mentioning the bot every time. |
| Photos, voice, and files | Send a media message, optionally with text | The message enters the channel with a hint. Use dedicated device access capabilities for full vision or voice interactions. |
Create a Telegram Bot
- Open the official
@BotFatherin Telegram. - Send
/newbot. - Follow the prompts to set bot name and username.
- Copy the Bot Token.
- Add the bot to a group if group usage is needed.
Groups use Privacy Mode by default. First verify access by replying to a bot message. To trigger conversations with ordinary @bot_username text, disable Privacy Mode with /setprivacy in @BotFather, then remove and re-add the bot to the group. The bot will receive more group messages; Device Agent still only processes text that mentions or replies to the bot.
Configure Device Agent
Open Settings → Channels → Telegram and fill in:
| Field | .env | Description |
|---|---|---|
| Enabled | TELEGRAM_ENABLED | Starts the Telegram channel |
| Bot Token | TELEGRAM_BOT_TOKEN | Token generated by @BotFather |
| Allow list | TELEGRAM_ALLOW_FROM | Optional numeric Telegram user ID allow list |
You can also configure it in .env:
TELEGRAM_ENABLED=true
TELEGRAM_BOT_TOKEN=123456:ABC-...
TELEGRAM_ALLOW_FROM=123456789,987654321Restart the service after saving. For a platform deployment, ask the deployment administrator to restart the relevant services.
Verify Access
- Confirm that the saved configuration has taken effect.
- Check logs for
Telegram: enabledandBot started (long polling). - Send a DM to the bot.
- Mention the bot in a group, or reply to a bot message.
- If the allow list is enabled, make sure the sender numeric ID is included.
In groups, mention the bot or reply to its message to start a conversation; see Usage Modes.
Checks
- No DM response: confirm the Bot Token is correct and the service can reach Telegram Bot API.
- No group response: mention the bot or reply to a bot message.
- Allow list blocks messages: use the numeric Telegram user ID.