[APP][Pro] Telegram

Hi, thanks for the app! A really great alternative for Homey’s confimation notifications wich are currently broaken.

One question… I am using a Galaxy S21 with Android 13 and I cannot get a notification dialog with the answer buttons allready in the notification. So I have to open Telegram to press the right button. I tried to try some different settings in my phone, without luck.

That something that I can’t change. Its a thing that android/telegram has to develop into there system/app

Hey spkes, just fyi: the script that reads the flowcards and other code, it’s pretty small and easy to implement.
I have it in bll, advanced triggers and the countdown app.
If you ever want to implement it, let me know, ill show you which code to include where.

(Adding it later does not break flows or anything, because you will still use the dropdown/select type argument).

1 Like

Already included in a test version.

Check it out. The only problem I got reported that some people does get now {} as a result to telegram. I cannot test it since no homey pro yet :smiley:

If is that what you meant. If you meant cards to create questions/answers, then sure, let me know :slight_smile: I’m interested in it.

you need to put await before BL.decode, right now, you will get a Promise (resulting in an empty object when parsing to string).

So
change

 card.registerRunListener((args) => {
            if (app.bot != null) {
                if (Utils.validateURL(args.url)) {
                    app.bot.telegram.sendPhoto(args.user.id, {filename: "", url: args.url}, {caption: args.message})
                    app.bot.telegram.sendPhoto(args.user.id, {
                        filename: "",
                        url: args.url
                    }, {caption: BL.decode(args.message)})
                        .catch(app.error)
                        .then();

TO

 card.registerRunListener(async (args) => {
            if (app.bot != null) {
                if (Utils.validateURL(args.url)) {
                    app.bot.telegram.sendPhoto(args.user.id, {filename: "", url: args.url}, {caption: args.message})
                    app.bot.telegram.sendPhoto(args.user.id, {
                        filename: "",
                        url: args.url
                    }, {caption: await BL.decode(args.message)})
                        .catch(app.error)
                        .then();

added the async and the await.

You also need to add it to the second BL.decode you use a few lines down: Async the function and place await before BL.decode.
That should solve it.

1 Like

Ahh, you could add a return type to the decode Definition.

    static decode(text: string, { locale, timeZone }?: {
        locale: any;
        timeZone: any;
    }, ...args: any[]): Promise<string>;

image

1 Like

Ah, will do that! Sorry about that.

1 Like

Great app! But i cannot remove users/groups… i can press the remove button but nothing happens.

With the current test version or the live version?

Live version

Then it should work. Could you send a diagnostic report?

Are you using a old mobile device?

1 Like

Great App! maybe I missed it, but I have searched for a way to answer on a equation from the notification on a iPhone (trough quick reply) is this possible? I do not see the two answers I have programmed…

The only way for now it seems to open telegram and then I can answer…

The Buttons are not visible in quick reply. This is something I can’t change.
You could build your own Question system with A Message is received card.

ah ok, thanks for your quick reply!

Hello all,

Is there a possibility to add variables to a question?
Like I did with my push notification (that is currently not working because on android 13)

image

Not with the current system. You can use them with the Send a Message card though.
As I can’t develop right now (see prev. posts) there is also nothing i can do currently about it.

1 Like

Thank you for the reply! Will use it as it is for now! Works really good!

Has anyone run into this issue?
There seems to be a bug in v2.1.2 — Fixed BLL support
When I save answers to new questions, or edit existing ones, the new answers do not get saved
Git issue

1 Like

I can’t find (after a quick search) a post about this function, which I like to share.

How to send a question from a flow, and let the user enter a value, which is then used in the flow conditions / actions of that flow.

With this question and ideas of @Hamster, I made this example flow.

Conditions:

  • the flow should not respond to any message with coïncidental valid values
  • the entered value should be within a defined value range
  • the user should be informed when an invalid value has been entered
  • when the value needs to be numbers only, the returned value needs to be converted from ‘text’ type to ‘numeric’ type

  • Question, reply and flow responses

2 Likes

@spkesDE,

I hope you’ll get your hands on a new Homey Pro soon!

Is it possible to use HomeyScript to remove/add answers from a question defined in your app?

That would allow us to dynamically create the answers.