From 828f3a61daec96047a8e2ee3341be4b37f0ba3ed Mon Sep 17 00:00:00 2001 From: Matt LaPaglia Date: Thu, 31 Dec 2020 16:14:05 -0600 Subject: [PATCH] Examples (#4) * samples * readme update --- .../appsettings.example.json | 26 +++++++++++++++++++ .../OpenAlprWebhook/OpenAlprWebhook.cs | 2 +- .../WebhookProcessor/OpenAlprWebhook/Plate.cs | 2 +- OpenAlprWebhookProcessor/appsettings.json | 12 --------- README.md | 17 +++++++++++- 5 files changed, 44 insertions(+), 15 deletions(-) create mode 100644 ConfigurationExamples/appsettings.example.json diff --git a/ConfigurationExamples/appsettings.example.json b/ConfigurationExamples/appsettings.example.json new file mode 100644 index 00000000..e0d5447e --- /dev/null +++ b/ConfigurationExamples/appsettings.example.json @@ -0,0 +1,26 @@ +{ + "AllowedHosts": "*", + "Cameras": { + "HikvisionCameras": [ + { + "OpenAlprCameraId": 0, + "Password": "ip_camera_password", + "UpdateTextUrl": "http://ip_camera_ip/url_to_update_overlays", + "Username": "ip_camera_username" + }, + { + "OpenAlprCameraId": 0, + "Password": "ip_camera_password", + "UpdateTextUrl": "http://ip_camera_ip/url_to_update_overlays", + "Username": "ip_camera_username" + } + ] + }, + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + } +} \ No newline at end of file diff --git a/OpenAlprWebhookProcessor/WebhookProcessor/OpenAlprWebhook/OpenAlprWebhook.cs b/OpenAlprWebhookProcessor/WebhookProcessor/OpenAlprWebhook/OpenAlprWebhook.cs index c00afdf6..7242c8b6 100644 --- a/OpenAlprWebhookProcessor/WebhookProcessor/OpenAlprWebhook/OpenAlprWebhook.cs +++ b/OpenAlprWebhookProcessor/WebhookProcessor/OpenAlprWebhook/OpenAlprWebhook.cs @@ -78,7 +78,7 @@ public class OpenAlprWebhook public string BestRegion { get; set; } [JsonPropertyName("best_region_confidence")] - public int BestRegionConfidence { get; set; } + public double BestRegionConfidence { get; set; } [JsonPropertyName("matches_template")] public bool MatchesTemplate { get; set; } diff --git a/OpenAlprWebhookProcessor/WebhookProcessor/OpenAlprWebhook/Plate.cs b/OpenAlprWebhookProcessor/WebhookProcessor/OpenAlprWebhook/Plate.cs index e3a55862..99879318 100644 --- a/OpenAlprWebhookProcessor/WebhookProcessor/OpenAlprWebhook/Plate.cs +++ b/OpenAlprWebhookProcessor/WebhookProcessor/OpenAlprWebhook/Plate.cs @@ -21,7 +21,7 @@ public class Plate public string Region { get; set; } [JsonPropertyName("region_confidence")] - public int RegionConfience { get; set; } + public double RegionConfidence { get; set; } [JsonPropertyName("processing_time_ms")] public double ProcessingTimeMs { get; set; } diff --git a/OpenAlprWebhookProcessor/appsettings.json b/OpenAlprWebhookProcessor/appsettings.json index ebad0774..2f5559b4 100644 --- a/OpenAlprWebhookProcessor/appsettings.json +++ b/OpenAlprWebhookProcessor/appsettings.json @@ -2,18 +2,6 @@ "AllowedHosts": "*", "Cameras": { "HikvisionCameras": [ - { - "OpenAlprCameraId": 0, - "Password": "", - "UpdateTextUrl": "http://x.x.x.x/ISAPI/System/Video/inputs/channels/1/overlays", - "Username": "" - }, - { - "OpenAlprCameraId": 0, - "Password": "", - "UpdateTextUrl": "http://x.x.x.x/ISAPI/System/Video/inputs/channels/1/overlays", - "Username": "" - } ] }, "Logging": { diff --git a/README.md b/README.md index 5f5be6c3..44f83b89 100644 --- a/README.md +++ b/README.md @@ -1 +1,16 @@ -# OpenAlprWebhookProcessor \ No newline at end of file +# OpenALPR Webhook Processor + +This service accepts license plate webhooks from the OpenALPR web server. The webhook data (license plate number, make/model, year) is then set as text on the configured IP camera video overlay. + +## Quick Start +The container needs 1 port for incoming connections, and an appsettings.json volume to configure the cameras to update. Check the `ConfigurationExamples` folder for guidance. + +## Docker Configuration +**docker cli** + + docker run -d \ + --name=openalprwebhookprocessor \ + --net=bridge \ + -v /app/appsettings.json:/appsettings.json\ + -p 3859:80 \ + mlapaglia/openalprwebhookprocessor \ No newline at end of file