OpenALPR Tool - Save and Query CSV Exports

Attached are the one I used for Downloader & Viewer :)
 

Attachments

Something weird going on with the viewer today. For some reason the last plate showing is just before 11am today. I download every 30 minutes. Downloader is working as intended and shows plates being downloaded.

Restart and reboot doesn't seem to change anything.

11am is midnight GMT so I'm suspecting another time issue.

And just like that seems to have started working again.

1606601165429.png

I have hits during that time on the openalpr website, but even a manual download doesn't make them appear in viewer.
 
And just like that seems to have started working again.

View attachment 75829

I have hits during that time on the openalpr website, but even a manual download doesn't make them appear in viewer.

Ok so I worked it out and the fix was simple. All of the data was there, it was just out of order. Clicking the sort by local time button put everything back into the correct order. Beyond me what I did to suddenly have data appearing out of order. I suspected I had accidentally clicked on one of the other sort by buttons but everything else was in the right order, just that patch of time was missing and in another part of the table. Hey @Gymratz I don't want to steal your thunder here. Would you mind if I set up a new troubleshooting thread to compile the fixes to any issues that pop up in the one place? There's a bunch of good info in the existing threads but I would like to put it into a single post to help others.
 
Ok so I worked it out and the fix was simple. All of the data was there, it was just out of order. Clicking the sort by local time button put everything back into the correct order. Beyond me what I did to suddenly have data appearing out of order. I suspected I had accidentally clicked on one of the other sort by buttons but everything else was in the right order, just that patch of time was missing and in another part of the table. Hey @Gymratz I don't want to steal your thunder here. Would you mind if I set up a new troubleshooting thread to compile the fixes to any issues that pop up in the one place? There's a bunch of good info in the existing threads but I would like to put it into a single post to help others.
Go for it! Just like tech did with a guide - worked out well.
 
  • Like
Reactions: tech101
I'm not sure where to start in making this a service / moving it into a DLL

So I haven't tried this yet, but this is how @gentle pumpkin made the AI tool run as a service

Run AI Tool as a Windows Service"

For AITool to be able to run as Windows service a third-party program is required – NSSM (or Non-Sucking Service Manager).

As the DQAI Windows version doesn't support autostart yet, the DQAI Docker version is required for the following (otherwise AI Tool will be running as a service, but DQAI won't be started). You can find the install guide for DQAI Docker in the 'deprecated CMD Version (v0.1 - v0.6)' spoiler.

Please follow these steps:

1. Download NSSM from here: Direct Download or open Download Page
2. Extract it to a folder on your hard drive
3. Open an administrative command prompt
3.1 Win 10: press the Search button, Win7: open the Start menu
3.2 Type in cmd
3.3 Right click on Command Prompt and select Run as administrator
View attachment 44815

3.4 Click Yes on the prompt
View attachment 44816


4. Within the CMD navigate to where you have extracted NSSM (eg. cd / press enter, cd nssm-2.24-101-g897c7ad press enter, cd win32 press enter)
View attachment 44817

5. In CMD now type nssm.exe install AITool and press enter
View attachment 44818

6. You will be presented with the NSSM GUI. You need to:
6.1 Browse to the AITool path and double click on the AITool.exe
6.2 Ensure the startup directory is auto-filled with the path to the AITool.exe folder
6.3 Ensure the Service name is correct
View attachment 44819

6.4 Click on Details and fill out Display name and description (for example AITool in both)
View attachment 44820

6.5 Click on Log On and select This account and enter your Windows username and password (password needs to be entered twice in the correct boxes)
View attachment 44821

6.6 Press Install service. If you get a success press OK an reboot your Windows PC.
View attachment 44822


7. After reboot check services and ensure the AITool service is running
View attachment 44823

8. Without manually running AITool, generate some valid alerts and ensure they are being sent to your mobile/tablet device.


Many thanks to MnM for testing and describing this solution!
 
Hey @Gymratz I'm going to be building a new server and migrating my data over, things I plan on doing:

Backup LPR tables on the current server
Install SQL Server on new server and restore LPR tables
Install OpenAPLR, configure the settings and restore the database files

I assume I won't have to compile a new LPR downloader/viewer since the settings are the same, but I will still install Visual Studio for future updates.

Does this sound like I'm missing anything?
 
You might need to install the .NET files, by either installing the Visual Studio itself or else through a .NET package.
 
  • Like
Reactions: Sprite
1607041164283.png

1607043826263.png

Don't know why but occasionally I see downloads that don't appear in the table, like the 10:57 one above. Happens with manual imports as well. Does not appear to affect functionality.
 
I am trying to understand I just did a new install. When My plates are being imported it does not show correctly on downloader even though they have been imported.. Not sure why this is?


1607105196429.png
 
Hey @Gymratz I'm going to be building a new server and migrating my data over, things I plan on doing:

Backup LPR tables on the current server
Install SQL Server on new server and restore LPR tables
Install OpenAPLR, configure the settings and restore the database files

I assume I won't have to compile a new LPR downloader/viewer since the settings are the same, but I will still install Visual Studio for future updates.

Does this sound like I'm missing anything?
In theory, should be able to use SSMS to back-up on previous server and restore onto new server.
I haven't walked through moving OpenALPR database files - if you do that successfully, posting the steps here for others would be nice.
 
I am trying to understand I just did a new install. When My plates are being imported it does not show correctly on downloader even though they have been imported.. Not sure why this is?


View attachment 76169
What I notice in yours is that you have entries for every minute, except for 9:57am - which is when the import likely happened (then the one after they were dupes). Why it doesn't show the entry for 9:57, I'm unsure. My guess, there's an error in the code right before the part that saves the success log - perhaps your archival or alerting had an error, causing it to dump out of that function before it logged the success. The entire "UploadStream" function is wrapped in a try - so any errors would just continue - and the line that saves that success count is at the end of that function.

Do you have other successful imports that are logging correctly?
What's different about them? Did this one contain a license that should have alerted?
 
  • Like
Reactions: tech101
Nope not one shows imported whats more interesting is it seems like skips sometimes. I just did re compile downloader same results..

1607125415777.png
 
But the records are being captured okay, just that the Downloader isn't listing the captures? That would be a . . . downer. ;-)
 
  • Love
Reactions: tech101
Here is the section that adds the records.
1607126133616.png

Check above it, I bet it is erroring out.
Considering you're getting the import, it tells me it has to be one of these three items.
1607126197394.png

So, either the error is with the alerting (which since that is in a new thread, I don't think that's it)
The error is in the archive location (very possible - check that)
Or the error is in the CleanUpDB function - which is also fairly short, you could try running the command directly in SQL and make sure it works.
1607126285143.png

So... Without being on your system, I feel like the most likely place for the issue is in the saving of the archive. If you have it set to save to a location that doesn't exist, perhaps.
 
  • Love
Reactions: tech101
I am going thru it now.. I think I May have found the source not sure yet.. Doing the test waiting for another car folder where it was trying to save was Misspelled. I think that could have caused it not sure.. Waiting for a plate to show up.
 
OMG that did it .. I am so LOL sorry about all the trouble @Gymratz and @DLONG2 I misspelled

the folder :|

1607128616635.png

Thank you so much @Gymratz Now I know :)
 
  • Like
Reactions: samplenhold
Added a guide, On how to restore/Move the Sql Database and plate images on to the new PC. On the original guide thread. It is linked on this thread already. Ah this tool is so nice I can not see me not running this Without this it feels half of the security. Thank you @Gymratz and @DLONG2
 
  • Like
Reactions: Sprite
Feature request, would it be possible to set plates to ignore? For example FedEx/UPS trucks have decal numbers on the side that OpenALPR pick up on that I would like to just ignore completely rather than have to manually delete it from the database.
 
Another commonly captured plate is "UHAUL". I used to try to correct all the wrong plates but gave up, as there's just too many partials and DOT numbers, advertising lettering, etc. I wonder if a new category could be created, such as "Ignore" and then tag the errors as needed, and then filter from view.
 
  • Love
Reactions: tech101