OpenALPR Webhook Processor for IP Cameras

mlapaglia

Getting comfortable
Joined
Apr 6, 2016
Messages
563
Reaction score
288
I have created a docker container 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

1610485712344.png

1609577132761.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, a swagger endpoint is available to query this local database:



Github:
Docker:
 

Attachments

Last edited:

tech101

Getting comfortable
Joined
Mar 30, 2015
Messages
932
Reaction score
903
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
563
Reaction score
288
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

Getting comfortable
Joined
Mar 30, 2015
Messages
932
Reaction score
903
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
563
Reaction score
288
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
563
Reaction score
288
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
563
Reaction score
288
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
563
Reaction score
288
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

Getting comfortable
Joined
Mar 30, 2015
Messages
932
Reaction score
903
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
563
Reaction score
288
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
563
Reaction score
288
no no, click on overlay, enable it, populate some of the fields, then click save. it'll be another RPC2 call
 

tech101

Getting comfortable
Joined
Mar 30, 2015
Messages
932
Reaction score
903
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

Getting comfortable
Joined
Mar 30, 2015
Messages
932
Reaction score
903
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