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