Send Pushover notifications with pictures and hyperlinks

@smiticans - You get a pushover email address that can be used to send pushes to the pushover app, so you would simply put that email address into the UPSs.
 
@smiticans - You get a pushover email address that can be used to send pushes to the pushover app, so you would simply put that email address into the UPSs.

Correct me if I’m wrong, but you have to send email messages to the Pushover email address to receive them in my pushover app which won’t work without an SMPT server. Like Blueiris, the UPS’s need an SMPT server plus email login credentials to send an email, which I won’t have anymore once Gmail stops allowing unsecured 3rd party apps to connect.

@jaydeel It’s called SMPT Translator. GitHub - YoRyan/smtp-translator: An SMTP server that converts emails into Pushover notifications.
Its listed under intergrations on Pushover’s website
 
For Apple Watch users

I just got the Pushover 'Glances' API to work. You can read more about it here.

1647280498908.png


Here is my curl parameters code
Code:
https://api.pushover.net/1/glances.json -s --form-string "token=REDACTED" --form-string  "user=REDACTED" --form-string "text=hello world"

The 'tricky' part to getting this working is that you must add the Pushover complication to each watch face you use. Here's an example:
1647280661863.png

I'm not sure how useful this might really be. I'm going to try it for Status alert messages sent every 30 minutes (if there are any new log entries).
1647281080441.png

The limitations follow. YMMV.

Limitations
In addition to the per-field limits detailed below, there are platform-specific limitations that must be taken into account:
Apple Watch
Pushing data to the Apple Watch must be done infrequently, or WatchOS will stop processing updates due to battery concerns. Please note that Pushover does not do any throttling of your data updates, so it is up to you to throttle your Glances API calls. When sending data to the Apple Watch, we recommend at least 20 minutes between each call. If you have pushed too much data and WatchOS stops processing updates, this resets overnight.
Remember, the data presented through our Glances API should be low-priority (something to be occasionally glanced at). If you need to send data that is delivered right away and presented to the user, use our Messages API.
 
Last edited:
Has anyone noticed the images not coming through sometimes. Just seemed to start happening last night and today... Weird....
 
I just started using it recently maybe 2-3 days, but I'm just using the notification pushes to the app right now...
 
Has anyone noticed the images not coming through sometimes. Just seemed to start happening last night and today... Weird....
I use only the API option, and I see this on occasion as well… i‘d estimate 1-5 times every 100 notifications… and it appears to be device-dependent.

For example, it just happened on a notification from a script and the image was MIA on my Android device, but arrived just fine on an iPhone and my iPad.
 
I use only the API option, and I see this on occasion as well… i‘d estimate 1-5 times every 100 notifications… and it appears to be device-dependent.

For example, it just happened on a notification from a script and the image was MIA on my Android device, but arrived just fine on an iPhone and my iPad.

OK, just wanted to make sure it wasn't just me.
 
This is one of the reasons I like having the hyperlink in the message... even if the notification image is MIA, can still get the alert jpg.
(that is, until the database is compacted; when this happens all the hyperlinks go stale because the alert database pointers are rebuilt).
 
  • Like
Reactions: sebastiantombs
@jaydeel do you know how I would generate an emergency priority alert 2 so that it keeps ringing until read? I have successfully trigger a priority one alert by adding --form-string priority=1 but the emergency alert requires retry and expire parameters as well.
 
@jaydeel do you know how I would generate an emergency priority alert 2 so that it keeps ringing until read? I have successfully trigger a priority one alert by adding --form-string priority=1 but the emergency alert requires retry and expire parameters as well.
Interesting!
I’ve not yet experimented with this.
I’ll investigate and report back.
 
With prompting by @fenderman

Sending High Priority and Emergency Priority notifications from Pushover via Curl

Compared to sending attachments, this is quite simple!

In the code boxes below are parameter field examples you can use with curl 'Run a program' actions in Blue Iris.

You can use these to send high priority and emergency priority notifications from Blue Iris, like the following screenshot.
1652393041994.png

The Emergency Priority notifications are interesting. You can make them persistent for a given retry time and expire duration.
1652393078683.png
These parameters are required. The units are seconds.
retry must be greater than 30 seconds
expire must be less than 3 hours

=====
About Pushover high priority and emergency priority notifications:
  • bypass a user's quiet hours.
  • always play a sound and vibrate (if the user's device is configured to) regardless of the delivery time
=====
Blue Iris Action Parameter field examples...

High Priority notification (priority=1)

Code:
https://api.pushover.net/1/messages.json -s --form-string "token=YOUR_TOKEN_HERE" --form-string "user=YOUR_USER_KEY_HERE" --form-string "message=priority #1 message<br>(should be red)" --form-string "html=1" --form-string "priority=1"

Or just add this code to an existing Blue Iris Action parameter field...
--form-string "priority=1"

Emergency Priority notification (priority=2)
This one will retry every 30 seconds for 5 minutes (300 seconds).
Code:
https://api.pushover.net/1/messages.json -s --form-string "token=YOUR_TOKEN_HERE" --form-string "user=YOUR_USER_KEY_H[ICODE]ERE" --form-string "message=PRIORITY #2 message<br>Requires 2 parameters:<br>1) 'retry=sec' [at least 30] sec , and <br>2) 'expire=sec' [less 3 hrs]" --form-string "html=1" --form-string "priority=2" --form-string "retry=30" --form-string "expire=300"

Or just add this code to an existing Blue Iris Action parameter field...
--form-string "priority=2" --form-string "retry=30" --form-string "expire=300"

Add an attention getting sound argument, and you'll likely never miss another emergency notification.
--form-string "sound=MY_ANNOYING_SOUND"

=====
You can also check from your browser to see if an emergency priority notification has been acknowledged.

Use this URL

https://api.pushover.net/1/receipts/YOUR_RECEIPT_HERE.json?token=YOUR_TOKEN_HERE

You can test this by sending an API request from cmd.exe, like this
1652394086665.png


Copy the highlighted receipt string to use in the URL above. The URL responses look like the following...

BEFORE ACKNOWLEDGEMENT
Code:
{
    "status":1,
    "acknowledged":0,
    "acknowledged_at":0,
    "acknowledged_by":"",
    "acknowledged_by_device":"","
    last_delivered_at":1652391742,
    "expired":0,
    "expires_at":1652391952,
    "called_back":0,
    "called_back_at":0,
    "request":"5290df0d-491c-409e-afa0-cb65927630b1"
}

AFTER ACKNOWLEDGEMENT
Code:
{
    "status":1,
    "acknowledged":1,
    "acknowledged_at":1652391793,
    "acknowledged_by":"YOUR_USER_KEY",
    "acknowledged_by_device":"galaxy-s21",
    "last_delivered_at":1652391772,
    "expired":0,
    "expires_at":1652391952,
    "called_back":0,
    "called_back_at":0,
    "request":"1763f824-7d7e-4750-b1aa-e531a460759a"
    }

=====
API References:
[1] Message Priority
[2] Emergency Priority Receipts & Callbacks
 
Last edited:
@jaydeel Thanks for this. Its working perfectly. I added --form-string "priority=2" --form-string "retry=30" --form-string "expire=300" to your code in the original post and now I get the image alert with emergency priority. (btw the code in the op still has the space between "Blue Iris" in the path which wont work unless changed to blueiris with no space)
The pushover alert tones are very short. Is there a way to get them to keep ringing the entire time or say 10 seconds? Would uploading a 10-30 second alert tone work?
 
  • Like
Reactions: jrbeddow
The pushover alert tones are very short. Is there a way to get them to keep ringing the entire time or say 10 seconds? Would uploading a 10-30 second alert tone work?
No to repeating a sound. Yes to uploading alternate sounds.

Pushover supports custom sounds. You can also add any Blue Iris sound to your list of custom sounds on your Pusover account. See these posts.

The Pushover Custom Sounds API guide notes a 500kb size limit, and a 30 sec duration limit (for iOS).
And gives some tips for shrinking large files.
 
Last edited:
(btw the code in the op still has the space between "Blue Iris" in the path which wont work unless changed to blueiris with no space)
For whatever reason on my Blue Iris system the space exists in my path. So it works for me. Regardless, I’ve gone ahead and edited the op, as this may be causing others trouble.

Another thing that can look like a path issue is missing the closing quote in the attachment syntax.
I recently experienced this while testing.
-F "attachment=@D:\BlueIris\Alerts\&ALERT_PATH"
 
Last edited:
Configuring Pushover Emergency Notifications for when your Android Device is in Do Not Disturb (DND) mode

Last night while experimenting with the Pushover Emergency notification parameters, I noticed found my Android device was not responding as expected.

I then noticed that it had already entered Do Not Disturb mode.

Correcting this required learning something new (for me anyway). Below is the process in screenshots.

KEY POINTS

Test and verify that your essential Emergency notifications get through DND mode.

These steps likely need to be repeated:

  1. every time you modify (or create a new) Emergency notification (sound, vibration, etc.)
  2. if you uninstall and reinstall the Pushover app.
  3. if you restore your device.
  4. [EDIT 3/2/2024] If you migrate to a new device...
    NOTE: You may need to manually re-enable notification categories. Here's how...
    Settings > Notifications > Advanced settings > 'Manage notification categories for each app'
Even though Pushover API states the following, it is not automatic!
High priority and Emergency priority notifications bypass a user's quiet hours and always play a sound and vibrate (if the user's device is configured to) regardless of the delivery time

=====
Procedure: (Android version 12 (Snow Cone), UI version 4.1))

1. Long-press in any Pushover notification in the notification tray (swipe down on home screen) . Touch Settings.
1652473866291.png

2. You should now see a Notification categories button. Touch it to show a list. Scroll to the first Emergency notification, make sure it’s on, then long-press.
1652473961632.png

3. You should now make sure Show notifications is on, and see the sound to be played in Do not disturb.
1652474396289.png 1652474416099.png

4. Back out of the settings screen and repeat step 3 for every Emergency notification as necessary.

One more thing worth noting... The 2nd screenshot in Step 3 above shows an Emergency notification that uses a Pushover custom sound.
Note the title details, and the addition of a Pushover API-generated MP3 filename in the sound section.
I found this MP3 file (and several others) stored on my device here:
/storage/emulated/0/Android/data/net.superblock.pushover/files/Notifications/zf6m36wr33.mp3

1652476342995.png
 
Last edited:
This is one of the reasons I like having the hyperlink in the message... even if the notification image is MIA, can still get the alert jpg.
(that is, until the database is compacted; when this happens all the hyperlinks go stale because the alert database pointers are rebuilt).
I'm just checking in to see if any workarounds were ever discovered for the "database compaction leading to dead links" issue were ever found. I am sort of "revisiting" this Pushover notifications subject, after spending some time with using the (frankly awful) official Android BI app. UI3 is so vastly superior, I wish I could use it all the time, and with working links directly from notifications. This works great, but I am trying to get away from having to manually run the database maintenance (which breaks the links), or automatic, which will do the same thing daily, etc...
Any news on this front?