OpenALPR Webhook Processor for IP Cameras

mlapaglia

Getting comfortable
Joined
Apr 6, 2016
Messages
849
Reaction score
506
most cameras support triggering alerts based on various things, if that is accessible through the camera's api i can push the command to the camera, which then sets the alert, which blue iris picks up on and does whatever it wants with it.
 

biggen

Known around here
Joined
May 6, 2018
Messages
2,563
Reaction score
2,837
Well dang I wonder where I got the impression that since I couldn't get docker going that I was screwed.

So this stuff is foreign to me - could I (well someone telling me how LOL) use webhooks to add it to the BI Alert clip like Plate Recognizer does?

View attachment 80096
You should try out this service. I think you will be more than happy. No, you won't get overlay data on BI clips but, IMHO, his service is much better and he keeps adding functionality daily. To be able to host the data locally without all the manual hacks that have been required before is quite amazing. And once searching is implemented, look out!!

You can run his service either as a standalone windows program or in a Docker container.
 

IReallyLikePizza2

Known around here
Joined
May 14, 2019
Messages
1,852
Reaction score
4,443
Location
Houston
OpenALPR Says

1611242877858.png


But then Webhook actually says its a Cube! wtf OpenALPR, you got the data, give it to me

1611242914090.png
 

mlapaglia

Getting comfortable
Joined
Apr 6, 2016
Messages
849
Reaction score
506
it might be a limitation of the homeowner license maybe?
 

biggen

Known around here
Joined
May 6, 2018
Messages
2,563
Reaction score
2,837
I've noticed the same issue. It's wrong most of the time anyway so I ignore it. At night, OpenALPR must just make stuff up because it impossible to see anything other than the plate and tail lights.
 

biggen

Known around here
Joined
May 6, 2018
Messages
2,563
Reaction score
2,837
@mlapaglia Is the username and password being sent in the clear when connecting to the web UI from a browser? I've not looked yet.
 

mlapaglia

Getting comfortable
Joined
Apr 6, 2016
Messages
849
Reaction score
506
v3.2.0-alpha1 is in alpha release status with support for ignores. give it some tries and let me know of issues.
  • lenient/strict doesn't do anything yet
  • anything in the ignore list won't show up on the plates results
 

biggen

Known around here
Joined
May 6, 2018
Messages
2,563
Reaction score
2,837
When accessing the webui, usernames and passwords are being sent in the clear unfortunately. This is a problem if you are accessing it over the internet (wireless or not). We probably need a way to hash those or wrap the whole service in Lets Encrypt for full end-to-end security.

lpr.png
 
Last edited:

mlapaglia

Getting comfortable
Joined
Apr 6, 2016
Messages
849
Reaction score
506
v3.2.0-alpha2 removes appsettings completely. it will now automatically generate the jwt secret key and store it in the user db, so the first time you will likely have to sign in again because the key you made manually won't be valid.
 

biggen

Known around here
Joined
May 6, 2018
Messages
2,563
Reaction score
2,837
there is a very easy to use reverse proxy docker image that can set up lets encrypt and reverse proxying with a few clicks of a button Nginx Proxy Manager
Alright I'll check it out. I don't use it away from home to be honest but it's nice to know I can. Just want to expose as little as possible.
 

biggen

Known around here
Joined
May 6, 2018
Messages
2,563
Reaction score
2,837
v3.2.0-alpha2 removes appsettings completely. it will now automatically generate the jwt secret key and store it in the user db, so the first time you will likely have to sign in again because the key you made manually won't be valid.
So I renamed my appsettings.json to something else and downloaded your alpha2 but it crashes on startup. Did I understand correctly that appsettings.json should be no longer required?

JSON:
{"log":"Unhandled exception. System.AggregateException: One or more errors occurred. (SQLite Error 1: 'no such table: JwtKeys'.)\n","stream":"stderr","time":"2021-01-21T19:39:47.646437055Z"}
{"log":" ---\u003e Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 1: 'no such table: JwtKeys'.\n","stream":"stderr","time":"2021-01-21T19:39:47.646465799Z"}
{"log":"   at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db)\n","stream":"stderr","time":"2021-01-21T19:39:47.646468995Z"}
{"log":"   at Microsoft.Data.Sqlite.SqliteCommand.PrepareAndEnumerateStatements(Stopwatch timer)+MoveNext()\n","stream":"stderr","time":"2021-01-21T19:39:47.646471509Z"}
{"log":"   at Microsoft.Data.Sqlite.SqliteCommand.GetStatements(Stopwatch timer)+MoveNext()\n","stream":"stderr","time":"2021-01-21T19:39:47.646473643Z"}
{"log":"   at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()\n","stream":"stderr","time":"2021-01-21T19:39:47.646475547Z"}
{"log":"   at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)\n","stream":"stderr","time":"2021-01-21T19:39:47.64647729Z"}
{"log":"   at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken)\n","stream":"stderr","time":"2021-01-21T19:39:47.646479094Z"}
{"log":"   at Microsoft.Data.Sqlite.SqliteCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken)\n","stream":"stderr","time":"2021-01-21T19:39:47.646480947Z"}
{"log":"   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)\n","stream":"stderr","time":"2021-01-21T19:39:47.646482791Z"}
{"log":"   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)\n","stream":"stderr","time":"2021-01-21T19:39:47.646484674Z"}
{"log":"   at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.AsyncEnumerator.InitializeReaderAsync(DbContext _, Boolean result, CancellationToken cancellationToken)\n","stream":"stderr","time":"2021-01-21T19:39:47.646486578Z"}
{"log":"   at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.AsyncEnumerator.MoveNextAsync()\n","stream":"stderr","time":"2021-01-21T19:39:47.646489052Z"}
{"log":"   at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleOrDefaultAsync[TSource](IAsyncEnumerable`1 asyncEnumerable, CancellationToken cancellationToken)\n","stream":"stderr","time":"2021-01-21T19:39:47.646490836Z"}
{"log":"   at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleOrDefaultAsync[TSource](IAsyncEnumerable`1 asyncEnumerable, CancellationToken cancellationToken)\n","stream":"stderr","time":"2021-01-21T19:39:47.646492749Z"}
{"log":"   at OpenAlprWebhookProcessor.Users.UserService.GetJwtSecretKeyAsync() in /src/Users/UserService.cs:line 249\n","stream":"stderr","time":"2021-01-21T19:39:47.646494643Z"}
{"log":"   --- End of inner exception stack trace ---\n","stream":"stderr","time":"2021-01-21T19:39:47.646496386Z"}
{"log":"   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)\n","stream":"stderr","time":"2021-01-21T19:39:47.64649859Z"}
{"log":"   at System.Threading.Tasks.Task`1.get_Result()\n","stream":"stderr","time":"2021-01-21T19:39:47.646500354Z"}
{"log":"   at OpenAlprWebhookProcessor.Startup.ConfigureServices(IServiceCollection services) in /src/Startup.cs:line 57\n","stream":"stderr","time":"2021-01-21T19:39:47.646502017Z"}
{"log":"   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)\n","stream":"stderr","time":"2021-01-21T19:39:47.64650378Z"}
{"log":"   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)\n","stream":"stderr","time":"2021-01-21T19:39:47.646505613Z"}
{"log":"   at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.InvokeCore(Object instance, IServiceCollection services)\n","stream":"stderr","time":"2021-01-21T19:39:47.646510523Z"}
{"log":"   at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.\u003c\u003ec__DisplayClass9_0.\u003cInvoke\u003eg__Startup|0(IServiceCollection serviceCollection)\n","stream":"stderr","time":"2021-01-21T19:39:47.646512486Z"}
{"log":"   at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.Invoke(Object instance, IServiceCollection services)\n","stream":"stderr","time":"2021-01-21T19:39:47.646514741Z"}
{"log":"   at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.\u003c\u003ec__DisplayClass8_0.\u003cBuild\u003eb__0(IServiceCollection services)\n","stream":"stderr","time":"2021-01-21T19:39:47.646516544Z"}
{"log":"   at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.UseStartup(Type startupType, HostBuilderContext context, IServiceCollection services, Object instance)\n","stream":"stderr","time":"2021-01-21T19:39:47.646518628Z"}
{"log":"   at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.\u003c\u003ec__DisplayClass13_0.\u003cUseStartup\u003eb__0(HostBuilderContext context, IServiceCollection services)\n","stream":"stderr","time":"2021-01-21T19:39:47.646520501Z"}
{"log":"   at Microsoft.Extensions.Hosting.HostBuilder.CreateServiceProvider()\n","stream":"stderr","time":"2021-01-21T19:39:47.646522505Z"}
{"log":"   at Microsoft.Extensions.Hosting.HostBuilder.Build()\n","stream":"stderr","time":"2021-01-21T19:39:47.646524188Z"}
{"log":"   at OpenAlprWebhookProcessor.Program.Main(String[] args) in /src/Program.cs:line 20\n","stream":"stderr","time":"2021-01-21T19:39:47.646565315Z"}
 
Top