Send Pushover notifications with pictures and hyperlinks

jaydeel

BIT Beta Team
Joined
Nov 9, 2016
Messages
1,132
Reaction score
1,240
Location
SF Bay Area
The file doesn't actually exist, how does that happen?
The &ALERT_PATH macro doesn't appear to expanding correctly.

Or maybe the expanded macro contains a character that cannot be written to the text file?

In either case, I've not seen this before... The link below may provide more clues.

Otherwise, you may need to email support.

Before contacting support, here's a way to inspect/monitor the ALERT macros in real rime. I've previously referred to this as the 'msg.exe trick'.
 
Last edited:

tward392

Pulling my weight
Joined
Sep 9, 2019
Messages
251
Reaction score
145
Location
US
The &ALERT_PATH macro doesn't appear to expanding correctly.

Or maybe the expanded macro contains a character that cannot be written to the text file?

In either case, I've not seen this before... The link below may provide more clues.

Otherwise, you may need to email support.
Do you thing a database Repair/Regenerate might fix the issue?[/QUOTE]
 

tward392

Pulling my weight
Joined
Sep 9, 2019
Messages
251
Reaction score
145
Location
US
Compact/repair
Repair/Regenerate

Neither worked, sent an email to BI support to see if maybe they know.... Just weird that that machine stopped returning a Alert Image Filename that exists...

Delete & Regenerate is maybe the next thing I'll try if support doesn't know.
 

jaydeel

BIT Beta Team
Joined
Nov 9, 2016
Messages
1,132
Reaction score
1,240
Location
SF Bay Area
Ken did recently change how the macro &ALERT_DB is formulated.

Maybe there were ancillary changes that somehow affect &ALERT_PATH.
 

jaydeel

BIT Beta Team
Joined
Nov 9, 2016
Messages
1,132
Reaction score
1,240
Location
SF Bay Area
Just curious... did you yet try the 'msg.exe trick' to confirm that the &ALERT_PATH macro is expanding to the short version you reported in post #180?
 
Last edited:

sdnomad

n3wb
Joined
Feb 20, 2020
Messages
23
Reaction score
9
Location
Rapid City SD
I have a Dahua NVR and am limited in my understanding on how to set up my NVR to use pushover. I was just going to have my NVR send notifications to my pushover email but how am I supposed to configure my nvr/network/email when I have to enter a SMTP server name and port but there is no SMTP server for pushover? Right now its setup to send alerts to a gmail address with the SMTP server name smtp.gmail.com.
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,884
Reaction score
48,539
Location
USA
@sdnomad - You need to enter an email provider smtp and user and password for like yahoo or Gmail, etc. Then instead of having the NVR send you an email at your provided email address, you put in the TO box the email address for your Pushover account. From there it sends the pushover email to pushover that then sends it out a push to your Pushover app.. Pushover does not provide an smtp server that we can access.
 
Last edited:

sdnomad

n3wb
Joined
Feb 20, 2020
Messages
23
Reaction score
9
Location
Rapid City SD
@sdnomad - You need to enter an email provider smtp and user and password for like yahoo or Gmail, etc. Then instead of having the NVR send you an email at your provided email address, you put in the TO box the email address for your Pushover account. From there it sends the pushover email to pushover that then sends it out a push to your Pushover app.. Pushover does not provide an smtp server that we can access.
Thank you Wittaj, I have it up and working thanks to your help.
 

tward392

Pulling my weight
Joined
Sep 9, 2019
Messages
251
Reaction score
145
Location
US
Yes:

"Please be aware that the alert path CHANGES when the alert is finalized ... several values are appended before the .JPG extension. I want to make sure this is your issue?

Is it possible for you to copy or access the file prior to the alert ending?

Thanks

Ken"

But nothing on if I can fix it with a database Delete & Regenerate or if it is something he has to fix... I just asked this morning if it was something he was working on.....
 

jaydeel

BIT Beta Team
Joined
Nov 9, 2016
Messages
1,132
Reaction score
1,240
Location
SF Bay Area
Interesting detail. Thx!

A thought. Maybe you can insert a 'Wait' action before the curl 'Run a Program' action in an attempt to delay using the macro until the alert is fully processed.
You might need to experiment with durations. I'd start with 2x or 3x your average Deepstack processing time (milliseconds).
 

tward392

Pulling my weight
Joined
Sep 9, 2019
Messages
251
Reaction score
145
Location
US
Interesting detail. Thx!

A thought. Maybe you can insert a 'Wait' action before the curl 'Run a Program' action in an attempt to delay using the macro until the alert is fully processed.
You might need to experiment with durations. I'd start with 2x or 3x your average Deepstack processing time (milliseconds).
I tried 1000ms just to make extra sure but it doesn't appear to make a difference in the &ALERT_PATH value.
 

jrbeddow

Getting comfortable
Joined
Oct 26, 2021
Messages
374
Reaction score
489
Location
USA
I'll be interested as well to see if this is the root cause of about 1/4 of my Pushover alerts not "resolving" when I use the UI3 link. Ultimately I can generally manually find the alert (based on the time and camera combination), but as I said, in about one of every 4 or 5 alerts it won't open the file directly.
 

jaydeel

BIT Beta Team
Joined
Nov 9, 2016
Messages
1,132
Reaction score
1,240
Location
SF Bay Area
I tried 1000ms just to make extra sure but it doesn't appear to make a difference in the &ALERT_PATH value.
Rats.

Another idea... You can try monitoring changes to the &ALERT_PATH value by using the 'msg.exe trick'.
1. Assign the following action (screenshot #1) to the 'On call' action set for preset on a camera.
2. After a trigger, keep clicking the preset every 2-15 seconds (pick a duration).
3. You'll get a msg box for each click. But you'll only see the last one.
4. When you've done this as long as you want, close the displayed msg window, then the next will display, and so on... (you might want to take screenshots of each msg box).
Perhaps this will reveal if/when changes occur to &ALERT_PATH macro.

1655240330305.png

Paste this in the 'Parameters' field.
* Timestamp=%x_%X, DB=&ALERT_DB, PATH=&ALERT_PATH

This is what you see after each preset click.
1655240861950.png
 
Last edited:

tward392

Pulling my weight
Joined
Sep 9, 2019
Messages
251
Reaction score
145
Location
US
Here is the latest response from Ken:

"The best solution at this time would be to COPY the file to another location while the alert is still active where you can then manipulate it. Those values that you see in the filename are ADDED to the filename once the alert is finalized.

You may also be able to use &ALERT_DB which is the DB locator for the image instead of the filename. Then you should be able to pull an image from the web service as /file/clips/&ALERT_DB

Thanks

Ken"
 

tward392

Pulling my weight
Joined
Sep 9, 2019
Messages
251
Reaction score
145
Location
US
Me:
---------------
That doesn't really clear anything up, I have two Blue Iris machines setup the same way with the same version and only one started doing this.

Ken:
---------------
There must be some difference.

On the "working" systems, they are recent versions as well, and they are not renaming the files?

I am not sure why you are unable to access the file during the time of the alert (before the file is renamed?) Or can you just use a wildcard file access, as the filename is just appended, the beginning part is constant.


Me:
---------------
Yes, both systems are the same versions (current). The one system just stopped working one day (8-June).

I started getting this error:
Email: Error with Gmail Api; 500 Unknown exception (server no response). (12)
and my pushover notifications stopped until I removed the sending of the image.
 

jaydeel

BIT Beta Team
Joined
Nov 9, 2016
Messages
1,132
Reaction score
1,240
Location
SF Bay Area
Attached is a batch file you can execute before the action that executes the Pushover curl action.
1655485414613.png

Here's what it does:
  • It identifies the most recent alert jpg for a specified camera and copies it to a folder of your choice, naming it 'camname_latest.jpg'.
  • It then loads the full filespec for the copied jpg file to Blue Iris macro no. '777'.
How to use:
  1. Edit the batch file 'user settings' to set your Blue Iris alerts folder, webserver address, etc.
  2. Edit the pushover curl command to point to macro %777 instead of the Blue Iris alerts folder. i.e., -F "attachment=@D:\Blue Iris\Alerts\&ALERT_PATH" to -F "attachment=@%777"
I've tested this on one of my cameras and it works.

If I was using this on multiple cameras I'd edit the batch file to save to a different macro for each camera. This would avoid conflicts if several cameras were triggering at the same time. EDIT: for this option, check out attachment v2.
 

Attachments

Last edited:

tward392

Pulling my weight
Joined
Sep 9, 2019
Messages
251
Reaction score
145
Location
US
Attached is a batch file you can execute before the action that executes the Pushover curl action.
View attachment 131014

Here's what it does:
  • It identifies the most recent alert jpg for a specified camera and copies it to a folder of your choice, naming it 'camname_latest.jpg'.
  • It then loads the full filespec for the copied jpg file to Blue Iris macro no. '777'.
How to use:
  1. Edit the batch file 'user settings' to set your Blue Iris alerts folder, webserver address, etc.
  2. Edit the pushover curl command to point to macro %777 instead of the Blue Iris alerts folder. i.e., -F "attachment=@D:\Blue Iris\Alerts\&ALERT_PATH" to -F "attachment=@%777"
I've tested this on one of my cameras and it works.

If I was using this on multiple cameras I'd edit the batch file to save to a different macro for each camera. This would avoid conflicts if several cameras were triggering at the same time. EDIT: for this option, check out attachment v2.
Do I have do do anything in the actual BI Macros?
 

jaydeel

BIT Beta Team
Joined
Nov 9, 2016
Messages
1,132
Reaction score
1,240
Location
SF Bay Area
If I'm understanding the question, then no. The batch file creates the macros (overwriting existing contents, if any).

The batch file uses a Blue Iris Http interface command. Aside from directly editing the registry, this is the only way to create/edit high number macros (the max is 999).
 
Last edited:
Top