appsettings.json
with this:{
"AllowedHosts": "*",
"Cameras": {
"Cameras": [
{
"Manufacturer": "Dahua",
"OpenAlprCameraId": <ID>,
"Password": "<password>",
"UpdateOverlayTextUrl": "http://10.200.200.12:65002/cgi-bin/configManager.cgi?action=setConfig&VideoWidget[0].CustomTitle[1].Text=",
"Username": "admin"
},
}
]
}
}
[09:05:56 INF] Route matched with {action = "Post", controller = "WebhookProcessor"}. Executing controller action with signature Void Post(OpenAlprWebhookProcessor.WebhookProcessor.OpenAlprWebhook) on controller OpenAlprWebhookProcessor.WebhookProcessor.WebhookProcessor (OpenAlprWebhookProcessor).
[09:05:56 INF] request received from: ::ffff:192.168.1.68
[09:05:56 INF] adding job for plate: HF5635
[09:05:56 INF] processing job for plate: HF5635
[09:05:56 INF] Executed action OpenAlprWebhookProcessor.WebhookProcessor.WebhookProcessor.Post (OpenAlprWebhookProcessor) in 2.8344ms
[09:05:56 INF] Executed endpoint 'OpenAlprWebhookProcessor.WebhookProcessor.WebhookProcessor.Post (OpenAlprWebhookProcessor)'
[09:05:56 INF] HTTP POST /webhook responded 200 in 3.8108 ms
[09:05:56 INF] Request finished in 4.6247ms 200
[09:06:02 INF] clearing expired overlay for: 106232742
tail -f
of the log:{"log":"[19:15:14 INF] Request starting HTTP/1.1 POST http://<ip address>:3859/webhook application/json 24405\n","stream":"stdout","time":"2021-01-02T19:15:14.374649987Z"}
{"log":"[19:15:14 INF] Executing endpoint 'OpenAlprWebhookProcessor.WebhookProcessor.WebhookProcessor.Post (OpenAlprWebhookProcessor)'\n","stream":"stdout","time":"2021-01-02T19:15:14.375403261Z"}
{"log":"[19:15:14 INF] Route matched with {action = \"Post\", controller = \"WebhookProcessor\"}. Executing controller action with signature Void Post(OpenAlprWebhookProcessor.WebhookProcessor.OpenAlprWebhook) on controller OpenAlprWebhookProcessor.WebhookProcessor.WebhookProcessor (OpenAlprWebhookProcessor).\n","stream":"stdout","time":"2021-01-02T19:15:14.380248317Z"}
{"log":"[19:15:14 INF] request received from: ::ffff:52.201.255.102\n","stream":"stdout","time":"2021-01-02T19:15:14.515617482Z"}
{"log":"[19:15:14 INF] adding job for plate: 776EH\n","stream":"stdout","time":"2021-01-02T19:15:14.516520987Z"}
{"log":"[19:15:14 INF] processing job for plate: 776EH\n","stream":"stdout","time":"2021-01-02T19:15:14.517309471Z"}
{"log":"[19:15:14 ERR] Value cannot be null. (Parameter 'source')\n","stream":"stdout","time":"2021-01-02T19:15:14.518298862Z"}
{"log":"[19:15:14 INF] Executed action OpenAlprWebhookProcessor.WebhookProcessor.WebhookProcessor.Post (OpenAlprWebhookProcessor) in 136.8566ms\n","stream":"stdout","time":"2021-01-02T19:15:14.520044891Z"}
{"log":"[19:15:14 INF] Executed endpoint 'OpenAlprWebhookProcessor.WebhookProcessor.WebhookProcessor.Post (OpenAlprWebhookProcessor)'\n","stream":"stdout","time":"2021-01-02T19:15:14.52084357Z"}
{"log":"[19:15:14 INF] HTTP POST /webhook responded 200 in 146.6037 ms\n","stream":"stdout","time":"2021-01-02T19:15:14.52166856Z"}
{"log":"[19:15:14 INF] Request finished in 148.4279ms 200 \n","stream":"stdout","time":"2021-01-02T19:15:14.523152022Z"}
Value cannot be null. (Parameter 'source')\n","stream":"stdout","time":"2021-01-02T19:15:14.518298862Z"}
dotnet .\OpenAlprWebhookProcessor.dll
from within that folder. You won't need docker this way. You will need the dotnet core 3.1 runtime for this to work.{
"AllowedHosts": "*",
"Cameras": {
"Cameras": [
{
"Manufacturer": "Dahua",
"OpenAlprCameraId": 000,
"Password": "password",
"UpdateOverlayTextUrl": "http://10.200.200.12/cgi-bin/configManager.cgi?action=setConfig&VideoWidget[0].CustomTitle[1].Text=",
"Username": "user"
}
}
]
}
}
}
in there.{"log":"[19:46:47 ERR] Value cannot be null. (Parameter 'source')\n","stream":"stdout","time":"2021-01-02T19:46:47.981745156Z"}
appsettings.json
{
"AllowedHosts": "*",
"Cameras": {
"Cameras": [
{
"Manufacturer": "Dahua",
"OpenAlprCameraId": 254963574,
"Password": "password",
"UpdateOverlayTextUrl": "http://10.200.200.12/cgi-bin/configManager.cgi?action=setConfig&VideoWidget[0].CustomTitle[1].Text=",
"Username": "admin"
}
]
}
}
appsettings.json
in the docker cmd line. That may be the issue.{"log":"[20:00:08 WRN] Failed to determine the https port for redirect.\n","stream":"stdout","time":"2021-01-02T20:00:08.903529826Z"}
{"log":"[20:00:09 ERR] Value cannot be null. (Parameter 'source')\n","stream":"stdout","time":"2021-01-02T20:00:09.595323567Z"}
appsettings.json
again:{
"AllowedHosts": "*",
"Cameras": {
"Cameras": [
{
"Manufacturer": "Dahua",
"OpenAlprCameraId": 0000,
"Password": "pass",
"UpdateOverlayTextUrl": "http://10.200.200.12/cgi-bin/configManager.cgi?action=setConfig&VideoWidget[0].CustomTitle[1].Text=",
"Username": "admin"
}
]
}
}
start.sh
file I used to kick off the container:#!/bin/bash
docker run -d \
--name=openalprwebhookprocessor \
--net=bridge \
-v /home/joe/webhook_alpr/app/appsettings.json:/appsettings.json \
-p 3859:80 \
mlapaglia/openalprwebhookprocessor
appsettings.json
full path is indeed /home/joe/webhook_alpr/app/appsettings.json
just as its listed in that file.docker run -d \
--name=openalprwebhookprocessor \
--net=bridge \
-v /app/appsettings.json:/appsettings.json \
-p 3859:80 \
mlapaglia/openalprwebhookprocessor
appsettings.json
is designed to be placed in /app
. So if I'm on Linux the full path is just /app/appsettings.json
, correct?{"log":"[21:20:12 INF] Now listening on: http://[::]:80\n","stream":"stdout","time":"2021-01-02T21:20:12.151830111Z"}
{"log":"[21:20:12 INF] Application started. Press Ctrl+C to shut down.\n","stream":"stdout","time":"2021-01-02T21:20:12.152431156Z"}
{"log":"[21:20:12 INF] Hosting environment: Production\n","stream":"stdout","time":"2021-01-02T21:20:12.152542626Z"}
{"log":"[21:20:12 INF] Content root path: /app\n","stream":"stdout","time":"2021-01-02T21:20:12.152681455Z"}
{"log":"[21:28:05 INF] Request starting HTTP/1.1 POST http://IP:3859/webhook application/json 27688\n","stream":"stdout","time":"2021-01-02T21:28:05.975482668Z"}
{"log":"[21:28:05 WRN] Failed to determine the https port for redirect.\n","stream":"stdout","time":"2021-01-02T21:28:05.985276557Z"}
{"log":"[21:28:06 INF] Executing endpoint 'OpenAlprWebhookProcessor.WebhookProcessor.WebhookProcessor.Post (OpenAlprWebhookProcessor)'\n","stream":"stdout","time":"2021-01-02T21:28:06.063968085Z"}
{"log":"[21:28:06 INF] Route matched with {action = \"Post\", controller = \"WebhookProcessor\"}. Executing controller action with signature Void Post(OpenAlprWebhookProcessor.WebhookProcessor.OpenAlprWebhook) on controller OpenAlprWebhookProcessor.WebhookProcessor.WebhookProcessor (OpenAlprWebhookProcessor).\n","stream":"stdout","time":"2021-01-02T21:28:06.175609602Z"}
{"log":"[21:28:06 INF] request received from: ::ffff:54.165.211.244\n","stream":"stdout","time":"2021-01-02T21:28:06.49614601Z"}
{"log":"[21:28:06 INF] adding job for plate: 764RNC\n","stream":"stdout","time":"2021-01-02T21:28:06.502409927Z"}
{"log":"[21:28:06 INF] processing job for plate: 764RNC\n","stream":"stdout","time":"2021-01-02T21:28:06.504295849Z"}
{"log":"[21:28:06 ERR] Value cannot be null. (Parameter 'source')\n","stream":"stdout","time":"2021-01-02T21:28:06.515348019Z"}
{"log":"[21:28:06 INF] Executed action OpenAlprWebhookProcessor.WebhookProcessor.WebhookProcessor.Post (OpenAlprWebhookProcessor) in 344.5401ms\n","stream":"stdout","time":"2021-01-02T21:28:06.536410993Z"}
{"log":"[21:28:06 INF] Executed endpoint 'OpenAlprWebhookProcessor.WebhookProcessor.WebhookProcessor.Post (OpenAlprWebhookProcessor)'\n","stream":"stdout","time":"2021-01-02T21:28:06.53931824Z"}
{"log":"[21:28:06 INF] HTTP POST /webhook responded 200 in 554.0256 ms\n","stream":"stdout","time":"2021-01-02T21:28:06.547187688Z"}
{"log":"[21:28:06 INF] Request finished in 589.2181ms 200 \n","stream":"stdout","time":"2021-01-02T21:28:06.552650447Z"}
appsettings.json
into the /app/
directory as you indicate. Still can't get it working.