[APP][Pro] Telegram

Hi, I appreciate the quick response!
Where exactly should I find this settings option? Have been checking the Telegram app setting in Homey and the Telegram app, but I’m unable to find it.
Cheers

In the App Settings inside Homey, where you set the token.

Do you use my Telegram app or the app from Jorden?
[APP][Pro] Telegram Bot v2.0.0

That’s weird. I can’t seem to find that setting (unless you refer to Better Logic?)

Oh, Markdown is only in the current test version.

Great! The test version enabled me to enable MarkdownV2 and markdown appears to be working!
Would you consider an option to disable Link Previews for messages being sent? (Reddit - Dive into anything)

Also, I just noticed that with the update an unexpected error is being triggered while sending an image message:

  {
    "date": "07/09/2023, 17:23:20",
    "type": 1,
    "message": "GrammyError: Call to 'sendPhoto' failed! (400: Bad Request: can't parse entities: Can't find end of a URL at byte offset 48)\n    at toGrammyError (/node_modules/grammy/out/core/error.js:35:12)\n    at ApiClient.callApi (/node_modules/grammy/out/core/client.js:86:48)\n    at processTicksAndRejections (node:internal/process/task_queues:96:5)\n    at async /flow/actions/sendImageWithMessage.js:14:25"
  },
  {
    "date": "07/09/2023, 17:23:09",
    "type": 1,
    "message": "GrammyError: Call to 'sendPhoto' failed! (400: Bad Request: can't parse entities: Can't find end of a URL at byte offset 35)\n    at toGrammyError (/node_modules/grammy/out/core/error.js:35:12)\n    at ApiClient.callApi (/node_modules/grammy/out/core/client.js:86:48)\n    at processTicksAndRejections (node:internal/process/task_queues:96:5)\n    at async /flow/actions/sendImageWithMessage.js:14:25"
  },
  {
    "date": "07/09/2023, 17:22:05",
    "type": 1,
    "message": "GrammyError: Call to 'sendPhoto' failed! (400: Bad Request: can't parse entities: Character '-' is reserved and must be escaped with the preceding '\\')\n    at toGrammyError (/node_modules/grammy/out/core/error.js:35:12)\n    at ApiClient.callApi (/node_modules/grammy/out/core/client.js:86:48)\n    at processTicksAndRejections (node:internal/process/task_queues:96:5)\n    at async /flow/actions/sendImageWithMessage.js:14:25"
  }

I sent you a diagnostic report with ID 3f35c44d-5db8-4fe9-b977-5583ad77c8e9

GrammyError: Call to 'sendPhoto' failed! (400: Bad Request: Can't Parse Entities: Character '-' is reserved and must be escaped with the preceding '\\'
GrammyError: Call to 'sendPhoto' failed! (400: Bad Request: can't parse entities: Can't find end of a URL at byte offset XX)

Both are related to special characters. I would recommand using BLL or use HTML.

Will add a option to for that.

Edit: done Telegram App for Homey | Homey

I’m using the img url coming from the P2000 app (P2000 App voor Homey | Homey), so not something I created myself.

I’ll see if the HTML formatting setting instead of MarkdownV2 will solve my issue

Hi All!

Question, is it also possible to send a silent image? Just like the silent message.

Have one little problem, every time I restart homey I need to set my commands again in the bot father for the Homey bot, anyone have a fix so I don’t have to do that every time? Or anyone have an other idea? My memory’s for all commands are not the best :slight_smile:

What version of the bot you’re using?

2.7.1 if it is the app you mean, or how do I check bot version?

To keep the commands, you have to use the latest test version of the app.

1 Like

Great! :+1: and thanks for a great app! :grinning:

1 Like

Test Version 2.8.11 is now testing…

Full Changelog from 2.7.1 (Live) to 2.8.11 (Current Test)

  • Changed from Telegraf to Grammy.dev for better programming experience
    • It’s about 300kb bigger than Telegraf. RAM usage in our test was about 1MB more. Please give us feedback.
  • Added Markdown support (HTML and MarkdownV2). Enable it in the settings.
    • It supports escaping characters using the backslash \ to display special characters or prevent them from being interpreted as formatting.
  • Added about page on the settings menu
  • Fixed an issue with URL validation when the redirects had a 30X code. (by @andreasvikke)
  • Custom commands will no longer be overwritten.
  • Added “Grid” Display in the Settings for the Question Menu
  • Added more translations by ChatGTP
  • Fixed an issue with sendPhoto
  • [NEW] Added “CheckMark” feature. (Dunno how to call it propelly.)
    • Briefly replace the button text with a check.
    • Through the options menu, each question can be toggeld.
    • For 5 seconds, the pressed button will be replaced with a :white_check_mark:
      image image
2 Likes

Since I installed version 2.9 TEST, I’m having issues sending image URL’s to Telegram. It’s the same image URL where the image gets updated, but Telegram shows the first image sent with 2.9. It looks like caching in Telegram, but I’ve never had that issue before. Did something change in 2.9 that caused this, and if so, can it be resolved?

Update: It is caching, when I add ?v=x (where x is a number, like ?v=1), it will load the new image.

1 Like

Fixed! :slight_smile:

2 Likes

That was fast :slight_smile: Will test it out as soon as I get home tonight :+1:

Took me longer to figure out what was causing it then for you to fix it, thanks so much for your quick fix :+1:

Update: Just tested it, Works fina again! :+1:

1 Like

Version 2.10.0 is now live…

Full Changelog from 2.7.1 (Last Live Build) to now

  • Changed from Telegraf to Grammy.dev for better programming experience
    • It’s about 300kb bigger than Telegraf. RAM usage in our test was about 1MB more. Please give us feedback.
  • Added Markdown support (HTML and MarkdownV2). Enable it in the settings.
    • It supports escaping characters using the backslash \ to display special characters or prevent them from being interpreted as formatting.
  • Added about page on the settings menu
  • Fixed an issue with URL validation when the redirects had a 30X code. (by @andreasvikke)
  • Custom commands will no longer be overwritten.
  • Added “Grid” Display in the Settings for the Question Menu
  • Added more translations by ChatGTP
  • Fixed an issue with sendPhoto
  • Added “CheckMark” feature. (Dunno how to call it propelly.)
    • Briefly replace the button text with a check.
    • Through the options menu, each question can be toggeld.
    • For 5 seconds, the pressed button will be replaced with a :white_check_mark:
      image image
  • Performance improvements while sending local images
2 Likes

Hi Julian, continuing in your app topic if you don’t mind.
When I use the bot with pre-defined answers, nothing happens when I enter a phrase myself as an answer.
I was just assuming ‘that’s probably how it works, can´t have both’.
So, that’s why I use a second bot, without pre-defined answers, which accepts any entered answer.

But looking at your question it should work, both pre-defined and free-to-enter answers?
I checked the logs, but couldn’t find anything odd around the timestamps I tested this

Peter

I mean, I also have also a Send a <message to <chat> then card

I don’t really know where the issue is. Could you explain the issue you’re facing a little more?