[SOLVED] [telegram] 404 error

Hi,

This is my config:

# Read http://www.instructables.com/id/Telegram-Bots-for-beginners/
# to see how to set up bots and find your chat ids
# bots=bot1,bot2
bots=heinz,kathleen
# Handy Heinz S7 Active
heinz.chatId=7XXXXXXX7
heinz.token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
# Handy Kathleen iPhone
kathleen.chatId=7XXXXXXX7
kathleen.token=XXXXXXXXXXXXXXXX

and this is my rule entry:

sendTelegram("heinz", "Trockner ist fertig!")
sendTelegram("kathleen", "Trockner ist fertig!")

But I am receiving in openhab log this error:
[WARN ] [ab.action.telegram.internal.Telegram] - Method failed: HTTP/1.1 404 Not Found

Do you know where to look for a solution?

Thanks

Install the HTTP binding from PaperUI

it is already installed since ages …

Try adding a - in front of the chatId

# Read http://www.instructables.com/id/Telegram-Bots-for-beginners/
# to see how to set up bots and find your chat ids
# bots=bot1,bot2
bots=heinz,kathleen
# Handy Heinz S7 Active
heinz.chatId=-XXXXXXXX
heinz.token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
# Handy Kathleen iPhone
kathleen.chatId=-XXXXXXXX
kathleen.token=XXXXXXXXXXXXXXXX

@H102
The 404 error comes from telegram responding that the binding asked for an address it couldn’t find.
Nothing to do with the http binding

I assume that your tokens are correct.

I created and checked them according the action description

And I tried it right now again with success

Yeah!!
Please mark the thread as solved.
The telegram API is not always fully available and you can’t get 404 for that reason too.

Maybe I was not precise enough. The check of the https://api.telegram.org/bot<token>/getUpdates was successful
But I still receive the 404 error message and no notification

Did you change the tokens with a - in front?

it is like this
https://api.telegram.org/bot7XXXXXXX7:AXXXXXXXXXXXXXXXXXXXXXXXXXX8/getUpdates

Did you change the tokens with a - in front if the telegram.cfg?

It is like shown in post 1 there is no -

Sorry, the chatIds

put a - in front:

# Read http://www.instructables.com/id/Telegram-Bots-for-beginners/
# to see how to set up bots and find your chat ids
# bots=bot1,bot2
bots=heinz,kathleen
# Handy Heinz S7 Active
heinz.chatId=-XXXXXXX
heinz.token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
# Handy Kathleen iPhone
kathleen.chatId=-XXXXXXXX
kathleen.token=XXXXXXXXXXXXXXXX

no effect

I don’t know buddy…
Works here… Just tested

is there a log dedicated to telegram with more information?

Have you searched the forum?

Logging for telegram works exactly the same as logging for all of the other actions/bindings.

Try to configure only with one bot and see if that works. You can also test by sending the telegram to your group name ‘bots’.

The dash (-) in front of the chatId is a MUST for group chats. For a regular chat, there is no dash.

You might want to look to the config of the telegram action. Maybe you tested more config’s and the action didn’t save properly the new one.
Take a look here HowTo: Manage OpenHab 2 configurations, section Some useful Karaf console commands.
Try and view the current telegram config in karaf console:

config:list "(service.pid=org.openhab.telegram)"

If the displayed config doesn’t match the one from telegram.cfg you should delete it and let the action re-load the config from file by restarting openHAB.