Hi Paolo,
I have configured openhab.cfg and created a rule according to the wiki.
I have struggled finding the right zip (I am running 1.7.1, which does not contain telegram in the addons.zip).
Anyway, I found it in 1.8.0 and checked it out.
By the way, my “chat” ID is the same like my “from” ID on https://api.telegram.org/bot…
Is this always the case?
And I get an error in the openhab.log:
[o.a.telegram.internal.Telegram] - Method failed: HTTP/1.1 400 Bad Request
In general my confusion is related to “botname” “botusername” (I have chosen both to be the same ;-). Which one to define in openhab.cfg.
Furthermore the botusername in my telegram App (iPhone) is named “@MYBOTUSERNAME”.
So what is the right one to choose?
Apart from the correct addon version, 1.7, 1.8, … (about which I cannot help you, telegram action is just included in 1.8 and later …) you should just follow the instruction written here: https://github.com/openhab/openhab/wiki/Actions#telegram-action
Just follow step by step in order to get your token and chatId, it is very easy to get the telegram token and chatId
The bot name in the openhab.cfg can be any name. And that will be used as first parameter for the sendTelegram method.
About using telegram addon on 1.7 I do not have a certain answer. I think it should work but it was developed and tested on 1.8.
Probably @hakan or @watou can give you a better answer about general compatibility issues with addons.
I would like to test the snapshot, but I am afraid, that I mess my system up completely.
Before I start trying, I need to clone my micro SD.
Thanks for your help.
I will also check out the official release discussion.
I don’t know why placing org.openhab.action.telegram-1.8.0-SNAPSHOT.jar in your openHAB 1.7.1 runtime’s addons folder would be a problem. It ought to work under usual circumstances. Your openHAB Designer from 1.7.1 won’t consider it a valid action, but you can ignore that complaint in Designer.
OH Designer is not the problem (currently I use 1.8. designer as well and it recognizes the “sendTelegram” action).
However after Telegram bot configuration I get the following message in openhab.log.
[o.a.telegram.internal.Telegram] - Method failed: HTTP/1.1 400 Bad Request
Thanks for the hint.
I have checked everything again very thoroughly and found the issue indeed in my openhab.cfg.
Some copy / paste issue with the chatID. So you were absolutely right! @paolo_denti.
It did not have anything to do with incompatibility of the different .jars.
I use the openHAB designer and with .cfg files there is obviously not a proper syntax handling!?
Which editor (within OH_Designer should I use?) - currently just text editor which somehow caused the issue.
Thanks @hakan & @watou as well.
Telegram action is included in 1.8 and not included in 1.7. So you can either build it on yourself or wait until the 11th of January, when the 1.8 will become official