[SOLVED] Telegram Thing configuration question

  • Platform information:
    • Hardware: RaspberryPi 3
    • OS: RaspBian
    • Java Runtime Environment: 1.8
    • openHAB version: latest stable
  • Issue of the topic:
    When I want to configure the Telegram Thing via the PaperUI the button for confirmation is greyed out.
    I have managed to add a Thing via .things file, and I tried to remove that file before trying to add via PaperUI again. The problem stays the same.

Picture here (hope this is allowed): https://pasteboard.co/J4bKBze.png

Hello @dreesclark,

With the very limited information you provided it could be impossible to answer your question however I will give it a try.

Did you enter your Bot token and a Chat ID?

Hello @Charley

Thank you for the reply.
My apologies. Of course it’s like it always is: Your head is so focused on the topic that you automatically assume everybody is on the same page.

Let me try to write it down chronologically.
I added the Telegram Binding. This was very early into my openHAB experience, and I couldn’t find where to configure the Thing in the PaperUI.
So I moved the focus to the files, and was able to get the Telegram Thing working with a telegram.thing file, with token and chat ID. That works flawlessly.
Then, after more work in the PaperUI, in the Control panel, I wanted to sort the things to one location instead of “other”. That worked for everything, except the Telegram, where an error message stated “409 conflict” or something.
So then, with my new-found understanding of the PaperUI, I removed the telegram.things file and tried to enter the API key and chat ID in the Telegram Thing window.
Long story short: I’m unable to save the Telegram configuration, due to the button being greyed out.

Of course, you could make the case that it works with a things file, but I’d rather it was all in one location (the PaperUI) instead of having to move back and forth.

If you have any more questions or need more detail, please ask.

Kind regards

Did you do a restart after these changes?

sudo systemctl restart openhab2.service

No, I didn’t restart. The logs indicated that it recognised the things file being gone. Didn’t think I might need a restart.
Will try that and get back to you, thanks for the tip.

EDIT: I just tried that, and it didn’t work. But I have another clue: The field for the chat ID seems to open a tiny empty drop down, and even after adding the chat ID, it’s still underlined red - as if something was wrong with what I entered.

Btw, I’m using Chrome as a browser, could that be an issue?

Since deleting the Thing in your files did you also delete the file as well or just what was inside it? If only what’s inside, then either rename the file or delete it.

After that I would stop OH and clean the cache then do a few restarts.

I wouldn’t think so in this case but it wouldn’t hurt to try it.

1 Like

I renamed the things file to .thingsOLD, but didn’t remove anything from inside it.

Now I’ll test by commenting the line in the thingsOLD file, restarting the service, then rebooting the machine. Then I’ll remove the Telegram binding, reboot the machine again, and add the binding again.

Then I’ll try to configure the Telegram Thing in the PaperUI. Will post the update here.

Btw, I tried other browsers (Firefox and Internet Explorer), but the Chat ID field still underlines red.

I would clean the cache after removing the binding to make sure nothing remains in cache or tmp file.

No need to reboot just restart OH.

To clean cache:

sudo systemctl stop openhab2

sudo openhab-cli clean cache

sudo systemctl start openhab2

For a restart:

sudo systemctl restart openhab2

Note: It will take a few extra minutes for OH to fully start back up after cleaning the cache and you may need to do 1-2 restarts after it’s fully restarted. Also, if doing multiple restarts watch the logs and make sure OH has time to fully start between each restart.

OK, thank you @H102 and @Charley
It seems to work now, I was able to add the Telegram Thing via the PaperUI. The drop down I mentioned earlier seemed to have had a bug, where the cache was blocking adding the Chat ID.
It looks like this now:

1 Like