Hello fellow OpenHAB enthusiasts! I’ve been diving into the latest updates and running into an interesting issue with my rule execution. I’ve been using OpenHAB for quite some time now, and I must say, it’s been a fantastic journey. However, I’ve encountered a snag that I’m eager to resolve.
I’ve set up a rule to send a notification via Telegram when OpenHAB starts. This worked seamlessly before version 4.0.2, but now it’s hit or miss. The error message I’m getting is:
text
Script execution of rule with UID ‘openhab-1’ failed: ‘sendTelegram’ is not a member of ‘org.openhab.core.thing.binding.ThingActions’; line 24, column 21, length 48 in openhab
I’m puzzled because I’ve included a null check before calling sendTelegram. Could it be that the Telegram binding isn’t fully initialized when the rule triggers at start level 100? I’m wondering if there’s a delay or an order of operations issue here.
Here’s the rule in question:
java
rule “OpenHAB: Startup”
when
System reached start level 100
then
val _message = “
OpenHab ready.”
logInfo(“openhab_startup”, _message);
if(ON !== internet_status.state || ON !== alarm_control_ims_send.state) return;
val _bot = getActions(“telegram”, bot_thing);
if(null !== _bot) _bot.sendTelegram(bot_channel_private, _message);
end
I’m curious if others have faced similar issues and how they’ve resolved them. Is there a way to ensure the Telegram binding is fully initialized before the rule executes? Any insights or workarounds would be greatly appreciated!
On a lighter note, it’s amazing how much OpenHAB has evolved. I’m excited to see how this community continues to innovate and support each other. Looking forward to your thoughts and solutions! ![]()