My.openHAB methods not available in Designer

Hey there.

I’ve configured my.openHAB right now. Wanted to send a notification to my Android device, but the Designer (v1.8) doesn’t provide me the three methods (sendNotification, sendBroadcastNotification, sendLogNotification). The new Telegram action is provided. Is this some bug or do I have to provide the binding somewhere in the Designer?

Thanks for help!

ps. Thank you guys for openHab! I LOVE IT! :heart_eyes:

1 Like

Hmmm, I guess this didn’t get fixed as I’m seeing this also in my 1.8 Designer. The sendNotification action was added in 1.7 (maybe 1.7.1, I forget which) but Designer’s code highlighting didn’t get updated to reflect it. It was noted in the forum at the time but I never kept up with whether an issue was created.

It was probably considered (rightly so) as a low priority and therefore didn’t make the cut for 1.8.

I set up my notifications so I only call sendNotification from one rule so I don’t usually notice that Designer doesn’t like it. I mainly did this so I could experiment with different notification mechanisms without needing to change my notification calls all over my rules. I just use a String Item and a rule that triggers on updates to that Item, sending its new text out as the notification.

Whatever version I have installed still doesn’t like sendLogNotification - is there an update?

It is sendNotification, not sendLogNotification and I don’t know if Designer is still marking it as not there or not, but OH should still be run and send the notification.

@rlkoshak, not sure why you’d say that… the documentation clearly lists sendLogNotification as one of the functions, along with sendBroadcastNotification and sendNotification:

And yes, it does work, I was just wondering if Designer accepted it yet, without me having to update. That’s just lazyness on my part, asking if it’s fixed instead of just upgrading to see myself. I’ll eventually upgrade Designer either way, just wanted some incentive.

So it does.

Just to update for anyone else looking at this: Designer 1.8.3 still does NOT recognize the send*Notification functions.

At first I thought it was fixed, because it didn’t show the errors - but then as soon as I modified any code, it highlighted each one as a false positive error.

One thing I’ve done is isolate my notifications to one place so that I can do additional logic around where alerts go based on things like time of day and such. This would at least limit your false positives in Designer to one file and just a couple of rules. See details in the Separation of Behaviors section on this thread.

1 Like

Thanks, great post, I’ll definitely follow that next time I have a block of time to refactor some of my code!