OH3 Telegram Custom Keyboard

Hi,

I’ve set up a new OH3 System on an RPI4.
After installing the Telegram Binding, i’ve testet several rules to send/receive messages and react on them.
Everything works fine so far.

Now I want to use the “Custom Keyboard” functionality (not inline Keyboard!) of Telegram to give the user the ability to simply click on a button instead of texting the instructions.

I’ve done this with several µController projects and it works fine.

Is there any possibility to implement a custom keayboard also with the Binding?
Is there any other way to do it?

Thanks and best regards
Andreas

Is SendTelegramQuery ( see Telegram - Bindings | openHAB ) what you are looking for ?

Dear Wolfgang,

thanks for your answer, but: no :slight_smile:
SendTelegramQuery offers the opportunity that the Telegram-Bot “asks” the user a question, the user can answer via a so called Inline Keyboard:

So the User has to send a keyword (e.g. “Tor auf” in my example), after that, the Bot answers with a Question (“Garagen-Tor öffnen?”) and the correspondent buttons to answer this question…
The user can click the inline keyboard (which will disappear after clicking) to easily answer the question.

BUT the keyword (to start that all) must be send by typing it into the given standard keyboard (letter by letter).

What I’m asking for, is the so called “Custom Keyboard” (provided by Telegram API).
So for the example above, a possibility, to send the keyword “Tor auf” by simply klicking only one button at the custom keyboard (which is also provided beside the normal “letter-keyboard”.
An example for such an custom keyboard is shown in the picture in my opening post.

For a better understanding, please see also the API explanation from Telegram for the difference between Custom Keyboards and Inline Keyboards:
https://core.telegram.org/bots#keyboards

Best regards
Andreas

Thanks for the link. As far as I understand you would like to get this: [telegram] Support ReplyKeyboardMarkup · Issue #7279 · openhab/openhab-addons · GitHub ? Subscribe there and vote up.

Not a solution to your problem, but as an option:
1.You can configure the bot commands (/alerts, /delete, etc) to BotFather, then they will be provided when you click on the input field in the telegram.
2. you can refuse to bind telegrams to OpenHAB and use Node-Red for telegrams. I went down this path because I lacked the flexibility of the keyboard so that several buttons could be placed in several rows, and also, I really lacked the ability to send a quiet message.

1 Like

Dear Olymp,

thanks for your workarounds.
I’ve tested the 1st one, better then nothing :slight_smile:

Maybe the ReplyKeyboardMarkup will be implemented in the Binding, in future, too

1 Like

I would still love to have this feature in openhab as well. But unfortunately there is currently no implementation

Does anyone in this thread still want to use ReplyKeyboardMarkup in the telegram binding? I have implemented it and need some feedback on it.

I still use the binding very actively and would like to try it out.