Pushsafer - cannot be resolved

Hi everyone,

i’m having problem with one simple rules about sending a notification through push safer.

I’ve installed pushsafer action addon using PaperUI
The rules contains this few line of code

import org.eclipse.smarthome.core.items.*
import org.eclipse.smarthome.core.persistence.*
import org.eclipse.smarthome.core.library.types.*
import org.eclipse.smarthome.core.library.items.*
import org.eclipse.smarthome.model.script.actions.*

rule "pushsafer test"
	Item gLuce_Camera changed
	pushsafer("my-token", "Swipe scene change")

in openhab.log when I switch the light I get this error:

Rule 'pushsafer test': An error occured during the script execution: The name 'pushsafer(<XStringLiteralImpl>,<XStringLiteralImpl>)' cannot be resolved to an item or type.

Any suggestions?
Thanks a lot!

1 Like

None of your imports are needed and should be removed.

According to the documentation and the code, you need to provide seven parameters to the pushsafer call, whereas your rule only passes two strings.

Import removed, thanks.
I thought that when the documentation said that just the first 2 parameters are mandatory, while the other are optional, I could easily not providing them to the function.

I made the modification, but it still does not work. Same error, just with more parameter.

The documentation is incorrect (or incomplete you could say), because you would still have to pass null for the missing parameters. Could you submit a fix for the documentation?

If you installed the action and pass seven parameters, the first being strings and remaining either being strings or null, the action method ought to resolve. If not, please open a detailed issue with all configuration information.

Just as update, it was my mistake, i configured openhab+pushsafer wrong, now is working correctly.

1 Like

Hi, what did you have to configure to get it to work properly?
I am seeing the same error as you.


Add a line like this to your rule. All 7 elements must be there but you can leave some empty (must be “”) and it will apply default values - se spec when you log in to pushsafer.com

pushsafer("Your private key from Pushsafer goes here", "Lights were turned ON in Corridor", "OpenHAB Notification", "Your device ID", "4", "", "")