Full ALPR Database System for Blue Iris!

7/4/2025, 12:41:25 AM [ERROR] Error processing request: SyntaxError: Expected ',' or '}' after property value in JSON at position 16
7/4/2025, 12:41:36 AM [INFO] Received plate read data: [object Object]
7/4/2025, 12:41:37 AM [INFO] Received plate read data: [object Object]
7/4/2025, 12:41:38 AM [INFO] Received plate read data: [object Object]
7/4/2025, 12:41:39 AM [INFO] Received plate read data: [object Object]
7/4/2025, 12:41:39 AM [ERROR] Error checking update status: Error: connect ECONNREFUSED 172.18.0.3:5433
7/4/2025, 12:41:39 AM [INFO] Fetching latest plate reads
7/4/2025, 12:41:39 AM [INFO] Fetching tags
7/4/2025, 12:41:40 AM [ERROR] Error fetching plate reads: Error: connect ECONNREFUSED 172.18.0.3:5433

i have no idea what that 172 IP address is
 
{ "ai_dump":&JSON, "Image":"&ALERT_JPEG", "camera":"&CAM", "ALERT_PATH": "&ALERT_PATH", "ALERT_CLIP": "&ALERT_CLIP", "timestamp":"&ALERT_TIME" }

generates the errors above.

{ "ai_dump":"&PLATE", "Image":"&ALERT_JPEG", "camera":"&CAM", "ALERT_PATH": "&ALERT_PATH", "ALERT_CLIP": "&ALERT_CLIP", "timestamp":"&ALERT_TIME" }

also generates the same error
You shouldn't be getting an error about JSON. Are you sure you changed it to the following?

{ "plate_number":"&PLATE", "Image":"&ALERT_JPEG", "camera":"&CAM", "ALERT_PATH": "&ALERT_PATH", "ALERT_CLIP": "&ALERT_CLIP", "timestamp":"&ALERT_TIME" }
 
  • Like
Reactions: Skinny1
added... now i see in blue iris, the 400 error.. still no plates showing up

log...
7/4/2025, 10:48:38 AM [INFO] Received plate read data: [object Object]
7/4/2025, 10:49:05 AM [ERROR] Error checking update status: Error: connect ECONNREFUSED 172.18.0.3:5433
7/4/2025, 10:49:05 AM [ERROR] Error checking update status: Error: connect ECONNREFUSED 172.18.0.3:5433
7/4/2025, 10:49:05 AM [ERROR] Error getting camera names: Error: connect ECONNREFUSED 172.18.0.3:5433
7/4/2025, 10:49:06 AM [ERROR] Error checking update status: Error: connect ECONNREFUSED 172.18.0.3:5433

no more json errors,

codeproject log.
2025-07-04 10:48:34: Response rec'd from License Plate Reader command 'alpr' (#reqid 996e0316-9c15-4e08-be2e-0725d60e951a) ['Found Plate: TA2 N2F'] took 561ms
2025-07-04 10:48:43: Client request 'alpr' in queue 'alpr_queue' (#reqid ed688a5f-e85e-4de2-a22c-427a3133564b)
2025-07-04 10:48:43: Request 'alpr' dequeued from 'alpr_queue' (#reqid ed688a5f-e85e-4de2-a22c-427a3133564b)

blue iris log.
0 7/4/2025 10:48:30.813 AM bd ONVIF Event: RuleEngine/CellMotionDetector/Motion
1 7/4/2025 10:48:33.472 AM Cam2 Web: No stream: 400
3 7/4/2025 10:48:33.942 AM Cam2 Retriggered: ONVIF
0 7/4/2025 10:48:34.063 AM bd ONVIF Event: RuleEngine/CellMotionDetector/Motion
3 7/4/2025 10:48:34.334 AM Cam2 Alerted
 
{ "ai_dump":&JSON, "Image":"&ALERT_JPEG", "camera":"&CAM", "ALERT_PATH": "&ALERT_PATH", "ALERT_CLIP": "&ALERT_CLIP", "timestamp":"&ALERT_TIME" }

generates the errors above.

{ "ai_dump":"&PLATE", "Image":"&ALERT_JPEG", "camera":"&CAM", "ALERT_PATH": "&ALERT_PATH", "ALERT_CLIP": "&ALERT_CLIP", "timestamp":"&ALERT_TIME" }

also generates the same error

This one on top looks correct. What version of BI are you running? Are you getting correct plate reads in BI?
 
Is it possible your database password isn't set correctly?
7/4/2025, 11:13:53 AM [INFO] Database connection successful
7/4/2025, 11:13:58 AM [INFO] Database connection successful
7/4/2025, 11:14:01 AM [INFO] Received plate read data: [object Object]

it appears the issue might be that BI is not getting the plate data?
 
added... now i see in blue iris, the 400 error.. still no plates showing up

log...
7/4/2025, 10:48:38 AM [INFO] Received plate read data: [object Object]
7/4/2025, 10:49:05 AM [ERROR] Error checking update status: Error: connect ECONNREFUSED 172.18.0.3:5433
7/4/2025, 10:49:05 AM [ERROR] Error checking update status: Error: connect ECONNREFUSED 172.18.0.3:5433
7/4/2025, 10:49:05 AM [ERROR] Error getting camera names: Error: connect ECONNREFUSED 172.18.0.3:5433
7/4/2025, 10:49:06 AM [ERROR] Error checking update status: Error: connect ECONNREFUSED 172.18.0.3:5433

no more json errors,

codeproject log.
2025-07-04 10:48:34: Response rec'd from License Plate Reader command 'alpr' (#reqid 996e0316-9c15-4e08-be2e-0725d60e951a) ['Found Plate: TA2 N2F'] took 561ms
2025-07-04 10:48:43: Client request 'alpr' in queue 'alpr_queue' (#reqid ed688a5f-e85e-4de2-a22c-427a3133564b)
2025-07-04 10:48:43: Request 'alpr' dequeued from 'alpr_queue' (#reqid ed688a5f-e85e-4de2-a22c-427a3133564b)

blue iris log.
0 7/4/2025 10:48:30.813 AM bd ONVIF Event: RuleEngine/CellMotionDetector/Motion
1 7/4/2025 10:48:33.472 AM Cam2 Web: No stream: 400
3 7/4/2025 10:48:33.942 AM Cam2 Retriggered: ONVIF
0 7/4/2025 10:48:34.063 AM bd ONVIF Event: RuleEngine/CellMotionDetector/Motion
3 7/4/2025 10:48:34.334 AM Cam2 Alerted
Screenshot from 2025-07-04 09-17-29.png


Your DB port is wrong. should be 5432, not 5433 (unless you did that intentionally)
 
that is correct port and it connects to the DB ok

BI has a recording that is tagged with the plate at 1106, but i the log just shows

7/4/2025, 11:06:51 AM [INFO] Received plate read data: [object Object]
7/4/2025, 11:06:52 AM [INFO] Received plate read data: [object Object]
7/4/2025, 11:06:53 AM [INFO] Received plate read data: [object Object]
7/4/2025, 11:06:54 AM [INFO] Received plate read data: [object Object]
7/4/2025, 11:06:55 AM [INFO] Received plate read data: [object Object]
7/4/2025, 11:13:23 AM [ERROR] Error checking update status: Error: connect ECONNREFUSED 172.18.0.3:5433

i have no idea what that 172.18.0.3 ip is, it is not a local ip or my address
 
Cam2.20250704_112709968.1.jpg


{ "plate_number":"", "Image":"&ALERT_JPEG", "camera":"Cam2", "ALERT_PATH": "Cam2.20250704_104805.460025.5-0.jpg", "ALERT_CLIP": "@-1", "timestamp":"2025-07-04T16:31:43.218Z"}

that is the json it is outputting.. &PLATE appears to be returning nothing
 
that is correct port and it connects to the DB ok

BI has a recording that is tagged with the plate at 1106, but i the log just shows

7/4/2025, 11:06:51 AM [INFO] Received plate read data: [object Object]
7/4/2025, 11:06:52 AM [INFO] Received plate read data: [object Object]
7/4/2025, 11:06:53 AM [INFO] Received plate read data: [object Object]
7/4/2025, 11:06:54 AM [INFO] Received plate read data: [object Object]
7/4/2025, 11:06:55 AM [INFO] Received plate read data: [object Object]
7/4/2025, 11:13:23 AM [ERROR] Error checking update status: Error: connect ECONNREFUSED 172.18.0.3:5433

i have no idea what that 172.18.0.3 ip is, it is not a local ip or my address

docker network inspect alprdash_default

might give you some insight on the internal network of docker.

The last line in your log says it cannot connect to the database port.
 
making some progress, I added a second alert action using the JSON code found on the project github page..

{ "ai_dump":&JSON, "Image":"&ALERT_JPEG", "camera":"&CAM", "ALERT_PATH": "&ALERT_PATH", "ALERT_CLIP": "&ALERT_CLIP", "timestamp":"&ALERT_TIME" }

it outputs

{ "ai_dump":[{"api":"alpr","found":{"success":true,"processMs":579,"inferenceMs":539,"predictions":[{"confidence":0.9696768522262573,"label":"Plate: TA2 N2F","plate":"TA2 N2F","x_min":1268,"y_min":747,"x_max":1396,"y_max":796}],"message":"Found Plate: TA2 N2F","moduleId":"ALPR","moduleName":"License Plate Reader","code":200,"command":"alpr","requestId":"8de45136-2ea9-4ca6-a46c-4a8cc8f4aa6e","inferenceDevice":"CPU","analysisRoundTripMs":596,"processedBy":"localhost","timestampUTC":"Fri, 04 Jul 2025 16:54:09 GMT"}}], "Image":"&ALERT_JPEG", "camera":"Cam2", "ALERT_PATH": "Cam2.20250704_115408.0.17-0.jpg", "ALERT_CLIP": "@-1", "timestamp":"2025-07-04T16:54:08.348Z" }

which generates this in ALPR..

7/4/2025, 11:50:49 AM [INFO] Received plate read data: [object Object]
7/4/2025, 11:50:49 AM [INFO] Database connection established
7/4/2025, 11:50:49 AM [INFO] [FileStorage] Successfully saved image
7/4/2025, 11:50:49 AM [ERROR] Error processing request: error: there is no unique or exclusion constraint matching the ON CONFLICT specification

so it is getting the data, but for some reason the &PLATE is coming up empty
 
alpr_default

"IPAM": {
"Driver": "default",
"Options": null,
"Config": [
{
"Subnet": "172.18.0.0/16",
"Gateway": "172.18.0.1"
}
]
i have no idea how to change those, or if i should
 
alpr_default

"IPAM": {
"Driver": "default",
"Options": null,
"Config": [
{
"Subnet": "172.18.0.0/16",
"Gateway": "172.18.0.1"
}
]
i have no idea how to change those, or if i should
you shouldnt change it, but that confirms the IP belongs to the internal network for docker. Is your postgres database running?

docker ps
 
Okay, login problem solved, but I am not sure why, maybe someone with a bit more knowledge can explain.

CPAI was in a wedged state. CPAI was running, but the ALPR module was dead, once I started it, I was able to login again, no more error. This is very odd because I have used the database before w/o CPAI running and didn't have any issues, so I am not sure why CPAI ALPR module not running would cause this. The object detection module was still working on CPAI, it was just the ALPR module that died.

Update 1:

So... it's still weird. I usually keep 2 windows of ALPR Database open, one with the live feed, and the other with the table view. I am able to log into 1 window, but the 2nd would still not work, BUT I can just change the url from /login to /live_view and it would let me in.

Something is still broke.

Update 2:

My system is working again. I was also unable to get into the settings menu to check the api key, to do that, I removed /auth/auth.json and restarted. This allowed me to get into the settings menu again, and once there, I noticed the API key changed. Once I updated the api key, everything is working again.

Hope this helps someone out in the future.
I had a login problem yesterday. I hadn't checked the system in awhile, and it wasn't running because my Docker Desktop had died. I started up Docker Desktop, and got that same error message, despite using a saved password and even copying/pasting manually from the password manager, so I know it was correct. That was in Chrome.

I pasted the same password into Safari, and it worked fine, so I used it from there for a bit, then after 30 minutes or so I went back to Chrome, and then Chrome logged in just fine.

So maybe all you needed to do was wait ‍ :idk:
 
a2acad44a76c postgres:13 "docker-entrypoint.s…" 36 hours ago Up 12 hours (healthy) 0.0.0.0:5433->5432/tcp, [::]:5433->5432/tcp alpr-db-1

Okay, looks like it is running but not sure why you have 5433 to 5432 port mapped. I run a few different instances of ALPR and by default, none of them do this. I'm on Linux, so maybe this is normal for Windows.
 
Okay, looks like it is running but not sure why you have 5433 to 5432 port mapped. I run a few different instances of ALPR and by default, none of them do this. I'm on Linux, so maybe this is normal for Windows.
this is running on debian 12, i picked 5433 because years ago i had a testbed on 5432.

it appears that my issue is that i am unable to get BI to send the &PLATE out, it returns a blank entry
 
this is running on debian 12, i picked 5433 because years ago i had a testbed on 5432.

it appears that my issue is that i am unable to get BI to send the &PLATE out, it returns a blank entry
This might help.

 

Attachments

  • camera_AI_settings.PNG
    camera_AI_settings.PNG
    213.2 KB · Views: 0
  • AI_settings.PNG
    AI_settings.PNG
    90 KB · Views: 0