Full ALPR Database System for Blue Iris!

1.8 Released. Correct plate number fixed in the final release.

I also created a full separate site for documentation, which looks way more professional than this actually is, LOL.

There are definitely quite a lot of people using it, which I find so incredibly cool, and the goal of this separate and more thorough documentation was mainly to help new users ( I am going to create new install guide videos for both Windows and Linux soon), but I also did this to be able to put it on my resume and have it look a little bit more legitimate compared to just the GitHub repository, which is comparatively very small in relation to the number of downloads and active users.


I have a TPMS rig fully built out with double SDR (even though I would really like to explore other options, this is good for testing for now, as the output will be the exact same either way). I'm going to see if I can figure out any way to use some AI to identify patterns between the received TPMS data and the ALPR recognitions. It will likely take a little while to get it working accurately, but I am hopeful. I also used a very large box (which I will post later), to allow for space to add anything else in the future (like WIFI or BLE fingerprinting).


TPMS certainly isn't perfect, but the idea of getting PII off cars has been on my mind constantly for the past few weeks. Without a license plate, it really is hard, but TPMS is the next best thing. You can't expect to get it for every vehicle, but it's a whole lot better than nothing and definitely has the capability to incriminate. Hopefully soon we can get some more advanced RF fingerprinting deployed using the passing traffic's cell phones.

Any users that have already updated should:
From the location where your compose file, storage, etc is: docker compose down , docker pull, and docker compose up -d

Thanks! Just updated to the latest and the plate correct flag works now. Going to update my production version tmrw. Thanks again!
 
  • Like
Reactions: algertc
No sure what did I do differently than first time, but redid this and now it works as an app. Very nice!
However, it looks like bypass authentication via iframe/ Home Assistant doesn't work any more.

Am I the only one experiencing this issue with allowing access via iframe from Home Assistant?
 
Last edited:
I'm loving the work being done here! Im looking to get mine set up when I come back from a holiday, so I am pretty new to this.

Two questions:
How are you handling plates from different states/countries? Are you bunching them all in one?

What about MAC addresses? Sure, some cars dont have them, some only transmit them when a device is connected and others have randomised addresses, but councils do use these for traffic monitoring. Then police could use them to track a car (albeit only in high profile cases or if they are used to doing this).
 
Am I the only one experiencing this issue with allowing access via iframe from Home Assistant?
Add the ip address of your docker container to the whitelist in the ALPR Database app and it will allow iframe access in home assistant.

Screen Shot 2025-03-20 at 12.12.56 PM.png
 
Anyone getting any plate reads below confidence threshold? My threshold is around 70%, but once in a while, I am seeing these show up with v0.18, which I wasn't getting before:

1742536960127.png


And a little more weirdness:

Screenshot from 2025-03-20 23-23-56.png


The reading of 8XBZ466 has the image of the vehicle above (9MOA506).

Here is another one:

Screenshot from 2025-03-21 09-09-18.png


On the BI side, which correctly marks it as a no read because the confidence is below threshold:

Screenshot from 2025-03-21 09-10-37.png


I am seeing this on multiple version of BI, both 5.9.9.24 and 5.9.9.29, .24 pre-dates the AI hardening code.
 
Last edited:
Yep, it works both as a dashboard or a web page card.

View attachment 217202

I figured it out! It’s not the IP address of the HA Docker that needs to be added to the whitelist, but the IP of the device you're accessing HA from. The reason it suddenly stopped working for me (which I initially thought was due to the 0.1.8 update) was actually a coincidence with the update: my device's dynamic IP had changed.
 
  • Like
Reactions: PeteJ
I have plates working in CPAI and trying to send to ALPR database.
1742607544292.png



I'm seeing these errors on the alpr-app-1 container:

Received plate read data: {
2025-03-21 21:17:41 plate_number: 'CZCC 641',
2025-03-21 21:17:40 Error processing request: error: there is no unique or exclusion constraint matching the ON CONFLICT specification
2025-03-21 21:17:40 at <unknown> (/app/node_modules/pg/lib/client.js:535:17)
2025-03-21 21:17:40 at async p (/app/.next/server/app/api/plate-reads/route.js:1:6064)
2025-03-21 21:17:40 at async te.do (/app/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:18:17826)
2025-03-21 21:17:40 at async te.handle (/app/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:18:22492)
2025-03-21 21:17:40 at async doRender (/app/node_modules/next/dist/server/base-server.js:1455:42)
2025-03-21 21:17:40 at async responseGenerator (/app/node_modules/next/dist/server/base-server.js:1814:28)
2025-03-21 21:17:40 at async NextNodeServer.renderToResponseWithComponentsImpl (/app/node_modules/next/dist/server/base-server.js:1824:28)
2025-03-21 21:17:40 at async NextNodeServer.renderPageComponent (/app/node_modules/next/dist/server/base-server.js:2240:24)
2025-03-21 21:17:40 at async NextNodeServer.renderToResponseImpl (/app/node_modules/next/dist/server/base-server.js:2278:32) {
2025-03-21 21:17:40 length: 148,
2025-03-21 21:17:40 severity: 'ERROR',
2025-03-21 21:17:40 code: '42P10',
2025-03-21 21:17:40 detail: undefined,
2025-03-21 21:17:40 hint: undefined,
2025-03-21 21:17:40 position: undefined,
2025-03-21 21:17:40 internalPosition: undefined,
2025-03-21 21:17:40 internalQuery: undefined,
2025-03-21 21:17:40 where: undefined,
2025-03-21 21:17:40 schema: undefined,
2025-03-21 21:17:40 table: undefined,
2025-03-21 21:17:40 column: undefined,
2025-03-21 21:17:40 dataType: undefined,
2025-03-21 21:17:40 constraint: undefined,
2025-03-21 21:17:40 file: 'plancat.c',
2025-03-21 21:17:40 line: '870',
2025-03-21 21:17:40 routine: 'infer_arbiter_indexes'
2025-03-21 21:17:40 }


I also see this odd reference to 172.18.0.1 IP address and reference that relation 'tags' does not exist:

GET /manifest.webmanifest
2025-03-21 17:33:09 POST /api/verify-whitelist
2025-03-21 17:33:09 Checking IP: 172.18.0.1
2025-03-21 17:33:09 No whitelisted IPs configured
2025-03-21 17:33:09 No session cookie block run
2025-03-21 17:33:09 GET /login
2025-03-21 17:33:11 GET /live_feed
2025-03-21 17:33:11 POST /api/verify-session
2025-03-21 17:33:11 GET /api/check-update
2025-03-21 17:33:11 Fetching latest plate reads
2025-03-21 17:33:11 Fetching tags
2025-03-21 17:33:11 Error getting tags: error: relation "tags" does not exist
2025-03-21 17:33:11 at <unknown> (/app/node_modules/pg/lib/client.js:535:17)
2025-03-21 17:33:11 at async (/app/.next/server/chunks/8079.js:296:75)
2025-03-21 17:33:11 at async l (/app/.next/server/chunks/8079.js:1:1502)
2025-03-21 17:33:11 at async $ (/app/.next/server/chunks/7517.js:1:5779)
2025-03-21 17:33:11 at async p (/app/.next/server/app/live_feed/page.js:1:11413) {
2025-03-21 17:33:11 length: 103,
2025-03-21 17:33:11 severity: 'ERROR',
2025-03-21 17:33:11 code: '42P01',
2025-03-21 17:33:11 detail: undefined,
2025-03-21 17:33:11 hint: undefined,
2025-03-21 17:33:11 position: '15',
2025-03-21 17:33:11 internalPosition: undefined,
2025-03-21 17:33:11 internalQuery: undefined,
2025-03-21 17:33:11 where: undefined,
2025-03-21 17:33:11 schema: undefined,
2025-03-21 17:33:11 table: undefined,
2025-03-21 17:33:11 column: undefined,
2025-03-21 17:33:11 dataType: undefined,
2025-03-21 17:33:11 constraint: undefined,
2025-03-21 17:33:11 file: 'parse_relation.c',
2025-03-21 17:33:11 line: '1373',
2025-03-21 17:33:11 routine: 'parserOpenTable'
2025-03-21 17:33:11 }

Alert Macro:
1742607469617.png


Post string: { "plate_number":"&PLATE", "Image":"&ALERT_JPEG", "camera":"&CAM", "ALERT_PATH": "&ALERT_PATH", "ALERT_CLIP": "&ALERT_CLIP", "timestamp":"&ALERT_TIME" }


ALPR Logs show similar messages:
1742607717494.png




Thoughts where I've gone wrong?
 
Check your settings on the dashboard under Home Assistant for the whitelisted IP, maybe you have that enabled.

How did you install this? Using the installation script, or manually?
 
I have plates working in CPAI and trying to send to ALPR database.
View attachment 217255


I'm seeing these errors on the alpr-app-1 container:

Received plate read data: {
2025-03-21 21:17:41 plate_number: 'CZCC 641',
2025-03-21 21:17:40 Error processing request: error: there is no unique or exclusion constraint matching the ON CONFLICT specification
2025-03-21 21:17:40 at <unknown> (/app/node_modules/pg/lib/client.js:535:17)
2025-03-21 21:17:40 at async p (/app/.next/server/app/api/plate-reads/route.js:1:6064)
2025-03-21 21:17:40 at async te.do (/app/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:18:17826)
2025-03-21 21:17:40 at async te.handle (/app/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:18:22492)
2025-03-21 21:17:40 at async doRender (/app/node_modules/next/dist/server/base-server.js:1455:42)
2025-03-21 21:17:40 at async responseGenerator (/app/node_modules/next/dist/server/base-server.js:1814:28)
2025-03-21 21:17:40 at async NextNodeServer.renderToResponseWithComponentsImpl (/app/node_modules/next/dist/server/base-server.js:1824:28)
2025-03-21 21:17:40 at async NextNodeServer.renderPageComponent (/app/node_modules/next/dist/server/base-server.js:2240:24)
2025-03-21 21:17:40 at async NextNodeServer.renderToResponseImpl (/app/node_modules/next/dist/server/base-server.js:2278:32) {
2025-03-21 21:17:40 length: 148,
2025-03-21 21:17:40 severity: 'ERROR',
2025-03-21 21:17:40 code: '42P10',
2025-03-21 21:17:40 detail: undefined,
2025-03-21 21:17:40 hint: undefined,
2025-03-21 21:17:40 position: undefined,
2025-03-21 21:17:40 internalPosition: undefined,
2025-03-21 21:17:40 internalQuery: undefined,
2025-03-21 21:17:40 where: undefined,
2025-03-21 21:17:40 schema: undefined,
2025-03-21 21:17:40 table: undefined,
2025-03-21 21:17:40 column: undefined,
2025-03-21 21:17:40 dataType: undefined,
2025-03-21 21:17:40 constraint: undefined,
2025-03-21 21:17:40 file: 'plancat.c',
2025-03-21 21:17:40 line: '870',
2025-03-21 21:17:40 routine: 'infer_arbiter_indexes'
2025-03-21 21:17:40 }


I also see this odd reference to 172.18.0.1 IP address and reference that relation 'tags' does not exist:

GET /manifest.webmanifest
2025-03-21 17:33:09 POST /api/verify-whitelist
2025-03-21 17:33:09 Checking IP: 172.18.0.1
2025-03-21 17:33:09 No whitelisted IPs configured
2025-03-21 17:33:09 No session cookie block run
2025-03-21 17:33:09 GET /login
2025-03-21 17:33:11 GET /live_feed
2025-03-21 17:33:11 POST /api/verify-session
2025-03-21 17:33:11 GET /api/check-update
2025-03-21 17:33:11 Fetching latest plate reads
2025-03-21 17:33:11 Fetching tags
2025-03-21 17:33:11 Error getting tags: error: relation "tags" does not exist
2025-03-21 17:33:11 at <unknown> (/app/node_modules/pg/lib/client.js:535:17)
2025-03-21 17:33:11 at async (/app/.next/server/chunks/8079.js:296:75)
2025-03-21 17:33:11 at async l (/app/.next/server/chunks/8079.js:1:1502)
2025-03-21 17:33:11 at async $ (/app/.next/server/chunks/7517.js:1:5779)
2025-03-21 17:33:11 at async p (/app/.next/server/app/live_feed/page.js:1:11413) {
2025-03-21 17:33:11 length: 103,
2025-03-21 17:33:11 severity: 'ERROR',
2025-03-21 17:33:11 code: '42P01',
2025-03-21 17:33:11 detail: undefined,
2025-03-21 17:33:11 hint: undefined,
2025-03-21 17:33:11 position: '15',
2025-03-21 17:33:11 internalPosition: undefined,
2025-03-21 17:33:11 internalQuery: undefined,
2025-03-21 17:33:11 where: undefined,
2025-03-21 17:33:11 schema: undefined,
2025-03-21 17:33:11 table: undefined,
2025-03-21 17:33:11 column: undefined,
2025-03-21 17:33:11 dataType: undefined,
2025-03-21 17:33:11 constraint: undefined,
2025-03-21 17:33:11 file: 'parse_relation.c',
2025-03-21 17:33:11 line: '1373',
2025-03-21 17:33:11 routine: 'parserOpenTable'
2025-03-21 17:33:11 }

Alert Macro:
View attachment 217254

Post string: { "plate_number":"&PLATE", "Image":"&ALERT_JPEG", "camera":"&CAM", "ALERT_PATH": "&ALERT_PATH", "ALERT_CLIP": "&ALERT_CLIP", "timestamp":"&ALERT_TIME" }


ALPR Logs show similar messages:
View attachment 217256



Thoughts where I've gone wrong?
Sounds like a DB schema issue again. Try the solution presented in post 660
 
Check your settings on the dashboard under Home Assistant for the whitelisted IP, maybe you have that enabled.

How did you install this? Using the installation script, or manually?
Home Assistant is disabled. Installed as it was told on GitHub:

1742616249678.png
 
Sounds like a DB schema issue again. Try the solution presented in post 660
I replaced the file and restarted via Powershell, no change, the same errors persist. If it makes a difference, I installed ALPR before CPAI, or CUDA or any of that stuff - I mistakenly thought I just passed images to ALPR.
 
Post string: { "plate_number":"&PLATE", "Image":"&ALERT_JPEG", "camera":"&CAM", "ALERT_PATH": "&ALERT_PATH", "ALERT_CLIP": "&ALERT_CLIP", "timestamp":"&ALERT_TIME" }


Thoughts where I've gone wrong?
Your Post/payload string is wrong. It should be: { "ai_dump":&JSON, "Image":"&ALERT_JPEG", "camera":"&CAM", "ALERT_PATH": "&ALERT_PATH", "ALERT_CLIP": "&ALERT_CLIP", "timestamp":"&ALERT_TIME" }
 
I replaced the file and restarted via Powershell, no change, the same errors persist. If it makes a difference, I installed ALPR before CPAI, or CUDA or any of that stuff - I mistakenly thought I just passed images to ALPR.
Did you do the rest of the steps including the docker compose statements at the end of that post?
 
Your Post/payload string is wrong. It should be: { "ai_dump":&JSON, "Image":"&ALERT_JPEG", "camera":"&CAM", "ALERT_PATH": "&ALERT_PATH", "ALERT_CLIP": "&ALERT_CLIP", "timestamp":"&ALERT_TIME" }
ok - I had used the one on the GitHub instructions. I've changed it to the one above, the log messages looks about the same other than I don't see the plate details in it. I'm assuming it's in the ai_dump. Still, the results are the same.
2025-03-22 08:13:42 POST /api/plate-reads
2025-03-22 08:13:42 Received plate read data: {
2025-03-22 08:13:42 ai_dump: [ { api: 'alpr', found: [Object] } ],
2025-03-22 08:13:42 Image: '/9j/4AAQ......
2025-03-22 08:13:42 camera: 'LPR',
2025-03-22 08:13:42 ALERT_PATH: 'LPR.20250322_081340.33.3-1.jpg',
2025-03-22 08:13:42 ALERT_CLIP: '@89703575840923',
2025-03-22 08:13:42 timestamp: '2025-03-22T12:13:40.876Z'
2025-03-22 08:13:42 }
2025-03-22 08:13:42 Database connection established
2025-03-22 08:13:42 [FileStorage] Successfully saved image
2025-03-22 08:13:42 Error processing request: error: there is no unique or exclusion constraint matching the ON CONFLICT specification
2025-03-22 08:13:42 at <unknown> (/app/node_modules/pg/lib/client.js:535:17)
2025-03-22 08:13:42 at async p (/app/.next/server/app/api/plate-reads/route.js:1:6064)
2025-03-22 08:13:42 at async te.do (/app/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:18:17826)
2025-03-22 08:13:42 at async te.handle (/app/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:18:22492)
2025-03-22 08:13:42 at async doRender (/app/node_modules/next/dist/server/base-server.js:1455:42)
2025-03-22 08:13:42 at async responseGenerator (/app/node_modules/next/dist/server/base-server.js:1814:28)
2025-03-22 08:13:42 at async NextNodeServer.renderToResponseWithComponentsImpl (/app/node_modules/next/dist/server/base-server.js:1824:28)
2025-03-22 08:13:42 at async NextNodeServer.renderPageComponent (/app/node_modules/next/dist/server/base-server.js:2240:24)
2025-03-22 08:13:42 at async NextNodeServer.renderToResponseImpl (/app/node_modules/next/dist/server/base-server.js:2278:32) {
2025-03-22 08:13:42 length: 148,
2025-03-22 08:13:42 severity: 'ERROR',
2025-03-22 08:13:42 code: '42P10',
2025-03-22 08:13:42 detail: undefined,
2025-03-22 08:13:42 hint: undefined,
2025-03-22 08:13:42 position: undefined,
2025-03-22 08:13:42 internalPosition: undefined,
2025-03-22 08:13:42 internalQuery: undefined,
2025-03-22 08:13:42 where: undefined,
2025-03-22 08:13:42 schema: undefined,
2025-03-22 08:13:42 table: undefined,
2025-03-22 08:13:42 column: undefined,
2025-03-22 08:13:42 dataType: undefined,
2025-03-22 08:13:42 constraint: undefined,
2025-03-22 08:13:42 file: 'plancat.c',
2025-03-22 08:13:42 line: '870',
2025-03-22 08:13:42 routine: 'infer_arbiter_indexes'
2025-03-22 08:13:42 }
 
ok - I had used the one on the GitHub instructions. I've changed it to the one above, the log messages looks about the same other than I don't see the plate details in it. I'm assuming it's in the ai_dump. Still, the results are the same.
2025-03-22 08:13:42 POST /api/plate-reads
2025-03-22 08:13:42 Received plate read data: {
2025-03-22 08:13:42 ai_dump: [ { api: 'alpr', found: [Object] } ],
2025-03-22 08:13:42 Image: '/9j/4AAQ......
2025-03-22 08:13:42 camera: 'LPR',
2025-03-22 08:13:42 ALERT_PATH: 'LPR.20250322_081340.33.3-1.jpg',
2025-03-22 08:13:42 ALERT_CLIP: '@89703575840923',
2025-03-22 08:13:42 timestamp: '2025-03-22T12:13:40.876Z'
2025-03-22 08:13:42 }
2025-03-22 08:13:42 Database connection established
2025-03-22 08:13:42 [FileStorage] Successfully saved image
2025-03-22 08:13:42 Error processing request: error: there is no unique or exclusion constraint matching the ON CONFLICT specification
2025-03-22 08:13:42 at <unknown> (/app/node_modules/pg/lib/client.js:535:17)
2025-03-22 08:13:42 at async p (/app/.next/server/app/api/plate-reads/route.js:1:6064)
2025-03-22 08:13:42 at async te.do (/app/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:18:17826)
2025-03-22 08:13:42 at async te.handle (/app/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:18:22492)
2025-03-22 08:13:42 at async doRender (/app/node_modules/next/dist/server/base-server.js:1455:42)
2025-03-22 08:13:42 at async responseGenerator (/app/node_modules/next/dist/server/base-server.js:1814:28)
2025-03-22 08:13:42 at async NextNodeServer.renderToResponseWithComponentsImpl (/app/node_modules/next/dist/server/base-server.js:1824:28)
2025-03-22 08:13:42 at async NextNodeServer.renderPageComponent (/app/node_modules/next/dist/server/base-server.js:2240:24)
2025-03-22 08:13:42 at async NextNodeServer.renderToResponseImpl (/app/node_modules/next/dist/server/base-server.js:2278:32) {
2025-03-22 08:13:42 length: 148,
2025-03-22 08:13:42 severity: 'ERROR',
2025-03-22 08:13:42 code: '42P10',
2025-03-22 08:13:42 detail: undefined,
2025-03-22 08:13:42 hint: undefined,
2025-03-22 08:13:42 position: undefined,
2025-03-22 08:13:42 internalPosition: undefined,
2025-03-22 08:13:42 internalQuery: undefined,
2025-03-22 08:13:42 where: undefined,
2025-03-22 08:13:42 schema: undefined,
2025-03-22 08:13:42 table: undefined,
2025-03-22 08:13:42 column: undefined,
2025-03-22 08:13:42 dataType: undefined,
2025-03-22 08:13:42 constraint: undefined,
2025-03-22 08:13:42 file: 'plancat.c',
2025-03-22 08:13:42 line: '870',
2025-03-22 08:13:42 routine: 'infer_arbiter_indexes'
2025-03-22 08:13:42 }
You have the exact same symptoms as that earlier thread. Your database schema doesn't seem to be up to date. Can you look in your ALPR folder and post the timestamps of your schema.sql, migrations.sql and docker-compose.yml?
 
Have you tried just running the update script? This takes care of all of the details like using the latest migration.sql and schema.sql. I use to update manually, but the update in 0.18 has worked really well for me.
 
You have the exact same symptoms as that earlier thread. Your database schema doesn't seem to be up to date. Can you look in your ALPR folder and post the timestamps of your schema.sql, migrations.sql and docker-compose.yml?
1742668908459.png


This is after running the update script. Still have the same issue.