Send Pushover notifications with pictures and hyperlinks

I'm not sure what's going on then. No matter what when I add the -F "attachment=....." I never get the pushover notification. Maybe something else weird is going on.

It is definitely saving the image to the folder.

I tried the whole thing from the command line and get the following return from pushover:

{"status":1,"request":"97a05dc4-b812-48f1-ac23-0e4d975a16e1"}

And I'm still getting an error when trying to send the emails: "Email: Error with Gmail Api; 500 Unknown exception (server no response). (12)"

Both stopped working at the same time, no upgrades of any type were done at the time....
 
Ok, my computer illiteracy is showing. I can't execute a curl command in admin command prompt. It just starts over with a new blank command entry, no response.

I did use an alert jpg in the alerts folder and tried some other little things like changing D: to E: drive like it's set up on my computer.

I get the same response everyone else gets when I type in curl.exe -V so it's installed on the computer.

Usually with enough time and reading through the threads multiple times I can usually figure it out but so far not this time.

Does anybody have any ideas?
Screenshot 2022-07-07 134728.jpg
 
Last edited:
What command were you trying?
 
Ok, my computer illiteracy is showing. I can't execute a curl command in admin command prompt. It just starts over with a new blank command entry, no response.

I did use an alert jpg in the alerts folder and tried some other little things like changing D: to E: drive like it's set up on my computer.

I get the same response everyone else gets when I type in curl.exe -V so it's installed on the computer.

Usually with enough time and reading through the threads multiple times I can usually figure it out but so far not this time.

Does anybody have any ideas?View attachment 132790


First off, I don't believe the command line syntax you used will work. You can't use the BI macros from the command line. Try removing the arguments with the macros or substituting hard coded values for the macros and then try running it again from the command line.
 
  • Like
Reactions: sebastiantombs
Try added the -v for verbose, it may show more information about what is going on.
 
First off, I don't believe the command line syntax you used will work. You can't use the BI macros from the command line. Try removing the arguments with the macros or substituting hard coded values for the macros and then try running it again from the command line.

Ok, can you point out what I need to change? I don't have any code writing knowledge and did a copy and paste and thought I had changed everything I needed to.
 
As suggested above, start basic, then add complexity...

First try sending a simple message using cmd.exe...
Code:
curl.exe https://api.pushover.net/1/messages.json -s --form-string "token=REDACTED" --form-string "user=REDACTED" --form-string "message=test"

If this works, then try with an existing attachment...
Code:
curl.exe https://api.pushover.net/1/messages.json -s --form-string "token=REDACTED" --form-string "user=REDACTED" --form-string "message=test w/ attachment" -F "attachment=@D:\Blue Iris\Alerts\DW1.20211114_040000.340193.4113.21601.21519.jpg"

Pay particular attention to spaces in the attachment's filespec - THEY MATTER.

If the attachment does not send, then try this to verify the filespec...
  1. Select the full filespec (without quotes and w/o the '@')
  2. Copy it to the clipboard (Ctrl-C)
  3. Hit the Windows key
  4. Paste the filespec (Ctrl-V)
  5. Hit the Enter key
If the file does not open in your default image viewer, then the filespec is bad.
 
Last edited:
  • Like
Reactions: sebastiantombs
Ok, I have made it to the point where i now receive a pushover alert through command prompt with hyperlinks but the hyperlinks do not work
Screenshot_20220707-233039.png
 
Congrats.

I’m assuming you blacked out the image in the screenshot.

The hyperlinks do not work because the Blue Iris macros (&CAM, etc) will expand only when the curl command is executed by a Blue Iris camera 'On alert' ’Run a program’ action. This was previously mentioned in post #206 above.

If you want “see” the actual curl commands as sent to the Pushover API, you can use the trick described in the following post
 
Last edited:
I have made more progress and thanks to everyone for the help thus far! I was having issues with curl and I guess pointing it in the right direction. I also changed &WAN to &LAN and now when I tap on the UI3 hyperlink it redirects me to UI3 but it never makes it to the login screen. More work to do I guess:idk:Screenshot_20220709-103910.png
 
  • Like
Reactions: sebastiantombs
Hi!

I'm almost there but for the life of me I can't get an image to attach.

I can run the basics through both the command prompt and BI using curl and receive them in the Pushover app. As soon as I try to attach an image, only the text portion comes through as though I didn't attempt to attach anything.

Here's the command prompt results using the verbose flag.

Code:
C:\WINDOWS\system32>curl https://api.pushover.net/1/messages.json --form-string "token=xxxxxxxxxxxxxxxxxxxxx" --form-string "user=xxxxxxxxxxxxxxxxxxxxx" --form-string "message=Front Porch Alert from CMD" --form-string "device=LG_v20" --form-string "sound=pushover" -F "attachment=D:\Blue Iris\Alerts\FPorch.jpg" -v

*   Trying 104.20.125.71:443...
* Connected to api.pushover.net (104.20.125.71) port 443 (#0)
* schannel: disabled automatic use of client certificate
* ALPN: offers http/1.1
* ALPN: server accepted http/1.1
> POST /1/messages.json HTTP/1.1
> Host: api.pushover.net
> User-Agent: curl/7.83.1
> Accept: */*
> Content-Length: 747
> Content-Type: multipart/form-data; boundary=------------------------132715984d14754b
>
* We are completely uploaded and fine
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Date: Wed, 31 Aug 2022 19:35:48 GMT
< Content-Type: application/json; charset=utf-8
< Transfer-Encoding: chunked
< Connection: keep-alive
< X-Frame-Options: SAMEORIGIN
< X-Frame-Options: DENY
< X-XSS-Protection: 1; mode=block
< X-Content-Type-Options: nosniff
< X-Download-Options: noopen
< X-Permitted-Cross-Domain-Policies: none
< Referrer-Policy: strict-origin-when-cross-origin
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Methods: POST, OPTIONS
< Access-Control-Allow-Headers: X-Requested-With, X-Prototype-Version, Origin, Accept, Content-Type, X-CSRF-Token, X-Pushover-App, Authorization
< Access-Control-Max-Age: 1728000
< X-Limit-App-Limit: 10000
< X-Limit-App-Remaining: 9938
< X-Limit-App-Reset: 1662008400
< ETag: W/"70f230abb7b27400a3ca7463ba71b988"
< Cache-Control: max-age=0, private, must-revalidate
< X-Request-Id: 5ff0de12-947b-44ad-8498-ce97ef83b43b
< X-Runtime: 0.055896
< Strict-Transport-Security: max-age=31536000
< X-PO-H: h
< CF-Cache-Status: DYNAMIC
< Server: cloudflare
< CF-RAY: 7438361d198de3a6-ATL
<
{"status":1,"request":"5ff0de12-947b-44ad-8498-ce97ef83b43b"}* Connection #0 to host api.pushover.net left intact

I'm just trying to get a "message" and the associated image. Where am I going wrong?
 
Really good write-up. For someone using this, how does it compare with the built in iOS "10-second GIF" animated alerts?, which can also by-pass do-not disturb.
Parking the URL's, I suppose this setup would not require port-forwarding to view the Alerts\Videos.
 
Really good write-up. For someone using this, how does it compare with the built in iOS "10-second GIF" animated alerts?, which can also by-pass do-not disturb.
Parking the URL's, I suppose this setup would not require port-forwarding to view the Alerts\Videos.
The streaming URL uses UI3, so when used on a device on a cellular connection, the Pushover notifications will:
1. consume more data than the GIF. You can tweak this using the ‘streamingprofile=name’ URL parameter. I use the shortform p=Jpeg%20HD.
2. require the same web server configuration as UI3.
 
  • Like
Reactions: spammenotinoz
Are you sure there’s a space in the path (between Blue and Iris)?

Yes sir! I even copied and pasted the path so I didn't "fat finger" it. ;)

PZRhkUt.png


EDIT: Got it! Syntax is everything... All I needed to do was put the ampersand back in. :wtf:

-F "attachment=@D:\Blue Iris\Alerts\FILENAME"
 
Last edited:
Thank you jaydeel. This is working famously!

You're my newest hero! :clap: