Problem with Pushover

Hi!

I’ve tried to send a pushover message but pushover could not be resolved in the designer.
The Pushover action ist installed.

So I tried to send the message with help of executeCommandLine and curl. But it also doesn’t work. The logfile shows that the command is executed.

This is the command:
executeCommandLine (“curl -s -k -d token=TOKEN -d user=USER -d title=TITLE -d message=TESTMESSAGE https://api.pushover.net/1/messages.json”)

In Linux commandline there is no problem with executing this command.

Any ideas?

Hi Chris,
maybe this helps:

rule.file:

rule "PushOverDrB"
	when
			Item DrBpersist changed from 1 to 0
	then
			if ((MrsU.state  as DecimalType).intValue() == 0) {
				if (GaesteWCFenstersensor.state == OPEN) {
				pushover("Das Gäste-WC Fenster ist offen!")
				}
			}
			else if ((MrsU.state  as DecimalType).intValue() == 2) {
				if (GaesteWCFenstersensor.state == OPEN) {
				pushover("Das Gäste-WC Fenster ist offen!")
				}
			}
	end

openhab.cfg

pushover:defaultToken="yourAPIkey"
pushover:defaultUser=“yourUSERKey”

Create account acc. to general information provided on

Cheers
Björn
PS: Change the entries via e.g. Notepad++ directly in the openhab.cfg and your .rules file.

Hi Björn!

As I wrote … the command pushover, which you are using in your rule, is not resolved in the designer.
So it seems it’s not installed correctly!? :unamused:
I already have a pushover account. :wink:

Assuming you are using OH2 given the topic tag…
you should have a conf/service/pushover.cfg file. This is where you add your token and user key info. Then in your rules you can call pushover just as in the above example. For good measure restart OH2, although it shouldn’t matter.

I wouldn’t worry about the designer not recognizing it. I don’t think it’s really being put through the paces for OH2. Just try it. I’ve had no issues myself.

It worked now.
I’ll do my final tests with different API keys.

THX!!

Hello again!

I’ve now created some variables which I’m using for pushover but now I have another Problem.
My command Looks like this:
pushover(VAR_TOKEN, VAR_USER, “message text”, VAR_DEVICE, VAR_TITLE)

Designer means: The method pushover(String, String, String, String, String) is undefined.

openhab.log says: Error during the execution of rule ‘myrule on’: Could not invoke method: org.openhab.action.pushover.internal.Pushover.pushover(java.lang.String,java.lang.String,java.lang.String,java.lang.String,int) on instance: null

Any ideas?

1 Like