OpenALPR Webhook Processor for IP Cameras

tech101

Known around here
Joined
Mar 30, 2015
Messages
1,485
Reaction score
2,163
Location
SF BayArea, USA
Correct, I think I got all that rite my issue so far is I can do this like I can see in the browser..



But as soon I try say on the same pc its local ip and port .. it does not resolve not sure why this is ..

1609638012457.png
 

mlapaglia

Getting comfortable
Joined
Apr 6, 2016
Messages
849
Reaction score
507
if you go to the webhook address you should get a http 405 error if you are getting to the service correctly.

you might need to mess with your firewall settings to allow the port into your computer.
 

DLONG2

Known around here
Joined
May 17, 2017
Messages
765
Reaction score
457
Anyway just to put a conditional statement in for when it isn't there to just assign it "N/A"??

I'm surprised you can pull car model at night. My images are pitch black except for the plates.
Gymratz found this JSON URL which returns over 90% of plates' data on year, make, model, engine, VIN, single-owner, ever been in repairs, etc.
(Just substitute 'PLATE' for a real plate, and of course 'CA' for a valid state.)


Wonder if this data could likewise be included in an overlay . . .
 

biggen

Known around here
Joined
May 6, 2018
Messages
2,614
Reaction score
2,932
I thought I got a 500 response if it was working properly. Maybe I am not remembering correctly though.

I'm sorry I can't be of more help @tech101 but I'm using the Docker version on Linux and not Windows :(. It could very well be a Windows firewall issue preventing it. If you are getting a successful webhook test then at least you know that is working properly. Maybe disable Windows firewall totally and try again? I hate Windows which is why I run Linux for just about everything.
 

mlapaglia

Getting comfortable
Joined
Apr 6, 2016
Messages
849
Reaction score
507
you'll get a 500 error from the openalpr webhook page, because it's sending it an invalid payload
you'll get a 405 trying to get to localhost:5000/webhook because it's expecting a POST, not a GET request.
 

mlapaglia

Getting comfortable
Joined
Apr 6, 2016
Messages
849
Reaction score
507
Gymratz found this JSON URL which returns over 90% of plates' data on year, make, model, engine, VIN, single-owner, ever been in repairs, etc.
(Just substitute 'PLATE' for a real plate, and of course 'CA' for a valid state.)


Wonder if this data could likewise be included in an overlay . . .
Interesting, could do a comparison between what openalpr thinks the car is and what that site thinks the car is, and if they don't match up by a certain percentage put a big STOLEN CAR FAKE PLATE alert :) ?
 

biggen

Known around here
Joined
May 6, 2018
Messages
2,614
Reaction score
2,932
Ahh ok that makes sense.

I guess you saw my log earlier that the missing parameters are still causing everything to "bomb out" as you say. I guess it wasn't as easy to fix as thought.
 

mlapaglia

Getting comfortable
Joined
Apr 6, 2016
Messages
849
Reaction score
507
i need to see the actual payload to be certain, i assumed the array of vehicles would be empty, i think the array is not even present when there are no vehicles.
 

mlapaglia

Getting comfortable
Joined
Apr 6, 2016
Messages
849
Reaction score
507
if your familiar with c# pull the repo down and run it locally for testing :)

i need to add a debug flag to dump the webhook payloads for troubleshooting also.
 

biggen

Known around here
Joined
May 6, 2018
Messages
2,614
Reaction score
2,932
Sadly I’m not much of a programmer. I’ve dabbled with Python on and off over the years but never C.

If you add the debug flag at some point I’ll run with it to capture the data you need.
 

mlapaglia

Getting comfortable
Joined
Apr 6, 2016
Messages
849
Reaction score
507
I have added a debug option to the configuration file to dump the webhook payloads to the logs. When you get a failure copy the JSON from the log so I can take a look.
 

tech101

Known around here
Joined
Mar 30, 2015
Messages
1,485
Reaction score
2,163
Location
SF BayArea, USA
if you go to the webhook address you should get a http 405 error if you are getting to the service correctly.

you might need to mess with your firewall settings to allow the port into your computer.
Correct, I do get 405 when i open
1609648994663.png

However I cannot get it to do it from internal ip:5000/webhook for some reason and I have disable windows firewall as well and nothing. not sure why..
 

mlapaglia

Getting comfortable
Joined
Apr 6, 2016
Messages
849
Reaction score
507
Correct, I do get 405 when i open


However I cannot get it to do it from internal ip:5000/webhook for some reason and I have disable windows firewall as well and nothing. not sure why..
oh, duh, since you are running on windows you have to tell it to not just listen to localhost. in your appsettings add "urls": "http://0.0.0.0:5000" to get it to listen on all interfaces. you only need to do this if you are running the windows build. docker handles this for you.
 

tech101

Known around here
Joined
Mar 30, 2015
Messages
1,485
Reaction score
2,163
Location
SF BayArea, USA
oh, duh, since you are running on windows you have to tell it to not just listen to localhost. in your appsettings add "urls": "http://0.0.0.0:5000" to get it to listen on all interfaces. you only need to do this if you are running the windows build. docker handles this for you.
Ah, Nice I was just thinking too it was binding issue after reading thru some other stuff ..



Is it suppose to look like this

Code:
{
  "AllowedHosts": "*",
  "Cameras": {
    "Cameras": [
      {
        "Manufacturer": "Dahua",
        "OpenAlprCameraId": ID,
        "Password": "PASS",
        "UpdateOverlayTextUrl": "http://192.168.85.35/cgi-bin/configManager.cgi?action=setConfig&VideoWidget[0].CustomTitle[1].Text=",
        "Username": "admin"
        "urls": "http://0.0.0.0:5000"
      }
    ]
  }
}
 

biggen

Known around here
Joined
May 6, 2018
Messages
2,614
Reaction score
2,932
Just pulled the new container image and running it now with logging "true". I won't get the errors till tonight more than likely but I'll post them when I do.

Thanks!
 

biggen

Known around here
Joined
May 6, 2018
Messages
2,614
Reaction score
2,932
Ok, I'm attaching the log file since it s real big. For some reason I'm not getting overlays any longer and I'm not sure why since nothing changed on my end. I'm getting car make/model/color stuff in the OpenALPR dashboard now that its light enough so I know everything is still working there but nothing is being overlayed on the cam.

Log: e37d3ae816dfa9f33a423ed61a0f3cab9399bd3745a1315d7c82acabb9ea3c6a-json.log
 

mlapaglia

Getting comfortable
Joined
Apr 6, 2016
Messages
849
Reaction score
507
Code:
{
  "AllowedHosts": "*",
  "Cameras": {
    "Cameras": [
      {
        "Manufacturer": "Dahua",
        "OpenAlprCameraId": ID,
        "Password": "PASS",
        "UpdateOverlayTextUrl": "http://192.168.85.35/cgi-bin/configManager.cgi?action=setConfig&VideoWidget[0].CustomTitle[1].Text=",
        "Username": "admin"
      },
      "urls": "http://0.0.0.0:5000"
    ]
  }
}
 

mlapaglia

Getting comfortable
Joined
Apr 6, 2016
Messages
849
Reaction score
507
Ok, I'm attaching the log file since it s real big. For some reason I'm not getting overlays any longer and I'm not sure why since nothing changed on my end. I'm getting car make/model/color stuff in the OpenALPR dashboard now that its light enough so I know everything is still working there but nothing is being overlayed on the cam.

Log: e37d3ae816dfa9f33a423ed61a0f3cab9399bd3745a1315d7c82acabb9ea3c6a-json.log
if you turn logging off does it start working again?
 
Top