Send Pushover notifications with pictures and hyperlinks

Pogo

Getting the hang of it
Joined
Apr 26, 2022
Messages
167
Reaction score
62
Location
Reportedly in the Area
Again, thanks for your response and input. I truly appreciate you taking the time to address something this trivial.

And with all due respect to the more adventurous and development minded folks among you, I'm a basic needs 5.7.4.2 guy and intend to stay that way as long as possible! LOL

I don't know if the image path would be different for the email attachment format than for the curl script, but the resulting display behavior of the app certainly indicates the images are each handled differently once they hit the Android app. A little digging should reveal if they are actually derived from the same BI source location and whether they are manipulated pre or post the app itself. Just haven't dug into that yet.

I've found the Pushover email alert to essentially behave as desired when the screen is rotated and the image tapped as shown below. It's also a clean image of a 1080 main stream (relatively speaking) at 80% quality.

Email Screenshot_20240814-214157_resized.png

The push alert by comparison is dramatically smaller version of the same image that requires the zoom and pan controls (or screen swiping) to affect the size and position resulting in degraded quality and no default anchoring or reference..., just random floating on the display. Not convenient or practical for the purpose.

Push Screenshot_20240814-215207_resized.png

I'll try the link to the discussion group and see where that may go. The ability to rotate and enlarge to full screen is obviously there in the email format. Seems like applying the same capability to the push format would be a piece o' cake at the app level itself and not require external script interaction to apply.

Thanks again for your time and ongoing support here. I've gained an enormous amount of knowledge from your efforts with this thread.
 
Joined
Aug 17, 2019
Messages
6
Reaction score
3
Location
USA
I'm not exaggerating when I say this post and the effort from volunteers like the OP, jaydeel, allows me to sleep tonight. I've been fixated on getting my mobile BI alerts working after they mysteriously stopped working. My anxiety has been kicking in feeling a total lack of security. Thank you.
 

hex52

Getting the hang of it
Joined
Apr 18, 2018
Messages
39
Reaction score
31
How do I specify the pushover sound using pushover_rezie.ps1? I tried --form-string and did not see any mention in the script, so it this not supported?
 

jaydeel

BIT Beta Team
Joined
Nov 9, 2016
Messages
1,310
Reaction score
1,368
Location
SF Bay Area
How do I specify the pushover sound using pushover_rezie.ps1? I tried --form-string and did not see any mention in the script, so it this not supported?
You can specify this parameter via the user-settings file (pushover_resize_user_settings.ps1); see setting $po_sound.
Please note that $po_sound is currently a global setting only; i.e., you cannot specify different sounds by camera, etc.
 

hex52

Getting the hang of it
Joined
Apr 18, 2018
Messages
39
Reaction score
31
You can specify this parameter via the user-settings file, see setting $po_sound.
Please note that $po_sound is currently a global setting only; i.e., you cannot specify different sounds by camera, etc.
Yeah I ended up copying the scripts for each camera and specifying the sound. It'd be simpler to be able to pass it in directly like when calling pushover directly.
 
Joined
Aug 15, 2021
Messages
4
Reaction score
4
Location
Earth
Came here from reddit as a solution to borken alerts on Android.
Thanks guys!

Reddit Link:
 

jaydeel

BIT Beta Team
Joined
Nov 9, 2016
Messages
1,310
Reaction score
1,368
Location
SF Bay Area
Updated Powershell script 'pushover_resize.ps1' (post #347)
Script updated to V2.0

Significant changes:
  • BREAKING CHANGE: must replace old user-setting file
  • BREAKING CHANGE: eliminated support for positional arguments; now must use named arguments
  • BREAKING CHANGE: converted arguments -Quiet and -Demo from Y/N strings to switches
  • BREAKING CHANGE: default path for resized images is no longer the Blue Iris Alerts folder
    (we no longer add files to Blue Iris-managed folders); please provide a path in the user settings file $img_path
  • BREAKING CHANGE: script now requires two named arguments: -Msg and -AttachFile
  • ADDED: arguments -Sound and -Devices to override global defaults in the user-settings file
  • ADDED: argument -Method to override the script's default method when using argument -TargetKB
  • ADDED: argument -Help to display a usage guide (also displayed when script is executed with no arguments)
  • IMPROVEMENT: prettier console output - script's output categorized and clarified
The most significant issues/benefits of these changes are:
1. You may need to edit your current camera 'On alert' actions (if not currently using -Named arguments)
2. You may need create a new disk folder for the script to use for managing resized JPG files
3. Each Blue Iris camera 'On alert' Action can specify unique Pushover notification sounds and devices

HEADS-UP

If you test the -Sound argument and it seems that it's not working, please be aware that the sound is played by the device's Pushover app only when the app is closed or in the background.
 
Last edited:

Azzimodo

n3wb
Joined
Sep 10, 2024
Messages
2
Reaction score
0
Location
Mid Missouri
Does anyone have Pushover working (via the curl process) with BlueIris V 4.8.6.3 ?

I can get the script to work if I modify it to send a specific picture but the &ALERT_PATH option doesn't seem to work. I don't know that V4 uses that?
I turned on capturing the image on alert just to use this process, (more for troubleshooting to verify an image exists).

I can use Pushover via the email method (using yahoo as the smtp path), so I know all my tokens, etc work and it can send an image from the db that way, however again I don't think V4 uses that naming convention for the image.

For what it's worth, here's the script:
-s --form-string "token=MYTOKEN" --form-string "user=MYUSERID" --form-string "message=<b>&CAM</b> &MEMO" -F "attachment=@F:\BlueIris\Alert\&ALERT_PATH"
An alert picture is going to that location.

and when I modify that to be an attachment with an actual file name, it works. Any ideas?
 

jaydeel

BIT Beta Team
Joined
Nov 9, 2016
Messages
1,310
Reaction score
1,368
Location
SF Bay Area
Does anyone have Pushover working (via the curl process) with BlueIris V 4.8.6.3 ?

I can get the script to work if I modify it to send a specific picture but the &ALERT_PATH option doesn't seem to work. I don't know that V4 uses that?
I turned on capturing the image on alert just to use this process, (more for troubleshooting to verify an image exists).

I can use Pushover via the email method (using yahoo as the smtp path), so I know all my tokens, etc work and it can send an image from the db that way, however again I don't think V4 uses that naming convention for the image.

For what it's worth, here's the script:
-s --form-string "token=MYTOKEN" --form-string "user=MYUSERID" --form-string "message=<b>&CAM</b> &MEMO" -F "attachment=@F:\BlueIris\Alert\&ALERT_PATH"
An alert picture is going to that location.

and when I modify that to be an attachment with an actual file name, it works. Any ideas?
From a quick scan of my help pdf archive, it appears that macro &ALERT_PATH was not introduced until the 5.2.x series of updates.
 

Azzimodo

n3wb
Joined
Sep 10, 2024
Messages
2
Reaction score
0
Location
Mid Missouri
From a quick scan of my help pdf archive, it appears that macro &ALERT_PATH was not introduced until the 5.2.x series of updates.
That's what I was afraid of. Thanks for verifying. It works via the email method, so somehow BI is sending an image (and that was before I told it to save images).
 

Pogo

Getting the hang of it
Joined
Apr 26, 2022
Messages
167
Reaction score
62
Location
Reportedly in the Area
If your intention is to primarily receive image alerts vs. active links, you may find the email method more appropriate than push anyway as described in post #641 above. The delivery time difference in my particular area (and with Verizon 4G) does vary, but is usually negligible between the two methods at my residence via my home wi-fi. Push works better when on Verizon directly.
 

digity

Young grasshopper
Joined
May 10, 2017
Messages
36
Reaction score
5
I have a weird issue where I get Pushover alerts with an attachment consistently on one camera, but only about 33% of the alerts on another camera. They're both configured essentially the same in Blue Iris and are using the same exact arguments for CURL. When troubleshooting, if I remove the attachment clause (see below) from the arguments, that 2nd camera gets alerts consistently. When I put the attachment clause back in, I'm back to alerts getting delivered a third of the time. Obviously I want the alert image attached for convenience, so how can I further troubleshoot to figure out why this is happening and hopefully resolve it??

Code:
-F "attachment=@C:\BlueIris\Alerts\&ALERT_PATH"
 

jaydeel

BIT Beta Team
Joined
Nov 9, 2016
Messages
1,310
Reaction score
1,368
Location
SF Bay Area
I have a weird issue where I get Pushover alerts with an attachment consistently on one camera, but only about 33% of the alerts on another camera. They're both configured essentially the same in Blue Iris and are using the same exact arguments for CURL. When troubleshooting, if I remove the attachment clause (see below) from the arguments, that 2nd camera gets alerts consistently. When I put the attachment clause back in, I'm back to alerts getting delivered a third of the time. Obviously I want the alert image attached for convenience, so how can I further troubleshoot to figure out why this is happening and hopefully resolve it??

Code:
-F "attachment=@C:\BlueIris\Alerts\&ALERT_PATH"
Apparently the macro &ALERT_PATH is not always resolving correctly at the time the Pushover curl command is sent.

Two suggestions:

1. You can try checking the following box in in the Pushover action.
1726341151074.png

(learn more, thx @txedgeman)

2. You can inspect the macro's resolved value in real time by using my 'msg.exe trick' (example).

How: In the 'On alert' action set, insert the following msg.exe 'Run a program' action BEFORE the pushover action:

File: msg.exe
Parameters: * /TIME:60 DB=&ALERT_DB, PATH=&ALERT_PATH

This run action should send a self-closing popup message (60 seconds) to your screen. (You can use other macros if desired.)

NOTE: if you are not saving a Hi-res JPG or an AI markup image, then &ALERT_PATH should resolve to temporary JPG. By design, it is ephermeral and may not exist when the action set terminates and the curl command process is still running. Hence the need for the checkbox in #1.
(learn more)
 
Last edited:

gantiwar

n3wb
Joined
Sep 15, 2024
Messages
7
Reaction score
0
Location
Mebane
Hello, I am fairly new to this and I cant wrap my head around something. Ive followed the instructions here and am still not able to get pushover notifications. Can someone please advise.

Here is my syntax.

-s --form-string "token=REDACTED" --form-string "user=REDACTED" --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>" --form-string "html=1" --form-string "device=XX" --form-string "sound=siren" -F "attachment=@C:\BlueIris\Alerts" --ssl-no-revoke

I am not getting any notifications. I try to run it with cmd.exe and here is the image I get. I am guessing there is a connection that is being timed out. But I am a newbie and I am nowhere near literate to comprehend this.
Verbose.png


A few things:
1. I am still in DEMO mode
2. I have not configured remote viewing (planning to use zerotier - if it is not redundant with this
3. I am sure that my VLANs should not affect this
4. I have Reolink cx8 cameras (I know- I shouldve looked here first)

Any help will be greatly appreciated. Please take into account I am very very illiterate with this and I am trying to learn as I go.
 

jaydeel

BIT Beta Team
Joined
Nov 9, 2016
Messages
1,310
Reaction score
1,368
Location
SF Bay Area
Hello, I am fairly new to this and I cant wrap my head around something. Ive followed the instructions here and am still not able to get pushover notifications. Can someone please advise.

Here is my syntax.
1. The attachment argument is pointing to a folder, not a file. Be sure to use the full path to an actual JPG file alert file in your Alerts folder.
2. Keep in mind that Blue Iris macros (e.g., &MEMO, &WAN) are meaningless when the command is not executed within a Blue Iris action set — like from cmd.exe

Tips when debugging the syntax:
1. Remove all arguments but the key ones (token, user, attachment) until you get the command working. Then add additional ones, retesting each time.

2. Copy it to a text editor, preferable a code editor (like Notepad++), and insert a newline before each argument, as illustrated below. Issues will stand out.

Code:
https://api.pushover.net/1/messages.json
-s
--form-string "token=REDACTED"
--form-string "user=REDACTED"
--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>"
--form-string "html=1"
--form-string "device=XX"
--form-string "sound=siren"
-F "attachment=@C:\BlueIris\Alerts"
--ssl-no-revoke
 
Last edited:

gantiwar

n3wb
Joined
Sep 15, 2024
Messages
7
Reaction score
0
Location
Mebane
1. The attachment argument is pointing to a folder, not a file. Be sure to use the full path to an actual JPG file alert file in your Alerts folder.
2. Keep in mind that Blue Iris macros (e.g., &MEMO, &WAN) are meaningless when the command is not executed within a Blue Iris action set — like from cmd.exe

Tips when debugging the syntax:
1. Remove all arguments but the key ones (token, user, attachment) until you get the command working. Then add additional ones, retesting each time.

2. Copy it to a text editor, preferable a code editor (like Notepad++), and insert a newline before each argument, as illustrated below. Issues will stand out.

Code:
https://api.pushover.net/1/messages.json
-s
--form-string "token=REDACTED"
--form-string "user=REDACTED"
--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>"
--form-string "html=1"
--form-string "device=XX"
--form-string "sound=siren"
-F "attachment=@C:\BlueIris\Alerts"
--ssl-no-revoke
It seems that I have something with my folders in the Blue iris that is messed up and I cant find it. If I place a direct pathway to a JPG file on the @ section, the cmd.exe and the push notification works properly. as soon as I plug in the \&ALERT_PATH" it stops working again. Any thoughts?
 

jaydeel

BIT Beta Team
Joined
Nov 9, 2016
Messages
1,310
Reaction score
1,368
Location
SF Bay Area
It seems that I have something with my folders in the Blue iris that is messed up and I cant find it. If I place a direct pathway to a JPG file on the @ section, the cmd.exe and the push notification works properly. as soon as I plug in the \&ALERT_PATH" it stops working again. Any thoughts?
The macros only work when used in a Blue Iris action. Is this where you are using them?

If affirmative, try the tips in post 655 above
 
Top