Problems with notifications

Hello.
I am having issues with a simple notificationrule that used to work fine.

The error logged is:

11:35:41.819 [INFO ] [smarthome.event.ItemCommandEvent    ] - Item 'Alarm_Panel_Status' received command ON
11:35:41.833 [INFO ] [marthome.event.ItemStateChangedEvent] - Alarm_Panel_Status changed from OFF to ON
11:35:41.857 [ERROR] [.script.engine.ScriptExecutionThread] - Rule 'Alarm panel status analisys2': An error occured during the script execution: The name 'sendNotification(<XStringLiteralImpl>,<XStringLiteralImpl>)' cannot be resolved to an item or type.

and the rule is the following:

rule "Alarm panel status analisys2"
when
        Item Alarm_Panel_Status received update
then
        if(Alarm_Triggered.state == ON) postUpdate(Alarm_Triggered, OFF)
        if(Alarm_Panel_Status.state == ON)      sendNotification("mymail@hotmail.com", "Panel Activated")
        else sendNotification("mymail@hotmail.com", "Panel Deactivated")
end

This rules used to work fine some snapshots behind. Now all of a sudden and without obvio evidence it stopped working.

Do anyone has an idea why could this be happening?
Best regards.

This sounds very similar to the problem I reported:

Is your item defined as a Contact?

No, it is defined as a switch

Switch Alarm_Panel_Status            "Panel status [%s]"  <shield>        (MysqlPersisted, Alarms)                { channel="mysensors:light:gateway:Alarm_Panel_Status:status" }

Did you work through this? Initial startup: Rules with "sendNotification" don't work

Hey,

NO … It’s still the same error. Very enjoying but as it seams nobody matters.

Sry, Andi

Hi.

After seting DEBUG mode to the bundle of myopenhab I am realizing that the problem is with the bundle itself:

01:14:41.856 [DEBUG] [o.myopenhab.internal.MyOpenHABClient] - No connection, Item update is not sent

UUID and secret are perfect. I have checked them several times.

Can someone else check this in your setups so as to see if this is happening to you too?
Thanks, regards.

Hi
I’ve set my.openhab to debug with:
log:set DEBUG org.openhab.io.myopenhab
But I’m not getting your “No connection” error or any additional error.
I’m still getting the “The name ‘sendNotification(,)’ cannot be resolved to an item or type.” error, but if I reload the .rules file (just edit it and save), notifications begin to work.
Regards

Good news: I just created https://github.com/eclipse/smarthome/pull/2451, which should hopefully resolve this. Should become available in OH2 by the end of next week!

Hi @Kai.
Good to hear that.
Besides the reported issue, there seems to be something wrong with notifications and my.openhab running un Raspbian.

The exact same configuration runs fine in Windows but in raspbian it doesn’t connect to my.openhab

Regards!