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"
when
Item gLuce_Camera changed
then
pushsafer("my-token", "Swipe scene change")
end
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.
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.
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", "", "")