Seeking Advice on Telegram Automation for Doorbell Notifications

Hi all, I’m diving into the world of smart home automation and it’s been an exciting journey so far! I’ve recently set up the Telegram binding in my OpenHAB setup and I’m trying to get a doorbell notification system working. The goal is to send a message to my Telegram bot whenever the Z-Wave doorbell is triggered.

I’ve got the Telegram bot up and running, and I can send messages through both the web interface and the Telegram API. I’ve also set up the necessary items in my model, but I’m hitting a snag when it comes to defining the actual message to send.

Here’s the rule I’ve been working on:

plaintext
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

Unfortunately, when I try to manually trigger this rule, I run into a Java error. The error log shows that there was an issue invoking the sendTelegram method. I’ve tried tweaking the rule and checking the syntax, but I’m not quite sure where I’m going wrong.

I remember this rule worked in a previous version of OpenHAB (2.5), but it’s not playing nice with my current setup. I’m wondering if there’s something about the way the Telegram binding works in the newer versions that I’m missing.

Has anyone successfully set up a similar automation? I’d love to hear about your experiences or any tips you might have. Whether it’s a different approach to sending messages or a common pitfall to avoid, I’m all ears!

Thanks in advance for your help and insights. I’m really looking forward to getting this automation up and running smoothly!