OpenALPR Webhook Processor for IP Cameras

mlapaglia

Getting comfortable
Joined
Apr 6, 2016
Messages
849
Reaction score
506
I have created a docker container and windows application that can listen for OpenALPR webhooks when license plates are detected, parse pertinent information from the payload (plate #, make, model), and place them on the camera's text overlay. It also has a small dashboard to show recorded plates, not limited by the "homeowner" license cloud.openalpr.com gives you. It also schedules cameras into day/night mode as well as control focus.

Either run it in docker or run the executable on your windows desktop. after initial startup all configuration is done through the web ui.

Screenshot 2023-11-05 001947.png


Example overlay image:
1623727692409.png

Confirmed working with:
Dahua IPC-HFW5231E-Z12E
Dahua IPC-HFW5241E-Z12E

Hikvision DS-2CD2335FWD-I
Hikvision DS-2CD2325FWD-I

There is an example configuration file in the repository to use as a starting point.


The service stores the plates in a local db. Camera and Agent configuration are done through the UI:
1623727850617.png



Github:
Docker:
 

Attachments

Last edited:

tech101

Known around here
Joined
Mar 30, 2015
Messages
1,472
Reaction score
2,125
Location
SF BayArea, USA
Ah this seems very interesting. I have dahua Cams doing alpr rite now will love to test this once this can work with my cams :D
 

mlapaglia

Getting comfortable
Joined
Apr 6, 2016
Messages
849
Reaction score
506
if you can give me the URL and the json/xml payload that needs to be sent to change the overlay I can get it added.
also the make/model so i can start making a list of what is supported.
 

tech101

Known around here
Joined
Mar 30, 2015
Messages
1,472
Reaction score
2,125
Location
SF BayArea, USA
if you can give me the URL and the json/xml payload that needs to be sent to change the overlay I can get it added.
also the make/model so i can start making a list of what is supported.
I belive most of us here are using the HFW5231E-Z12E. for the lpr How do I go about getting you the url json xml ?
 

mlapaglia

Getting comfortable
Joined
Apr 6, 2016
Messages
849
Reaction score
506
It will be similar to mlapaglia/OpenAlprWebhookProcessor

Open up your browser dev console, click the "save" button when you are looking at the overlays, find the URL that the data got sent to, and the request payload should be there with it.
 

mlapaglia

Getting comfortable
Joined
Apr 6, 2016
Messages
849
Reaction score
506
ya, go to the network tab in the dev console then click save and see what appears in network tab
 

mlapaglia

Getting comfortable
Joined
Apr 6, 2016
Messages
849
Reaction score
506
if you click on each of those RPC2 it'll open up a side window that will show what got sent in the request, look for something related to overlays
 

mlapaglia

Getting comfortable
Joined
Apr 6, 2016
Messages
849
Reaction score
506
good, double click the text in the Form Data field and copy it in here. try searching each one for "TE-121" to narrow down which call is setting that text
 

tech101

Known around here
Joined
Mar 30, 2015
Messages
1,472
Reaction score
2,125
Location
SF BayArea, USA
good, double click the text in the Form Data field and copy it in here. try searching each one for "TE-121" to narrow down which call is setting that text
{"method":"system.multicall","params":[{"method":"configManager.setConfig","params":{"name":"ChannelTitle","table":[{"Name":"LPR 1 (TE-121)"}],"options":[]},"id":380,"session":"6edb1a0885860c4b008ea9cbb77cb9d3"},{"method":"configManager.setConfig","params":{"name":"VideoWidget","table":[{"ChannelTitle":{"BackColor":[0,0,0,128],"EncodeBlend":true,"FrontColor":[255,255,255,0],"PreviewBlend":true,"Rect":[148,7511,1773,7928],"TextAlign":2},"Covers":[{"BackColor":[0,0,0,128],"EncodeBlend":false,"FrontColor":[255,255,255,0],"PreviewBlend":false,"Rect":[0,0,1024,1024]},{"BackColor":[0,0,0,128],"EncodeBlend":false,"FrontColor":[255,255,255,0],"PreviewBlend":false,"Rect":[1024,1024,2048,2048]},{"BackColor":[0,0,0,128],"EncodeBlend":false,"FrontColor":[255,255,255,0],"PreviewBlend":false,"Rect":[2048,2048,3072,3072]},{"BackColor":[0,0,0,128],"EncodeBlend":false,"FrontColor":[255,255,255,0],"PreviewBlend":false,"Rect":[3072,3072,4096,4096]}],"CustomTitle":[{"BackColor":[0,0,0,128],"EncodeBlend":false,"FrontColor":[255,255,255,0],"PreviewBlend":false,"Rect":[5321,7450,7931,7868],"Text":""},{"BackColor":[0,0,0,128],"EncodeBlend":false,"FrontColor":[255,255,255,0],"PreviewBlend":false,"Rect":[5319,7445,7929,7862],"Text":""},{"BackColor":[0,0,0,128],"EncodeBlend":false,"FrontColor":[255,255,255,0],"PreviewBlend":false,"Rect":[5321,7450,7931,7868],"Text":""},{"BackColor":[0,0,0,128],"EncodeBlend":false,"FrontColor":[255,255,255,0],"PreviewBlend":false,"Rect":[5321,7450,7931,7868],"Text":""}],"FontSize":32,"FontSizeExtra1":32,"FontSizeExtra2":32,"FontSizeExtra3":32,"FontSizeScale":1,"FontSizeSnapshot":32,"OSDMobileState":{"BackColor":[0,1,1,128],"EncodeBlend":true,"FrontColor":[255,255,255,0],"PreviewBlend":true,"Rect":[6295,920,7929,1351]},"PTZCoordinates":{"BackColor":[0,1,1,128],"DisplayTime":0,"EncodeBlend":false,"FrontColor":[255,255,255,0],"PreviewBlend":false,"Rect":[541,3320,541,3320]},"PTZDirection":{"BackColor":[0,1,1,128],"DisplayTime":5,"EncodeBlend":false,"FrontColor":[255,255,255,0],"PreviewBlend":false,"Rect":[541,3320,541,3320]},"PTZOSDMenu":{"BackColor":[0,1,1,128],"DisplayTime":0,"EncodeBlend":false,"FrontColor":[255,255,255,0],"PreviewBlend":false,"Rect":[541,3320,541,3320]},"PTZOSDMenuViaApp":{"BackColor":[0,1,1,128],"DisplayTime":60,"EncodeBlend":true,"EncodeBlendExtra1":true,"EncodeBlendExtra2":true,"FrontColor":[255,255,255,0],"PreviewBlend":true,"Rect":[281,1477,2897,1542]},"PTZPreset":{"BackColor":[0,1,1,128],"DisplayTime":5,"EncodeBlend":false,"FrontColor":[255,255,255,3],"PreviewBlend":false,"Rect":[475,1442,475,1442]},"PTZZoom":{"BackColor":[0,1,1,128],"DisplayTime":0,"EncodeBlend":false,"FrontColor":[255,255,255,0],"PreviewBlend":false,"Rect":[541,3320,541,3320]},"PictureTitle":{"BackColor":[0,0,0,128],"EncodeBlend":false,"FrontColor":[255,255,255,0],"Name":"osd.bmp","PreviewBlend":false,"Rect":[0,0,128,128]},"PtzPattern":{"BackColor":[0,1,1,128],"DisplayTime":0,"EncodeBlend":true,"FrontColor":[255,255,255,0],"PreviewBlend":false,"Rect":[541,3320,541,3320]},"PtzRS485Detect":{"BackColor":[0,1,1,128],"DisplayTime":0,"EncodeBlend":true,"FrontColor":[255,255,255,0],"PreviewBlend":false,"Rect":[541,3320,541,3320]},"Temperature":{"BackColor":[0,1,1,128],"DisplayTime":0,"EncodeBlend":false,"FrontColor":[255,255,255,0],"PreviewBlend":false,"Rect":[541,3320,541,3320],"TemperatureUnit":"Centigrade"},"TimeTitle":{"BackColor":[0,0,0,128],"EncodeBlend":true,"FrontColor":[255,255,255,0],"PreviewBlend":true,"Rect":[5319,352,7929,769],"ShowWeek":false,"WeekPosition":"Right"},"UserDefinedTitle":[{"BackColor":[0,0,0,128],"EncodeBlend":false,"FrontColor":[255,255,255,0],"PreviewBlend":false,"Rect":[148,352,1773,769],"Text":""},{"BackColor":[0,0,0,128],"EncodeBlend":false,"FrontColor":[255,255,255,0],"PreviewBlend":false,"Rect":[148,352,1773,769],"Text":""},{"BackColor":[0,0,0,128],"EncodeBlend":false,"FrontColor":[255,255,255,0],"PreviewBlend":false,"Rect":[148,352,1773,769],"Text":""},{"BackColor":[0,0,0,128],"EncodeBlend":false,"FrontColor":[255,255,255,0],"PreviewBlend":false,"Rect":[148,352,1773,769],"Text":""}],"VoltageStatus":{"BackColor":[0,1,1,128],"DisplayTime":0,"EncodeBlend":false,"FrontColor":[255,255,255,0],"PreviewBlend":true,"Rect":[541,3320,541,3320]},"WideHeightRatio":0}],"options":[]},"id":381,"session":"6edb1a0885860c4b008ea9cbb77cb9d3"}],"id":382,"session":"6edb1a0885860c4b008ea9cbb77cb9d3"}:
 

mlapaglia

Getting comfortable
Joined
Apr 6, 2016
Messages
849
Reaction score
506
Can you go into the text overlay options and populate some of the fields, then do the same copy paste of the payload? i found the channel title field but don't see the overlays
 

mlapaglia

Getting comfortable
Joined
Apr 6, 2016
Messages
849
Reaction score
506
no no, click on overlay, enable it, populate some of the fields, then click save. it'll be another RPC2 call
 

tech101

Known around here
Joined
Mar 30, 2015
Messages
1,472
Reaction score
2,125
Location
SF BayArea, USA
The first RPC 2 .. after clicking overlay..

{"method":"system.multicall","params":[{"method":"configManager.getConfig","params":{"name":"Encode"},"id":357,"session":"416eaad9e266a4cea830c6ec143f7ab0"},{"method":"configManager.getConfig","params":{"name":"SmartEncode"},"id":358,"session":"416eaad9e266a4cea830c6ec143f7ab0"}],"id":359,"session":"416eaad9e266a4cea830c6ec143f7ab0"}:

The 2nd
{"method":"ptz.getCurrentProtocolCaps","params":null,"id":360,"session":"416eaad9e266a4cea830c6ec143f7ab0","object":790168624}:

The third rpc 2

{"method":"system.multicall","params":[{"method":"configManager.getConfig","params":{"name":"VideoWidget"},"id":361,"session":"416eaad9e266a4cea830c6ec143f7ab0"},{"method":"configManager.getConfig","params":{"name":"ChannelTitle"},"id":362,"session":"416eaad9e266a4cea830c6ec143f7ab0"},{"method":"configManager.getConfig","params":{"name":"VideoWidgetNumberStat"},"id":363,"session":"416eaad9e266a4cea830c6ec143f7ab0"},{"method":"configManager.getConfig","params":{"name":"OSDSysAbnormal"},"id":364,"session":"416eaad9e266a4cea830c6ec143f7ab0"},{"method":"configManager.getConfig","params":{"name":"VideoWidget2"},"id":365,"session":"416eaad9e266a4cea830c6ec143f7ab0"},{"method":"configManager.getConfig","params":{"name":"GPS"},"id":366,"session":"416eaad9e266a4cea830c6ec143f7ab0"},{"method":"configManager.getConfig","params":{"name":"VideoWidgetRoadInfo"},"id":367,"session":"416eaad9e266a4cea830c6ec143f7ab0"},{"method":"configManager.getConfig","params":{"name":"AtmosphereOSD"},"id":368,"session":"416eaad9e266a4cea830c6ec143f7ab0"},{"method":"configManager.getConfig","params":{"name":"LaserDistMeasure"},"id":369,"session":"416eaad9e266a4cea830c6ec143f7ab0"},{"method":"configManager.getConfig","params":{"name":"FaceFlowStat"},"id":370,"session":"416eaad9e266a4cea830c6ec143f7ab0"},{"method":"configManager.getConfig","params":{"name":"DevLocation"},"id":371,"session":"416eaad9e266a4cea830c6ec143f7ab0"},{"method":"configManager.getConfig","params":{"name":"VideoWidgetSolarCellStat"},"id":372,"session":"416eaad9e266a4cea830c6ec143f7ab0"}],"id":373,"session":"416eaad9e266a4cea830c6ec143f7ab0"}:
 

tech101

Known around here
Joined
Mar 30, 2015
Messages
1,472
Reaction score
2,125
Location
SF BayArea, USA
This is the one for Text overlay..
1609458438675.png
{"method":"system.multicall","params":[{"method":"configManager.setConfig","params":{"name":"ChannelTitle","table":[{"Name":"LPR 1 (TE-121)"}],"options":[]},"id":378,"session":"416eaad9e266a4cea830c6ec143f7ab0"},{"method":"configManager.setConfig","params":{"name":"VideoWidget","table":[{"ChannelTitle":{"BackColor":[0,0,0,128],"EncodeBlend":true,"FrontColor":[255,255,255,0],"PreviewBlend":true,"Rect":[148,7511,1773,7928],"TextAlign":2},"Covers":[{"BackColor":[0,0,0,128],"EncodeBlend":false,"FrontColor":[255,255,255,0],"PreviewBlend":false,"Rect":[0,0,1024,1024]},{"BackColor":[0,0,0,128],"EncodeBlend":false,"FrontColor":[255,255,255,0],"PreviewBlend":false,"Rect":[1024,1024,2048,2048]},{"BackColor":[0,0,0,128],"EncodeBlend":false,"FrontColor":[255,255,255,0],"PreviewBlend":false,"Rect":[2048,2048,3072,3072]},{"BackColor":[0,0,0,128],"EncodeBlend":false,"FrontColor":[255,255,255,0],"PreviewBlend":false,"Rect":[3072,3072,4096,4096]}],"CustomTitle":[{"BackColor":[0,0,0,128],"EncodeBlend":false,"FrontColor":[255,255,255,0],"PreviewBlend":false,"Rect":[5321,7450,7931,7868],"Text":""},{"BackColor":[0,0,0,128],"EncodeBlend":true,"FrontColor":[255,255,255,0],"PreviewBlend":true,"Rect":[5319,7445,7929,7862],"Text":"Test","TextAlign":2},{"BackColor":[0,0,0,128],"EncodeBlend":false,"FrontColor":[255,255,255,0],"PreviewBlend":false,"Rect":[5321,7450,7931,7868],"Text":""},{"BackColor":[0,0,0,128],"EncodeBlend":false,"FrontColor":[255,255,255,0],"PreviewBlend":false,"Rect":[5321,7450,7931,7868],"Text":""}],"FontSize":32,"FontSizeExtra1":32,"FontSizeExtra2":32,"FontSizeExtra3":32,"FontSizeScale":1,"FontSizeSnapshot":32,"OSDMobileState":{"BackColor":[0,1,1,128],"EncodeBlend":true,"FrontColor":[255,255,255,0],"PreviewBlend":true,"Rect":[6295,920,7929,1351]},"PTZCoordinates":{"BackColor":[0,1,1,128],"DisplayTime":0,"EncodeBlend":false,"FrontColor":[255,255,255,0],"PreviewBlend":false,"Rect":[541,3320,541,3320]},"PTZDirection":{"BackColor":[0,1,1,128],"DisplayTime":5,"EncodeBlend":false,"FrontColor":[255,255,255,0],"PreviewBlend":false,"Rect":[541,3320,541,3320]},"PTZOSDMenu":{"BackColor":[0,1,1,128],"DisplayTime":0,"EncodeBlend":false,"FrontColor":[255,255,255,0],"PreviewBlend":false,"Rect":[541,3320,541,3320]},"PTZOSDMenuViaApp":{"BackColor":[0,1,1,128],"DisplayTime":60,"EncodeBlend":true,"EncodeBlendExtra1":true,"EncodeBlendExtra2":true,"FrontColor":[255,255,255,0],"PreviewBlend":true,"Rect":[281,1477,2897,1542]},"PTZPreset":{"BackColor":[0,1,1,128],"DisplayTime":5,"EncodeBlend":false,"FrontColor":[255,255,255,3],"PreviewBlend":false,"Rect":[475,1442,475,1442]},"PTZZoom":{"BackColor":[0,1,1,128],"DisplayTime":0,"EncodeBlend":false,"FrontColor":[255,255,255,0],"PreviewBlend":false,"Rect":[541,3320,541,3320]},"PictureTitle":{"BackColor":[0,0,0,128],"EncodeBlend":false,"FrontColor":[255,255,255,0],"Name":"osd.bmp","PreviewBlend":false,"Rect":[0,0,128,128]},"PtzPattern":{"BackColor":[0,1,1,128],"DisplayTime":0,"EncodeBlend":true,"FrontColor":[255,255,255,0],"PreviewBlend":false,"Rect":[541,3320,541,3320]},"PtzRS485Detect":{"BackColor":[0,1,1,128],"DisplayTime":0,"EncodeBlend":true,"FrontColor":[255,255,255,0],"PreviewBlend":false,"Rect":[541,3320,541,3320]},"Temperature":{"BackColor":[0,1,1,128],"DisplayTime":0,"EncodeBlend":false,"FrontColor":[255,255,255,0],"PreviewBlend":false,"Rect":[541,3320,541,3320],"TemperatureUnit":"Centigrade"},"TimeTitle":{"BackColor":[0,0,0,128],"EncodeBlend":true,"FrontColor":[255,255,255,0],"PreviewBlend":true,"Rect":[5319,352,7929,769],"ShowWeek":false,"WeekPosition":"Right"},"UserDefinedTitle":[{"BackColor":[0,0,0,128],"EncodeBlend":false,"FrontColor":[255,255,255,0],"PreviewBlend":false,"Rect":[148,352,1773,769],"Text":""},{"BackColor":[0,0,0,128],"EncodeBlend":false,"FrontColor":[255,255,255,0],"PreviewBlend":false,"Rect":[148,352,1773,769],"Text":""},{"BackColor":[0,0,0,128],"EncodeBlend":false,"FrontColor":[255,255,255,0],"PreviewBlend":false,"Rect":[148,352,1773,769],"Text":""},{"BackColor":[0,0,0,128],"EncodeBlend":false,"FrontColor":[255,255,255,0],"PreviewBlend":false,"Rect":[148,352,1773,769],"Text":""}],"VoltageStatus":{"BackColor":[0,1,1,128],"DisplayTime":0,"EncodeBlend":false,"FrontColor":[255,255,255,0],"PreviewBlend":true,"Rect":[541,3320,541,3320]},"WideHeightRatio":0}],"options":[]},"id":379,"session":"416eaad9e266a4cea830c6ec143f7ab0"}],"id":380,"session":"416eaad9e266a4cea830c6ec143f7ab0"}:
 
Top