OH2 with Telegram - anyone?

I am using OH2 including Telegram installed by Paper UI but this obviously does not work as expected.
The Eclipse Designer shows errors about Telegram:
The method sendTelegram(String, String) is undefined

And openhab throws:
An error occured during the script execution: The name 'sendTelegram(<XStringLiteralImpl>,<XStringLiteralImpl>)' cannot be resolved to an item or type.

Any idea?

This error is no error at all.
I think you will understand the following german blogpost (bottom part of the article)

Your guess is right :wink:
Thanks - I will check it out

Actually I know that website but I actually have (had) some problem with telegram.
After your post I rechecked again and found a copy and paste error - shame on me.
Anyway - it’s still not tested after that change.

Edit: Test finished successfully.
Thanks, @3DJupp for leading me into the right direction.

1 Like

I still get (after update / upgrade).
Telegram blocks additional actions within a rule if the telegram call is befor that other action.
:frowning:

2016-11-11 17:35:41.546 [ERROR] [.script.engine.ScriptExecutionThread] - Rule 'CO2@Home': An error occured during the script execution: The name 'sendTelegram(<XStringLiteralImpl>,<XStringLiteralImpl>)' cannot be resolved to an item or type.

Is no one else encountering these problems with telegram?

Your doing better than me, all im getting is 404’s

Hello! I use telegrams, there were no problems. Show your rule. In the log you are told that both parameters should be of type string, ie I think you mistakenly transferred to another type. So I have done:

sendTelegram("bot1","my param: " + my_param.state.toString)

I apologize if I have correctly understood the essence of your problem, my English is very bad.

Hi @Olymp,

you are absolutely right - thanks for the hint.
I will give it a try!
And please don’t apologize for your Englisch! :slight_smile:

I had 404 errors, but I followed this guide and voila, it works:

https://www.linkedin.com/pulse/telegram-bots-beginners-marco-frau

The website you linked is not available any more (500).

What is your exact problem?
I am nowadays using OH3 and use this syntax:

val action = getActions("telegram","telegram:telegramBot:MyTGBot")
action.sendTelegram("ABUS was activated! Active Bypasses: " + Abus_BYPASS.state.toString)