OpenALPR Webhook Processor for IP Cameras

i'm trying to make an android app that can talk to the api to get plates on your phone, i'm a mobile dev noob though.
 
I didn't see any images (plate nor car) on my local OpenALPR server when I clicked on the plates in the list. Are they supposed to be there? I assumed they were not as that is why I asked if they could be re-created from the base64 code that is sent with the webhook. Are you thinking about pulling the images from the docker Watchman location??

I'm not there at the moment but will check again this afternoon when I get back home.
 
The browser uses the on prem openalpr server to talk to the agent to get the images on the fly when you hover over them. we'll need to figure out how it finds the agent to call for images.
 
Ahh. That is why there is a small delay when you click on a plate from the cloud server. It has to tunnel a connection back to the local Watchman agent to retrieve the image.
 
  • Like
Reactions: mlapaglia
my uneducated guess is the openalpr server listens to the heartbeat and sees what IP address it is coming from and uses that to request the plates. still need to research it.
 
That does make sense because you set the image folder size at the Cloud ALPR server for the local Watchman agent. It defaults to 8GB.

clp.png
 
once i set websockets_enabled = 0 in alprd.conf i am unable to pull back images. i confirmed this in the def query_image_socket(request_data): method in sockets_helper.py
 
i always knew they were, just didn't know how. we'll need to find a way to get the on prem openalpr to connect to the agent OpenALPR Watchman — openalpr 2.8.101 documentation
"Users that prefer an on-premise webserver can follow the instructions below to install the Watchman webserver locally. On-premise installations of the Watchman webserver store metadata from each license plate read in a local MySQL database. Full images of the plate captures remain in a rolling buffer on the hard drive where the Agent is installed. "
 
I think you need a commercial license to do that.

Are the plate/vehicle pic converted to base64 and sent in the webook? Can't it be reversed back to the image?
 
yes, the agent can only push to the cloud, but it will probably accept web socket connections from anywhere. i can modify the heartbeat to send any web socket address we want, and the on prem server will make a connection and grab plates. need to test.
 
I'm still on the Watchman Commercial trial. I wonder if that allows me to connect to my local ALPR server directly from the agent.
 
yes it will, you need to pass in the -w argument when you register your agent for it to register with your on prem server.

It's what I do, only I modified the binary to not check whether my license is valid or not :oops:
 
  • Like
Reactions: biggen
Alright. When I get home I can do that if it helps you. How and what would we need to capture?
 
i was incorrect, the websocket connection comes from the agent, so we can't modify that
INFO Attempting Websockets connection to server
2021-01-07 17:06:50,254 INFO success: beanstalk entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
INFO Received endpoint address wss:/asdf.asdf.com/link
INFO Established connection to: wss:/asdf.asdf.com/link
INFO Using SSL: 1

the easiest way around it would be redirecting cloud.openalpr.com to your local ip.
 
The only issue with modifying the hosts file on the agent would be it may mess it up when it calls home to check if the license is valid. Does it use the cloud.openalpr.com to do that?
 
This seems really nice thank you to both of you seems like some of the issues running the local server are all being squared away nice I would have to give it a good read before I try for sure lol.
 
If we can forward all the agent traffic to the local server via a simple edit of the hosts file, then that is a game changer.