Sending alerts


I am just learning and with the help of @ipaterson was able to get this working

was asked to write up a example of how to use here

below are steps needed.

create a pushover account at

once created, on the main page you will see


you will need this key, this is the “user” token

then on same page, you will need to go down to

 "Your Applications   (Create an Application/API Token)"

click on “Create an Application/API Token”
for name use something like “MySmartThingsApp”
for type use Plugin
for Description put something like “Smart Things Alerts”
for url leave blank
for icon use
save the image locally and then click browse and add it
check the agree too terms and click create
you will see this the app key, remember this as will need to send pushover alerts, this is the app “token”

then download the Pushover app to phone, is $4.99 per platform, so pay once, use on all your device for that platform

login to app with your email\password you created account with

after that you can you can send message via pushover in Webcore with

this is a image of the webrequest task

the sounds you can use are


Link for more info on pushover api

the meaning of the Message Priorities are on that link, I mainly use 0 as that is just the normal send a msg with a sound
a priority of 2 would be an emergency page and will repeat ever minute until you go into app and acknowledge you read it

below is a sample you can import, but the anonomizer changed the url from to, so will need to change that back

Push notifications only to those present in home
Push notice t a pc?

Great write up @John68!
I’m moving this as it certainly earns a place in into the tutorials section!

I’ll be doing this myself as soon as I have some time. Nice work


This is great. Thanks for getting this working.

I have made this into a generic piston which can be easily consumed in other pistons by passing the arguments via Global variables.

Before importing the Piston using backup code, please create following Global variables.


Piston an be executed as shown below


Let me know what you all think.


that was gonna be one of my next questions, how do you create your own methods for easy code reuse, thanks


I like it, cause can have separate profiles, adding _John _Lisa ect, if more then one pushover account to send too, then do not have to re-enter the keys every time


You may be better using $arg rather than global variables, from my understanding they may not be updated when the notification piston is called. Using execute piston sending in arguments then accessing them via $arg. in the called piston is more reliable, also no need to pollute your global variables with message strings etc. and no need to clean them down after use (for null checks etc.)


Hi @faze, I noticed that option when calling the piston, but I could not see a way to add arguments in piston. I could not find any info on this in the wiki as well. Any screenshot will be helpful.


This should do it:



Note: you don’t need to set the variable messages like I have and can use $args.message wherever needed.


I like the args better then global vars, thanks


Thanks, I was able to get the arguments working.

However, I also wanted to check if the argument is blank.

So far I have tried If value is “” “null” “blank”, but thing is working.

All of above fails.


Try $args.undefined


Oops that was left in whilst I worked out a null check! It does need fixing but I don’t yet know how to do a null/blank/white space check, if only I could import a class library… wait I’ve had an idea for a feature request!


Thanks @c1arkbar. That worked.


Is priority a number or value?


can be a value of -2 to 2, I use 0 for most of my alerts
search for “Message Priority” for more


Thanks I never use the feature. I have an issue with the global piston I’m trying to fix.

║An error occurred while executing the event: java.lang.NullPointerException: Cannot get property ‘v’ on null object


Thought I’d share my piston with everyone’s comments and suggestions incorporated (all appreciated!). It takes advantage of most of the API features without making usage overly cumbersome.

Features incorporated: (arg name in parenthesis)

  • Recipient Specification (POuser) - Specify an individual or group if users are subscribed to your SmartThings Pushover app
  • Message (POmessage)
  • Title (POtitle)
  • Priority (POpriority) - All priorities are supported. For priority 2, the required expire and retry values are set as 3600 and 30, but you’re welcome to change them to fit your needs
  • Notification Sound (POsound) - list of supported sounds
  • Callback URL (POcallback) - For priority 2 notifications, an acknowledgement callback URL can be defined. You can use a piston execution URL here to trigger a follow-up piston.

By default, these values are passed to the Pushover API:

  • priority = 0
  • title = SmartThings
  • user = The user token you specify to be the default recipient.

Since these are sent by default, the only argument you HAVE to include in the piston call is the message. Here’s a very short piston example calling the notification piston:

Let me know if you have any questions or suggestions on how to improve it!


Do you have to define the variables from pushover and each person that you want to call the pushover Piston from? For example I import your first person above and then I want to include pushover notifications on an existing piston what I have to include all those to find variables in your image number two in each piston that I want to have a pushover event and also obviously call up the execute pushover piston and argument?

For the URL that points to pushover I noticed in your test piston there brackets around it but when I go to update it it goes between two colons which should it be?

Leslie is there any way to call the Post function with the URLs as a variable since they’re pretty much the same and in the different spots so that you only have to set it once and then call it in the multiple spots you have it?


NOTE: I updated the piston above so you may want to delete and re-import.

No, the only argument you HAVE to define and pass is POmessage (the message text). If you don’t specify a user, it will send it to whomever’s user/group key you initialized the user variable with in the define section.

For example, if you’re the only one that is going to be getting Pushover notifications, you could initialize the user variable with your user key and never have to worry about it again.

That URL should be I guess it anonymized it when I clicked the green camera.


I did that but get an error

2/3/2018, 5:55:10 PM +863ms
+0ms ╔Received event [Casa de Pines].test = 1517705710862 with a delay of 0ms
+188ms ║[:]
+1067ms ║Error executing external web request: Bad Request
+1073ms ╚Event processed successfully (1073ms)