Running 3.1.0M3 on CentOS8
I’ve added the Telegram binding, setup the bot and can send messages via the web and telegram API. I have these items set up in my model:
nameBot nameBot_ChatId nameBot_LastMessageUsername nameBot_LastMessageText nameBot_LastMessageURL nameBot_LastMessageDate nameBot_LastMessageName nameBot_ReplyId
I’m trying to set up a rule so when a z-wave doorbell is rung a message is sent to the telegram bot. So far I’ve not been able to find where I define the message to send. Can somebody share the code for their rule if they have this working?
I tried using the text rule I had working in OH2.5 but I get a java error with that when I manually run the rule.
rule "Door bell notification & image to namebot" when Item zwave_device_zwave_node19_switch_binary changed from ON to OFF then sendTelegram("nameBot", "Doorbell was rung, image to follow.") end
2021-04-24 07:32:03.214 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID 'doorbell-1' failed: An error occurred during the script execution : Could not invoke method: org.openhab.binding.telegram.internal.action.TelegramActions.sendTelegram(org.openhab.core.thing.binding.ThingActions,java.lang.String,java.lang.O bject) on instance: null in doorbell