Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ body:
attributes:
label: ALPR Community version
description: Find this under Settings → Release. Include the source revision there when reporting an installation or update problem.
placeholder: v0.1.58
placeholder: v0.1.59
validations:
required: true

Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@ jobs:
yarn install --frozen-lockfile --ignore-scripts --network-timeout 100000
node scripts/install-openvino-runtime.mjs

- name: Verify Axis camera ingestion against isolated PostgreSQL
env:
ALPR_AXIS_TEST_SERVER_URL: postgresql://postgres:fixture-test-password@127.0.0.1:5432/postgres
run: yarn test:camera-inputs:postgres

- name: Exercise load, no-op, guarded clear, and refusal paths
shell: bash
run: |
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## 0.1.59 — 2026-11-01

- Add configurable AXIS License Plate Verifier inputs through HTTP push, MQTT, or both under Settings > Integrations > Camera Inputs. Existing Blue Iris cameras continue automatically.
- Store validated events durably before acknowledgement, correlate passages, deduplicate transports, apply later OCR/image/direction corrections, and preserve original observations and human review.
- Configure camera identity, broker/topic, optional ROI, image storage, movement direction labels, and immediate or finalized processing; include connection tests and recent-event diagnostics.
- Keep recording independent from recognition. Axis events do not create Blue Iris recording links or automatically enable vehicle identification from scene images.
- Update User Guide 3.27 and installation/update examples. Physical Axis hardware was unavailable; firmware-specific compatibility still needs camera testing.
- Fix the PostgreSQL integration-test connection password for authenticated CI servers.
- Update vulnerable Next.js, Nodemailer and transitive dependencies; remove unused legacy image and UI-generator dependencies.

## 0.1.58 — 2026-10-21

- Resize Recognition Feed and Plate Database columns using draggable header dividers or the keyboard, with separate saved widths per browser and a reset option.
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,10 @@ checksums local or SSH image storage, and starts an outbound-isolated target
for browser review. It stores no passwords in state and never stops, switches,
or deletes the retained source.

## Camera inputs

Settings > Integrations > Camera Inputs supports Blue Iris and AXIS License Plate Verifier HTTP/MQTT sources. Existing Blue Iris feeds continue automatically. See [camera input setup](docs/CAMERA_INPUTS.md).

## Blue Iris ingestion

Send ALPR JSON to `/api/plate-reads`. Authenticate with either of these HTTP
Expand Down
35 changes: 35 additions & 0 deletions app/api/camera-inputs/[id]/events/route.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import { getPool } from "@/lib/db";
import { publicInput } from "@/lib/camera-inputs/config.mjs";
import { CameraInputRepository } from "@/lib/camera-inputs/repository.mjs";
import { denyUnlessRoutePermission } from "@/lib/route-permission.mjs";

export async function GET(_request, { params }) {
const denied = await denyUnlessRoutePermission("system.manage_settings");
if (denied) return denied;
const { id } = await params;
try {
const pool = await getPool();
const result = await pool.query(
`SELECT events.id,events.status,events.received_at,events.transport,
events.payload - 'image' - 'sceneImage' AS event,
CASE WHEN passages.last_event_id=events.id THEN reads.thumbnail_path END AS thumbnail_path,
CASE WHEN passages.last_event_id=events.id THEN reads.image_path END AS image_path,
CASE WHEN passages.last_event_id=events.id THEN passages.scene_image_path END AS scene_image_path,
CASE WHEN passages.last_event_id=events.id THEN passages.scene_thumbnail_path END AS scene_thumbnail_path
FROM public.camera_input_events events LEFT JOIN public.plate_reads reads ON reads.id=events.read_id
LEFT JOIN public.camera_input_passages passages ON passages.id=events.passage_id
WHERE events.input_id=$1 ORDER BY events.id DESC LIMIT 5`,
[id],
);
const input = publicInput(await new CameraInputRepository(pool).get(id));
return Response.json(
{ events: result.rows, input },
{ headers: { "Cache-Control": "no-store" } },
);
} catch {
return Response.json(
{ error: "Unable to load recent events" },
{ status: 503 },
);
}
}
29 changes: 29 additions & 0 deletions app/api/camera-inputs/[id]/test/route.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import mqtt from "mqtt";
import { getPool } from "@/lib/db";
import { denyUnlessRoutePermission } from "@/lib/route-permission.mjs";
import { CameraInputRepository } from "@/lib/camera-inputs/repository.mjs";
import { testMqttConnection } from "@/lib/camera-inputs/connection-test.mjs";

export async function POST(_request, { params }) {
const denied = await denyUnlessRoutePermission("system.manage_settings");
if (denied) return denied;
const { id } = await params;
try {
const input = (
await new CameraInputRepository(await getPool()).mqttInputs()
).find((row) => row.id === id);
if (!input?.broker_enabled)
return Response.json(
{ error: "Select an enabled MQTT input and broker first" },
{ status: 400 },
);
return Response.json(await testMqttConnection(input, mqtt.connect), {
headers: { "Cache-Control": "no-store" },
});
} catch {
return Response.json(
{ error: "Connection test unavailable" },
{ status: 503 },
);
}
}
21 changes: 21 additions & 0 deletions app/api/camera-inputs/axis/[id]/route.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { getPool } from "@/lib/db";
import { CameraInputRepository } from "@/lib/camera-inputs/repository.mjs";
import { wakeCameraInputs } from "@/lib/camera-inputs/runtime.mjs";
import { createAxisReceiver } from "@/lib/camera-inputs/http.mjs";

export const runtime = "nodejs";
export async function POST(request, { params }) {
const { id } = await params;
try {
const receiver = createAxisReceiver({
repository: new CameraInputRepository(await getPool()),
wake: wakeCameraInputs,
});
return await receiver(request, id);
} catch {
return Response.json(
{ error: "Event receiver unavailable; retry later" },
{ status: 503 },
);
}
}
61 changes: 61 additions & 0 deletions app/api/camera-inputs/route.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
import { getPool } from "@/lib/db";
import { denyUnlessRoutePermission } from "@/lib/route-permission.mjs";
import { CameraInputRepository } from "@/lib/camera-inputs/repository.mjs";
import { InputError, readAxisRequest } from "@/lib/camera-inputs/axis.mjs";

export async function GET() {
const denied = await denyUnlessRoutePermission("system.manage_settings");
if (denied) return denied;
try {
const pool = await getPool();
const [inputs, brokers] = await Promise.all([
new CameraInputRepository(pool).list(),
pool.query(
"SELECT id,name,broker,port,enabled FROM public.mqttbrokers ORDER BY name",
),
]);
return Response.json(
{ inputs, brokers: brokers.rows },
{ headers: { "Cache-Control": "no-store" } },
);
} catch {
return Response.json(
{ error: "Unable to load camera inputs" },
{ status: 503 },
);
}
}
export async function POST(request) {
const denied = await denyUnlessRoutePermission("system.manage_settings");
if (denied) return denied;
try {
const data = await readAxisRequest(request, 64 * 1024);
if (!data || Array.isArray(data) || typeof data !== "object")
throw new InputError("Expected camera settings");
const repository = new CameraInputRepository(await getPool());
const result = await repository.save(data, data.id || null);
return Response.json(result, { headers: { "Cache-Control": "no-store" } });
} catch (error) {
const status =
error instanceof InputError
? error.status
: error?.code === "23505"
? 409
: error?.code === "23503" || error?.code === "22P02"
? 400
: 503;
return Response.json(
{
error:
error instanceof InputError
? error.message
: status === 409
? "That camera name or device is already configured"
: status === 400
? "Invalid camera or broker selection"
: "Unable to save camera settings",
},
{ status },
);
}
}
Loading
Loading