Send Pushover notifications with pictures and hyperlinks

dohat leku

Getting the hang of it
Joined
May 19, 2018
Messages
329
Reaction score
34
Location
usa
Things are working well now. I didn't go through all the troubleshooting steps but rather looked back at my syntax character by character and saw an extra space and one thing missing. As soon as I corrected it, it's working! thanks for your help here! Are 10-second gif images working too and is there a link or post on this thread I can look up to attempt it? If not I'll attempt getting a link to a hi-res image and there's no link in my alerts currently Thanks
 

jaydeel

BIT Beta Team
Joined
Nov 9, 2016
Messages
1,186
Reaction score
1,266
Location
SF Bay Area
looked back at my syntax character by character and saw an extra space and one thing missing
Glad you got it working.

Are 10-second gif images working too and is there a link or post on this thread I can look up to attempt it?
This is my GIF solution...
 

dohat leku

Getting the hang of it
Joined
May 19, 2018
Messages
329
Reaction score
34
Location
usa
Nice script on that, will get to it later. Btw, my current setup isn't providing me 2 hyperlinks like you show in Example 1 after I click on the notification. It simply shows

blueiris
<b>garage</b> person:75% and has the time stamp to the right and the pic below

Here's my syntax again. Does anything stand out to you that's wrong?
-s --form-string "token=%996" --form-string "user=%997" --form-string "message=<b>&CAM</b> &MEMO" -F "attachment=@C:\BlueIris\Alerts\&ALERT_PATH" --form-string "device="%998"
 

dohat leku

Getting the hang of it
Joined
May 19, 2018
Messages
329
Reaction score
34
Location
usa
Still not working, I added the other HTML parts into the syntax too like <a href that was missing but maybe I don't have them in the right order?

-s --form-string "token=%996" --form-string "user=%997" --form-string "message=<b>&CAM</b> &MEMO" -F "attachment=@C:\BlueIris\Alerts\&ALERT_PATH" <a href='&WAN/alerts/&ALERT_DB?fulljpeg'>Hi-Res</a> <a href='&WAN/ui3.htm?rec=&ALERT_DB'>UI3</a>" --form-string "html=1" --form-string "device="%998"
 

dohat leku

Getting the hang of it
Joined
May 19, 2018
Messages
329
Reaction score
34
Location
usa
-s --form-string "token=%996" --form-string "user=%997" --form-string "message=<b>&CAM</b> &MEMO" -F "attachment=@C:\BlueIris\Alerts\&ALERT_PATH" <a href='&WAN/alerts/&ALERT_DB?fulljpeg'>Hi-Res</a> <a href='&WAN/ui3.htm?rec=&ALERT_DB'>UI3</a>" --form-string "html=1" --form-string "device=%998"

Does the position or order of the various form strings matter?
 

jaydeel

BIT Beta Team
Joined
Nov 9, 2016
Messages
1,186
Reaction score
1,266
Location
SF Bay Area
Does the position or order of the various form strings matter?
I’ve never tested this, but I don't think so. All are 'named' parameters.

I’ll try testing your syntax on my machine when I get a few minutes.

You haven’t by any chance swapped the user & application token macros?
 

jaydeel

BIT Beta Team
Joined
Nov 9, 2016
Messages
1,186
Reaction score
1,266
Location
SF Bay Area
I think I've figured it out... But just in case I'm wrong I want to see a screenshot of your Configure Run Action page.

Like this...
1716736725605.png
 

dohat leku

Getting the hang of it
Joined
May 19, 2018
Messages
329
Reaction score
34
Location
usa
I’ve never tested this, but I don't think so. All are 'named' parameters.

I’ll try testing your syntax on my machine when I get a few minutes.

You haven’t by any chance swapped the user & application token macros?
It’s working fine except there is no URL link to click on. If I had swapped user and API key, it would not work at all. Attached screenshot
IMG_8573.png
 

dohat leku

Getting the hang of it
Joined
May 19, 2018
Messages
329
Reaction score
34
Location
usa
I basically just get this with no clickable links. Without the macros it gave the lonks

<b>garage</b> person:75%
 

jaydeel

BIT Beta Team
Joined
Nov 9, 2016
Messages
1,186
Reaction score
1,266
Location
SF Bay Area
OK. The problem is that you were not careful in editing and moved the hyperlinks outside of the 'message' parameter value.

It should be this...
Code:
https://api.pushover.net/1/messages.json -s --form-string "token=%996" --form-string "user=%997" --form-string "message=<b>&CAM</b> &MEMO <a href='&WAN/alerts/&ALERT_DB?fulljpeg'>Hi-Res</a> <a href='&WAN/ui3.htm?rec=&ALERT_DB'>UI3</a>" -F "attachment=@C:\BlueIris\Alerts\&ALERT_PATH" --form-string "html=1" --form-string "device=%998"
not this...
Code:
https://api.pushover.net/1/messages.json -s --form-string "token=%996" --form-string "user=%997" --form-string "message=<b>&CAM</b> &MEMO" -F "attachment=@C:\BlueIris\Alerts\&ALERT_PATH" <a href='&WAN/alerts/&ALERT_DB?fulljpeg'>Hi-Res</a> <a href='&WAN/ui3.htm?rec=&ALERT_DB'>UI3</a>" --form-string "html=1" --form-string "device=%998"
Note how the two HTML hyperlinks are outside of the 'message' parameter value. And the second one has a errant double quote following it.
<a href='&WAN/alerts/&ALERT_DB?fulljpeg'>Hi-Res</a>
<a href='&WAN/ui3.htm?rec=&ALERT_DB'>UI3</a>"
 

jaydeel

BIT Beta Team
Joined
Nov 9, 2016
Messages
1,186
Reaction score
1,266
Location
SF Bay Area
BTW, I asked for the screenshot because what you pasted in post #589 had a newline after the https://api.pushover.net/1/messages.json bit.
If this newline was actually in your Run Action 'Parameters' configuration, curl would choke on it.

For this reason, it's best to post code-like settings in a CODE block...
1716738473791.png
 
Last edited:

dohat leku

Getting the hang of it
Joined
May 19, 2018
Messages
329
Reaction score
34
Location
usa
Sorry was away on a camping trip. Putting it in a code block and chose general but let me know if I should use Rich BB code block. Do you still see an error? Still not getting any HTML links. Btw your example 1 code block on pg1 also has a " after </a>

Code:
https://api.pushover.net/1/messages.json -s --form-string "token=%996" --form-string "user=%997" --form-string "message=<b>&CAM</b> &MEMO" -F "attachment=@C:\BlueIris\Alerts\&ALERT_PATH" <a href='&WAN/alerts/&ALERT_DB?fulljpeg'>Hi-Res</a> <a href='&WAN/ui3.htm?rec=&ALERT_DB'>UI3</a> --form-string "html=1" --form-string "device=%998"
 

jaydeel

BIT Beta Team
Joined
Nov 9, 2016
Messages
1,186
Reaction score
1,266
Location
SF Bay Area
The 2 hyperlinks <a>href=...</a> are orphaned from the message argument. This is why they are MIA.

Insert them after &MEMO in the --form-string="message=...&MEMO" argument.

Try this...
Code:
https://api.pushover.net/1/messages.json -s --form-string "token=%996" --form-string "user=%997" --form-string "message=<b>&CAM</b> &MEMO <a href='&WAN/alerts/&ALERT_DB?fulljpeg'>Hi-Res</a> <a href='&WAN/ui3.htm?rec=&ALERT_DB'>UI3</a>" -F "attachment=@C:\BlueIris\Alerts\&ALERT_PATH" --form-string "html=1" --form-string "device=%998"
 

dohat leku

Getting the hang of it
Joined
May 19, 2018
Messages
329
Reaction score
34
Location
usa
Working! I should work on my accuracy. I'm assuming all notifications to pushover are priority Normal? If so I'll add this right at the end of my syntax so it beeps my phone at night when it's in sleep mode (notifications settings always deliver immediately critical alerts is enabled)
--form-string "priority=1"
 

rdxny

Getting the hang of it
Joined
Oct 15, 2022
Messages
146
Reaction score
87
Location
ny
I have pushover send alerts and a photo to my android phone, works great. In the past, my samsung watch also alerted me (pushover alert) with a small photo, but now all I get is the txt itself, no photo (the phone shows the photo, not the watch). Anyone know why... did I change something? The phone is fine, so I assume nothing in my alert script in BI applies?
 

jaydeel

BIT Beta Team
Joined
Nov 9, 2016
Messages
1,186
Reaction score
1,266
Location
SF Bay Area
I'm assuming all notifications to pushover are priority Normal? If so I'll add this right at the end of my syntax so it beeps my phone at night when it's in sleep mode (notifications settings always deliver immediately critical alerts is enabled)
--form-string "priority=1"
From the API..
"High Priority (1)
Messages sent with a priority of 1 are high priority messages that bypass a user's quiet hours. These messages will always play a sound and vibrate (if the user's device is configured to) regardless of the delivery time. High-priority should only be used when necessary and appropriate.
High-priority messages are highlighted in red in the device clients."​
 
Top