Technical report – Tasker + Telegram + Gladys tests

1. Initial objective

Set up an automation via Tasker to send messages to Gladys via Telegram in order to trigger or interact with home automation scenes.

2. Findings

  • Limitation of Telegram: a Telegram bot cannot communicate directly with another bot.
  • Impact on Gladys: since Gladys’s Telegram integration itself relies on a bot, it is impossible to send a message from Tasker (via a bot) to Gladys and obtain a usable response.
  • Result: any bot-to-bot message is ignored by Telegram, preventing any automated dialogue.

3. Consequences

  • Messages sent from Gladys to Gladys via Telegram do not allow exchanging or commanding the platform.
  • Actions planned via Tasker cannot be triggered through this channel.

4. Possible approaches ??

  1. Use a human user account
  • Configure Tasker to send the message from a regular user account, and not from a bot.
  1. Use Gladys’s HTTP API
  • Use HTTP/HTTPS requests from Tasker to Gladys’s API to send commands directly.

approach 1: do not try at all for now.

approach 2: currently being tested but I still can’t send a message via Gladys’s API because I don’t yet understand how it works.

I do recommend using either the API (if you want to do it from anywhere in the world, Gladys Plus is convenient for that: Open API | Gladys Assistant ), or MQTT :slight_smile:

So far, my tests are not yet conclusive. I managed once to trigger an action with an NFC tag, but the problem is that I have to retrieve the API key too often, which complicates proper operation.

1 Like