Full ALPR Database System for Blue Iris!

The log indicates that you are successfully calling the DB API when BI alerts on a plate. And it looks like the image is saved successfully, but then the rest of the plate read data doesn't save correctly. Can you post the complete text of your post/payload from the "On Alert" that makes the http/API call?
This is it: { "plate_number":"&PLATE", "Image":"&ALERT_JPEG", "camera":"&CAM", "ALERT_PATH": "&ALERT_PATH", "ALERT_CLIP": "&ALERT_CLIP", "timestamp":"&ALERT_TIME" }
 
That all looks correct. I'll have to defer to Charlie or Mike, or someone that knows why the database might be failing on the insertion of a new plate.
 
It still seems like the migration didn't run which sets up the schema properly?
 
Try entering 192.168.68.111:3000/update into a browser and follow the migration process.

Edit: This assumes you have downloaded the migration file and put into the same folder as your docker compose file.
 
Last edited:
Any possible actions to correct this?
You have to get into the db console and run a few commands.

You would need to download and mount migrations.sql on the same way as schema.sql, then open postgres docker console and run:

Code:
psql -U postgres -d postgres -f /migrations.sql
 
You have to get into the db console and run a few commands.

You would need to download and mount migrations.sql on the same way as schema.sql, then open postgres docker console and run:

Code:
psql -U postgres -d postgres -f /migrations.sql
OK, I need you to slow down as this is a steep learning curve for me. I did the 192.168.68.111:3000/update migration process and that was successful. Then went to "GitHub - algertc/ALPR-Database: Fully-Featured Automated License Plate Recognition Database for Blue Iris + CodeProject AI Server" and downloaded all the files including "migrations.sql" and of course "schema.sql". They're in my download folder. Now I need some guidance on the "mount migrations.sql on the same way as schema.sql" part and then where/how to "open postgres docker console and run: psql -U postgres -d postgres -f /migrations.sql". I appreciate your patience.
 
OK, I need you to slow down as this is a steep learning curve for me. I did the 192.168.68.111:3000/update migration process and that was successful. Then went to "GitHub - algertc/ALPR-Database: Fully-Featured Automated License Plate Recognition Database for Blue Iris + CodeProject AI Server" and downloaded all the files including "migrations.sql" and of course "schema.sql". They're in my download folder. Now I need some guidance on the "mount migrations.sql on the same way as schema.sql" part and then where/how to "open postgres docker console and run: psql -U postgres -d postgres -f /migrations.sql". I appreciate your patience.
If you did the update via the link you should be good.
 
If you did the update via the link you should be good.
Still seeing this in the log-
4.jpg
 
Just another data point. Do these Docker screen shots look normal to those who have their ALPR Database setups working?


a.jpg
b.jpg
c.jpg
d.jpg
 
Looks like this-
Hmmm.... it looks like your containers are running. If you click on where it says app-1 and db-1 it should open up a window with six diagnostic tabs. I would look through the logs and stats tabs to see if there is anything that stands out and gives you an indication of what could be wrong.
 
What do you see when you open "" on that machine? The browser part works?

"Now I need some guidance on the "mount migrations.sql on the same way as schema.sql" part and then where/how to "open postgres docker console and run: psql -U postgres -d postgres -f /migrations.sql". I appreciate your patience."

To get into the docker container-- try

docker exec -it app-1 bash

That should get you into the containers where you can run commands. However, you might want to run these commands in the db-1 container.
 
What do you see when you open "" on that machine? The browser part works?

"Now I need some guidance on the "mount migrations.sql on the same way as schema.sql" part and then where/how to "open postgres docker console and run: psql -U postgres -d postgres -f /migrations.sql". I appreciate your patience."

To get into the docker container-- try

docker exec -it app-1 bash

That should get you into the containers where you can run commands. However, you might want to run these commands in the db-1 container.
First off http://127.0.0.1:3000 looks identical to localhost:3000
AA.jpg
BB.jpg
 
OK, This repair/troubleshooting process is confusing at best for me. How about this. I go into DockerDesktop, delete my instance of ALPR Database, and attempt the manual installation? Everything looks straight forward except one thing. After all the directories are made and the files have been loaded and placed accordingly, Step 5. states: Start the application: docker compose up -d. Where exactly do I have to be to run that command? Does this seem to be a logical next step or might I make matters worse?
 
Now my head really hurts. Fresh install of the ALPR Database program using the "manual" method, and still getting this in the log with no data on the dashboard. BI and CodeProject catching and identifing license plates just fine. Made sure i updated my Key as well. Possibly a misconfiguration in Blue Iris?
DD.jpg
 
" Step 5. states: Start the application: docker compose up -d. Where exactly do I have to be to run that command? Does this seem to be a logical next step or might I make matters worse?"

You have to be where the docker-compose.yml file is-- or you can specify where it is with a -f flag.
 
Hi, @smallik

You're very close. This seems like a very minor issue with the database schema, which is what defines how the tables and columns are structured.

The error is stating that there is a relation missing. Normally, this should be created automatically and should exist in the migrations.sql file.

It is possible that the install script didn't properly get the file it needs, so we should be able to resolve this by downloading the file and just restarting the container.


Here is the file you need: migrations.sql

Download it and place it in the same location as the docker-compose.yml file and the schema.sql. If you already have one, you can just replace it.

After this, restart the containers. You may be able to do this with the restart button in Docker desktop, but please try with the command line, as we know that works.


Code:
docker compose down
docker compose up -d


This should automatically apply the proper database configuration and it should start working.


edit re:
Where exactly do I have to be to run that command?

You run this in the same directory where your docker-compose.yml file is stored. So for example, if you made the directory for it at C:\users\youruser\ALPR_database , you would open a powershell and type:

Code:
cd C:\users\youruser\ALPR_database

Then run the commands