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.
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.
I still get (after update / upgrade).
Telegram blocks additional actions within a rule if the telegram call is befor that other action.
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.
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:
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)