Telegram Binding for Reply is very hit-or-miss

I’ve implemented the Telegram binding. It works just fine sending messages when actions happen. I decided to try out the “reply” feature where openHab can ‘ask a question’ and I can reply in Telegram. I copied the example in the docs straight up (scroll down to near the bottom of docs, ‘Reply handler for lights’ example)

When my lights turn on, I always get the message in Telegram with the ‘Yes’/‘No’ buttons. Great! But when I tap the reply, sometimes it works, and sometimes it does not. This is what is hit-or-miss, this reply feature.

How can I improve the reliability of the reply buttons? I’ve enabled DEBUG level logs in the openhab console and I can see entries when messages are sent to Telegram but when I tap the reply button, I do not see any new messages in the logs. It’s almost as if openhab never even receives it.

A minute later, I go manually turn off the light. Instantly get a ‘lights off message’ in TG. Turn them back on, get message asking if I want to turn them off, tap yes, lights go off. Yay, TG works!

Some time later, repeat, tap, no response. Very hit-or-miss.

In the first place, check events.log (and if you want to be real sure, make a tcpdump) if OH receives a telegram message in time. If no it’s a Telegram issue.

What version of openHAB are you using? I just made some changes to the binding which whilst they were not related, I did update the library that the binding uses to a much newer version. The changes are only available in V3.0 Milestone 3 and newer. If your using an older version it may be fixed by the lib upgrade and worth trying.

Was changed from 4.4 to 4.9 you can see if there are any issues with the lib here…

@mstormi Where can I find events.log when running via docker?
@matt1 openHAB 2.5.8 via docker. How can I upgrade the lib/binding? (I’m a newbie openhab user)

check if you can find the logs in /openhab/userdata/logs