I've installed this on multiple machines for other users and have never seen this error. Are you using the the updated migrations.sql file?I ran two fresh install on two different systems, and still same issue
This is a fresh install using the script. Iv googled it and others are having the same issue.I've installed this on multiple machines for other users and have never seen this error. Are you using the the updated migrations.sql file?
The version of BI doesn't matter. Does your file structure look like this?This is a fresh install using the script. Iv googled it and others are having the same issue.
I'm also using version 6 of blueiris if it makes a difference
Im running in Ubuntu 25 . I have had this working before but it stopped after watch tower did some update to the database. So I started fresh
I had that issue each time I installed as well. My only solution was to use Chatgpt to troubleshoot. To my memory the error was occurring because the database was expecting a column of data in the table that didn't exist. It ended up having me do a lot of Powershell commands to correct the issue but it's been running perfectly for months now.Anyone ever figure out the solution to Error processing request: error: null value in column "id" of relation "plate_reads" violates not-null constraint
I ran two fresh install on two different systems, and still same issue
Let me give that a go. I was going to go that route but I saw so many people having this issue I thought someone for sure would have fixed it by nowI had that issue each time I installed as well. My only solution was to use Chatgpt to troubleshoot. To my memory the error was occurring because the database was expecting a column of data in the table that didn't exist. It ended up having me do a lot of Powershell commands to correct the issue but it's been running perfectly for months now.![]()
well by golly that fixed it. Im now seeing results and its working again. Let me post what I ranLet me give that a go. I was going to go that route but I saw so many people having this issue I thought someone for sure would have fixed it by now
Here is the fix I applied
I ran this in the console section of portainer. I was in container alpr_database-db-1
#to get into PostgresSQL
psql -U postgres
#Then I applied this fix. Just copy and paste it
-- Create a sequence for the id column
CREATE SEQUENCE IF NOT EXISTS plate_reads_id_seq;
-- Attach the sequence to plate_reads.id
ALTER TABLE plate_reads
ALTER COLUMN id SET DEFAULT nextval('plate_reads_id_seq');
-- Ensure proper ownership
ALTER SEQUENCE plate_reads_id_seq
OWNED BY plate_reads.id;
-- Sync the sequence with existing rows
SELECT setval(
'plate_reads_id_seq',
COALESCE((SELECT MAX(id) FROM plate_reads), 1),
true
);
Look at your logs. Its probably the database issue that I posted fixes on just a few posts before this one.Ugh. After getting a useful plate capture on January 8, I updated my BI to version 6, and now my ALPR + Database isn't working any more.
It's been so long since I originally set it up that I don't remember all the steps and "gotchas" any more.
I don't even know whether the problem is on the BI/AI side or on the database side, but probably the former, because the ALPR Database web page is running; it just shows zero entries in the db since 1/16/26, which the day I updated BI6.
I'm not averse to either using the old CPAI or the new BIAI, as long as I can get it working.
Didn't someone write a step-by-step troubleshooting guide on how to get this all working together? Does anything significant change with
Which version of BI6 are you running?Ugh. After getting a useful plate capture on January 8, I updated my BI to version 6, and now my ALPR + Database isn't working any more.
Hmm. I'm running Docker Desktop on Win11 Pro, on the same machine that BI is running on, and when I try this from Open in Terminal and attempt that first command, I'm getting "psql: not found"Here is the fix I applied
I ran this in the console section of portainer. I was in container alpr_database-db-1
#to get into PostgresSQL
psql -U postgres
UI3 version 315, Blue Iris version: 6.0.1.30Which version of BI6 are you running?
I think you're asking about my logs from the ALPR Database web server, correct?Look at your logs. Its probably the database issue that I posted fixes on just a few posts before this one.
[ERROR]
Error processing request: SyntaxError: Unexpected token ',', ...""ai_dump":, "Image":"... is not valid JSON
1/30/2026, 11:04:39 AM
[INFO]
POST /api/plate-reads
1/30/2026, 11:04:57 AM
[ERROR]
Error processing request: SyntaxError: Unexpected token ',', ...""ai_dump":, "Image":"... is not valid JSON
1/30/2026, 11:04:57 AM
[INFO]
POST /api/plate-reads
1/30/2026, 11:04:58 AM
[ERROR]
Error processing request: SyntaxError: Unexpected token ',', ...""ai_dump":, "Image":"... is not valid JSON
1/30/2026, 11:04:58 AM
[INFO]
POST /api/plate-reads
{ "ai_dump":&JSON, "Image":"&ALERT_JPEG", "camera":"&CAM", "ALERT_PATH": "&ALERT_PATH", "ALERT_CLIP": "&ALERT_CLIP", "timestamp":"&ALERT_TIME" }
The reason I asked is Ken made a change to what the JSON command is looking for in a couple of versions, but has since reverted back to what it originally was. I can't remember exactly which versions were affected, but I know 6.0.1.30 is working. To check if this is affecting your system you need to open an ALPR alert in BI's AI Inspector and look at the results of the dat file. Towards the top It should read "api":"alpr",. If it says anything else then the ALPR database app cannot read the data.UI3 version 315, Blue Iris version: 6.0.1.30