&ALERT_PATH filename is not the same as the actual Alert folder .jpg

bignose3

Young grasshopper
Joined
Jul 15, 2021
Messages
36
Reaction score
10
Location
UK
Hi,

SOLVED or way round.
cmd CLIP JSON does have this information, the file name so can use that.
below is how it works.

Trying to reference the .jpg alert image in python.
I save the &ALERT_PATH to a text file (also the same if I send to MQTT)

The text file or MQTT payload is
eGate.20211010_100358.0.3.jpg

the associated file in the Alerts Folder is
eGate.20211010_100358.0.4099.10022.11530.jpg

New test: new Alert directory, full regenerate.
&ALERT_PATH
eGate.20211010_171139.0.3.jpg

10/10/2021 10:03 3,136,686 eGate.20211010_100358.0.4099.10022.11530.jpg
10/10/2021 15:37 3,496,677 eGate.20211010_100358.136360.131.6511.6420.jpg
10/10/2021 10:04 3,464,760 eGate.20211010_100358.41320.131.9998.9502.jpg
10/10/2021 11:35 2,795,359 eGate.20211010_100358.50840.4099.10017.11997.jpg
10/10/2021 11:36 3,513,351 eGate.20211010_100358.62880.131.8598.9975.jpg
10/10/2021 11:36 3,096,437 eGate.20211010_100358.72920.4099.10028.11863.jpg
10/10/2021 15:36 2,430,417 eGate.20211010_100358.95280.4099.10028.11996.jpg
10/10/2021 17:11 2,966,655 eGate.20211010_171139.0.4099.8500.9701.jpg
10/10/2021 19:16 2,718,098 eGate.20211010_171139.21680.131.10015.11656.jpg
10/10/2021 19:14 2,040,480 eGate.20211010_171139.9760.131.10008.11881.jpg

I also had examples where the Alert filename did not have the 0.0 so no way to have guaranteed link to &ALERT_PATH, it is the case above but some of my other test's
searching the files for eGate.20211010_171139.0 may not have a match & eGate.20211010_171139 will have multiple matches & often completely unrelated.
Note the time difference between many of the with the same date/time.

Edited notes above : think most of below applies but now 99% sure NOT re-trigger.
Firstly not ideal as different lengths as trying to reference the Alert Image means filtering the directory, which if a lot of alert images can take time, perhaps only half a second or so but it all add up with other processes.
to simply point to the full file name would be so much easier & quicker
but secondly & more important is with my first testing I had a number other files in the alerts folder with the same first part,
so filtering the directory to "eGate.20211010_100358" gave 6 or 7 results.

This is odd & perhaps a result of corrupted database as the "100358" is clearly time 10 hours 03 min 58 seconds so really should not be any other file names with the same first part as cannot be triggered at the same time (I am just wondering as I type if a re-trigger, perhaps uses same part & extra) sure were minutes apart - deleted files now so can't check but 80% sure they were unrelated images, I think It would have occurred to me if that was the case)
but whilst testing these were created with the same eGate.20211010_100358... (different last part) but at different times but within the last hour or so (not like they were created weeks ago

If did rebuild, repair etc but same files & names left.

now, I have since regenerated the database, in fact all the options & deleted all exiting 30,000 alert images.

If it was corrupted & I have to filter that is fine but don't want in a few weeks time as the folder & database fills up that there are multiple unrelated images with the same first part & revisit while my mind in on other projects.

I am now thinking perhaps is re-trigger? makes sense, time first triggered, following numbers to identify these but still linking.
 
Last edited:
Top