I am trying to send a push notification using Pushover via a rule in OH2.4 Paper UI.
After installation of the action-pushover - 1.13.0 add-on I configured the services/pushover.cfg as described in the documentation and added a simple New Rule:
Action “execute a given script”
Script “sendPushoverMessage(pushoverBuilder("test message"));”
When I execute the script, I get the following error message in openhab.log:
“[ERROR] [internal.handler.ScriptActionHandler] - Script execution failed: ReferenceError: “sendPushoverMessage” is not defined in at line number 1”
I also restarted the OH package on my Synology DiskStation, but this didn’t make any difference.
Maybe my syntax is wrong or OH didn’t load the add-on properly? Any hints are welcome
rule "test pushover"
when
Item Test_Pushover_Message changed to ON
then
sendPushoverMessage(pushoverBuilder("Test Pushover")
end
I noticed that sometimes I have to send the credentials within the rule:
rule "test pushover"
when
Item Test_Pushover_Message changed to ON
then
sendPushoverMessage(pushoverBuilder("Test Pushover").withApiKey("xyxyxyxyxyxyxyxyxyxyyx").withUser("babababababababababab").withDevice("mydevice"))
end