Hi,
could someone explain to me, why this rule works, although I get the error below?
The bot sends the message.
Here is the DSL rule:
val telegramAction = getActions("telegram","telegram:telegramBot:<mybotid1234567890>")
telegramAction.sendTelegram(Telegram_message_out.state.toString)
And here is the Error Log
==> /var/log/openhab/openhab.log <==
2021-12-17 08:32:41.464 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID 'd06233b996' failed: java.lang.NumberFormatException: Expected an int but was <mybotid1234567890> at line 1 column 62 path $.result.from.id
I checked that int means a number and my botid is a 10 digit number.
Just for understanding purposes, since the message goes out anyway.
You need to upgrade as there was a bug in the telegram library that the binding uses. I changed the version of the library for other reasons many months ago so the fix will be in at least half of the 3,2 milestone builds and the RC1 release candidate for 3,2 stable.
Hello - I am still running OH2.5. I have a complicated KNX setup and it’s just not worth the time to migrate to OH3 as everything runs flawlessly. Until today… I’ve just added a new Telegram user and am now facing the NumberFormatException problem (Telegram chatIDs are now 10 digits instead of 9).
Two questions I’d be grateful for help with:
Is there any way of upgrading to the latest java-telegram-bot-api without upgrading to V3 of Openhab?
If the answer to 1 is no, how can I delete the chatID that now prevents the Telegram Addon from starting? I’ve deleted the offending chatID from the Thing but OpenHAB has saved it somewhere that I can’t find. The error message thrown is (even after deleting the thing) is:
telegram:telegramBot:xxx_bot' changed from OFFLINE (COMMUNICATION_ERROR): java.io.IOException: com.google.gson.JsonSyntaxException: java.
lang.NumberFormatException: Expected an int but was 5XXXXXXXXX at line 2 column 55 path $.result[0].message.from.id to UNINITIALIZED