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.
thanks for your answer, but: no
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
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.