OpenALPR Tool - Save and Query CSV Exports

tech101

Known around here
Joined
Mar 30, 2015
Messages
1,472
Reaction score
2,125
Location
SF BayArea, USA
Ah again, Seem like something got changed around 4:30 pm today California local time.. It stopped working again...

1602724960192.png
 

Gymratz

Pulling my weight
Joined
Jun 24, 2017
Messages
114
Reaction score
130
Thank you @Gymratz for making this tool, with @tech101's guide I was able to get this working.

Would it be possible to add an option to have it automatically start the auto download as soon as the program opens? I have it installed on a computer I remotely restart sometimes and I'm not able to remotely start auto download.
That would actually be beneficial... I'll look into adding that.
 

Gymratz

Pulling my weight
Joined
Jun 24, 2017
Messages
114
Reaction score
130
Ah again, Seem like something got changed around 4:30 pm today California local time.. It stopped working again...

View attachment 72594
Can you stop / start so it does the full download? See what is picked up?
Can you check the ALPR service - are the hits showing up there?

I've recently been having issues with the ALPR service not recognizing plates - I've actually got that service restarting daily for the last few weeks - solved all those problems.

My downloader is still working - picked up the last car a few minutes ago.
1602726274700.png
 

tech101

Known around here
Joined
Mar 30, 2015
Messages
1,472
Reaction score
2,125
Location
SF BayArea, USA
I just restarted and it started working to weird .. wonder if openalpr agent itself stopped thank you GymRatz all good sorry for the scare LOL
 

tech101

Known around here
Joined
Mar 30, 2015
Messages
1,472
Reaction score
2,125
Location
SF BayArea, USA
It would be nice if downloader can say remember last setting and run as service.. Also if it detects say 0 plates imported in more than 24 hours or 12.. then restart the service auto login and all that good stuff :D That be nice.. And Gym Ratz put a donation link I would definitely donate.. Thank you for making such a great tool :D
 

Gymratz

Pulling my weight
Joined
Jun 24, 2017
Messages
114
Reaction score
130
One other feature request if possible, can you add a feature to save the minutes between downloads as well so that value also doesn't need to be changed on restart. Thanks again!
Honestly, I never really considered there would be a desire for anything other than every minute! Hah - I'll take a look at this.
 

Gymratz

Pulling my weight
Joined
Jun 24, 2017
Messages
114
Reaction score
130
It would be nice if downloader can say remember last setting and run as service.. Also if it detects say 0 plates imported in more than 24 hours or 12.. then restart the service auto login and all that good stuff :D That be nice.. And Gym Ratz put a donation link I would definitely donate.. Thank you for making such a great tool :D
Most settings are remembered (everything on the "Settings" page), but the minutes one I can add in too.
It is supposed to auto log you in. I've had issues twice in the past few months where it hasn't for me - not sure if a change to the webpage caused that. Next time it happens, if I'm able to I'll take a look at why so I can fix it (instead of just clicking the login button).
Not sure I'll ever get to it being a service or auto-healing. In all honesty, with the "start downloading on load" - I was probably just going to restart the app nightly like I do with ALPR.
 

tech101

Known around here
Joined
Mar 30, 2015
Messages
1,472
Reaction score
2,125
Location
SF BayArea, USA
Most settings are remembered (everything on the "Settings" page), but the minutes one I can add in too.
It is supposed to auto log you in. I've had issues twice in the past few months where it hasn't for me - not sure if a change to the webpage caused that. Next time it happens, if I'm able to I'll take a look at why so I can fix it (instead of just clicking the login button).
Not sure I'll ever get to it being a service or auto-healing. In all honesty, with the "start downloading on load" - I was probably just going to restart the app nightly like I do with ALPR.
I have seen it I think it like after a week or so It ask for clicking on login not a biggie I usually do and it starts working again. But agree the auto login is not working for some reason probably like you said they must have changed something within there page. I Have mine do it every 15 mins just because I think in the past I have seen where mine was crashed and no longer there.. Not sure it was because of my own PC or what caused it.

But if the app can even start itself or something that be nice. I will see I am not sure If windows built in task scheduler can do that. Say if app is not running run the app thru task scheduler I will look into it..

If the Downloader can login itself and start downloading that be awesome. Anyhow Thank you so much Gymratz and dlong. I been using this since march and it is such an amazing tool. I love it! Thank you really!
 

Gymratz

Pulling my weight
Joined
Jun 24, 2017
Messages
114
Reaction score
130
Setting to allow Auto Download on Startup = Works
Updated login code = Works
Updated "Start Auto Downloads" saves the Timer Value

Validated by setting to 2 minutes & auto start, closing app, opening, set to 2 minutes and did the 2-day download right away.

Of course, this involved changing a handful of files / locations, and I didn't exactly keep track.
Took me damn near as long to remember how to commit/send to github... Hopefully it worked (seems like it).
@tech101 if you're feeling ambitious, can you give it a try and pull down the updates? Definitely keep a copy of what you have - just in case. This process of publishing the code for others is quite foreign to me!

I would also suggest you save a copy of your current (running) configuration file. You can't just flat out paste it into the new build (two new values) - but you can use it to repopulate the new config file easier by combining the values.

Finally, for what it's worth, I have a batch file on my machine that I use the windows built-in task schedule to execute once a day.
Current content of batch file is:
net stop "OpenALPR Agent"
net stop "OpenALPR Link"
net stop "OpenALPR Queue"
net start "OpenALPR Agent"
net start "OpenALPR Link"
net start "OpenALPR Queue"

net stop "DahuaSunriseSunset"
net start "DahuaSunriseSunset"

I think it will be pretty easy to add in killing the lpr_downloader process and re-start it. Just haven't looked at it yet.
 

tech101

Known around here
Joined
Mar 30, 2015
Messages
1,472
Reaction score
2,125
Location
SF BayArea, USA
Just started the new one.. It is keeping the time to 15 min for me nice.. Now upon start auto download did not start is that something I have to still click ?

1602731538941.png

Never Mind did not see the check box in setting let me try again..
 

Sprite

Young grasshopper
Joined
Sep 2, 2020
Messages
33
Reaction score
12
Location
California
Setting to allow Auto Download on Startup = Works
Updated login code = Works
Updated "Start Auto Downloads" saves the Timer Value

Validated by setting to 2 minutes & auto start, closing app, opening, set to 2 minutes and did the 2-day download right away.

Of course, this involved changing a handful of files / locations, and I didn't exactly keep track.
Took me damn near as long to remember how to commit/send to github... Hopefully it worked (seems like it).
@tech101 if you're feeling ambitious, can you give it a try and pull down the updates? Definitely keep a copy of what you have - just in case. This process of publishing the code for others is quite foreign to me!

I would also suggest you save a copy of your current (running) configuration file. You can't just flat out paste it into the new build (two new values) - but you can use it to repopulate the new config file easier by combining the values.

Finally, for what it's worth, I have a batch file on my machine that I use the windows built-in task schedule to execute once a day.
Current content of batch file is:
net stop "OpenALPR Agent"
net stop "OpenALPR Link"
net stop "OpenALPR Queue"
net start "OpenALPR Agent"
net start "OpenALPR Link"
net start "OpenALPR Queue"

net stop "DahuaSunriseSunset"
net start "DahuaSunriseSunset"

I think it will be pretty easy to add in killing the lpr_downloader process and re-start it. Just haven't looked at it yet.
Tested and working, thank you!
 

Gymratz

Pulling my weight
Joined
Jun 24, 2017
Messages
114
Reaction score
130
Awesome man - glad all worked well.

Some additional updates as well to both Downloader and Viewer. Comments on such added to first post.
 

tech101

Known around here
Joined
Mar 30, 2015
Messages
1,472
Reaction score
2,125
Location
SF BayArea, USA
Mine is working well. Thank you so much and big database is so much faster........... Like Ludicrous/plaid. Love all the features :) Thank you for all the hard work..

1602911032387.png
 

Gymratz

Pulling my weight
Joined
Jun 24, 2017
Messages
114
Reaction score
130
Tech may do something fancier...

Pull in the updated code from GIT.
In addition to pulling in the code updates, you'll need to execute the two SQL commands in the "Update Instructions" folder - just open both up in SSMS and execute them - it has updates to a query that will be needed before you run the updated Viewer.
The SQL update is backwards compatible (you should be able to run the script and still use the current viewer, as the new functions in the script have defaults).

Update the Settings tab.
1602901905403.png



New functions on the main page:
1602901986350.png



Camera Filter and Status Filter should be self evident, update the drop down and "Search" to limit results. Press the X and "Search" to clear filter.
"Print Daily Report" will e-mail you a report of the results from the main grid. My INTENT is that this is ran for a single day. You can run it for multiple and it will work - but you'll lose functionality. I added into the report "Cars first seen today." I did this by using the DistinctDays = 1. If you run for multiple days, you could have a car seen both days - never before - but it won't show up in the special section.

"Print Report" in the car history section will e-mail you the picture you have selected (from the Car Details grid) and the most recent "X" number of entries.
 

Gymratz

Pulling my weight
Joined
Jun 24, 2017
Messages
114
Reaction score
130
New Updates
After you pull down the updates from Git - run the (TWO) SQL file dated today to create a new table (needed for some new functionality / storage). -- New Table && Updated Query

Settings Page now had a setting for the Web Server to allow easier remote configuration. The setup will require a basic understanding of SQL/Networking, or a slightly better guide than below. Here's the outline though:
  • You'll need to ensure OpenALPR isn't configured to only accept local connections.
  • You'll need to ensure OpenALPR port is allowed through the local firewall.
  • You'll need to enable TCP/IP in SQL Server Configuration Manager. While there, grab the Port that is configured, you'll need it when configuring access.
  • You'll need to configure SQL to use Mixed Mode, as well as create a "SQL" account and give it access to the LPR database.
  • The LPR Viewer won't start if it can't connect to SQL. Not sure a quick fix - so installing remotely will require you to manually update the config file before opening the application (LPR.exe.config)
  • Update the config file to point to the remote web server, and remote SQL
    <add key="SqlCon" value="Data Source=<serverip>\<instancename>,<remoteport>;Initial Catalog=LPR;Persist Security Info=True;uid=<sql_user>;password=<sqlpassword>;" />

Settings page has settings for pulling in additional Plate Information. The old Make/Model / Etc., from ALPR is hidden by default since that information hasn't been provided in a long time.
1602987390791.png
Be Aware - Clicking "Load" on "Load Forensic for Historic Plates" will take a fair amount of time. Likely you'll get around 5 plates per second (one pull per distinct plate).
I would highly suggest you don't use this "Load" button until you validate individual Forensic loading works on the main Dashboard page.
The Default State is a fall-back, as ALPR doesn't get the state right every time. So, if it can't pull info for the Plate + State detected, it tries again with Plate + Default State.

Updated Dashboard
1602987742881.png

To pull in the VIN / Year / Make / Model, use the "Plate Forensics" button. This button can also be used to manually refresh a plate if you think something is wrong / out of date.
(And again, once you've done a few this way and it works - you can use the mass-import on the Settings page - just be prepared for it to take up to hours, depending on the number of unique plates you have).

As long as you have the Settings filled out correctly for your e-mail, you can use the "Print Report" Button to e-mail yourself a report of a single vehicle's history, or "Print Daily Report" to e-mail yourself a report of all vehicles for the time period selected in the date selectors (Highly recommend only a single day).
 
Last edited:
Top