Yet Another Free Extension for Blue Iris Adding AI Object Dectection/Reduction in False Alarms/Enhanced Notification of Activity/On Guard

tripp396

Getting the hang of it
Joined
Jun 18, 2020
Messages
65
Reaction score
30
Location
Minnesota
I have to admit that I didn't test the image completely. I'll take a look soon.
Sorry if I put you down a rabit hole. Seem to have the image decoding properly now.
 

Ken98045

IPCT Contributor
Joined
Aug 3, 2020
Messages
216
Reaction score
69
Location
Seattle
I could also be doing something very wrong. I am trying to ingest into home assistant for alerts which isnt working at all. But if I pull the payload out of MQTT explorer and try to decode with a tool its only 5% of the image.

Overall glad to see progress on this. It does basically everything I need it to do, just need to figure out the best way to get push notifications working.
I'm almost certain that the entire image is sent to the MQTT server. However, the way http works is that the data is sent as a continuous stream of data that is broken into packets. The receiver receives one "packet" at a time. For something as large as a picture there will be quite a number of individual packets. Its is possible that your MQTT server is only picking up the first packet or 3, and ignores the rest. I'll make sure that the sending process is sending everything it should later today.
 

Kameraad

Getting the hang of it
Joined
Oct 23, 2016
Messages
119
Reaction score
80
@tripp396 the way i do it is just use mqtt for the trigger, and i added my cameras to the home assistant config. I just let home assistant sent me a snapshot on telegram when it receives a mqtt trigger.
 

tripp396

Getting the hang of it
Joined
Jun 18, 2020
Messages
65
Reaction score
30
Location
Minnesota
@tripp396 the way i do it is just use mqtt for the trigger, and i added my cameras to the home assistant config. I just let home assistant sent me a snapshot on telegram when it receives a mqtt trigger.
So do you basically just rely on what is seen by home assistant at the time of the trigger and send over what’s in the camera entity? I thought about that. I haven’t had the cameras piping anything to home assistant in a while since I had issues in the past but maybe I’ll give it a try. How are you sending to telegram? I’ve tried a telegram node for node red but wasn’t able to pass the image data through
 

Kameraad

Getting the hang of it
Joined
Oct 23, 2016
Messages
119
Reaction score
80
Not trying to take over the thread, so i'll just dump a bunch of info in one post and you should be able to get pretty far.

From my configuration.yaml:

For the cameras, i have dahua:
Code:
camera:
  - platform: ffmpeg
    input: "rtsp:/admin:pa$$w0rd@192.168.1.10:554/live"
    name: frontdoor
  - platform: ffmpeg
    input: "rtsp:/admin:pa$$w0rd@192.168.1.11:554/live"
    name: backdoor
For telegram:
Code:
telegram_bot:
  - platform: polling
    api_key: 1d987def8ab1bab1bab1bab1ba1b1987987ddd9j0fM
    allowed_chat_ids:
      - -356565664
      - -336565363

notify:
  - name: telegram_family
    platform: telegram
    chat_id: -356565664
  - name: telegram_me
    platform: telegram
    chat_id: -336565363
You have to create a "telegram bot" , more info here: Telegram and here: Bots: An introduction for developers
I created 2 entry's under notify, names explain themselves. One group for the family, and one for me which i can use for testing or other stuff i only care about. You'll see that in the automation.



From my automations.yaml:

Code:
  - alias: frontdoor camera motion
    trigger:
      platform: mqtt
      topic: BlueIris/frontdoor/motion
      payload: "on"
      encoding: "utf-8
    action:
      - data:
          entity_id: camera.frontdoor
          filename: '/tmp/frontdoor.jpg'
        service: camera.snapshot
      - data:
           message: "Frontdoor motion!"
           data:
             photo:
               - file: /tmp/frontdoor.jpg
                 caption: "Frontdoor motion!"
        service: notify.telegram_family
So i configured BI to publish 'on' in that topic on trigger, and off trigger publish 'off' in the same topic.

Mostly I use a variant of this automation, which has a different trigger: a door sensor or a pir. For me this is working fine now for quite some time.
 

tripp396

Getting the hang of it
Joined
Jun 18, 2020
Messages
65
Reaction score
30
Location
Minnesota
I basically found out how to do just that and started working through it. Seems to be working! Thanks for the help!

Ken, sorry to take over the thread a bit there, but I do love this software! Seems to work great now that I got my notifications up and running! Bravo
 

Vettester

Pulling my weight
Joined
Feb 5, 2017
Messages
255
Reaction score
131
Hi Ken,

I installed the latest beta and noticed the reference point on some of my cameras seems to disappear over time. When I put is back to to where it was it repositions the entire AOI. I'm currently running this with 12 cameras and have seen this on 8 of the 12 cameras. Is this a bug or should I just ignore it?

Thanks,

-Vettester
 

wittaj

Known around here
Joined
Apr 28, 2019
Messages
3,935
Reaction score
4,744
Location
USA
Since I know nothing about how this works, I am wondering if you know how you could take the AI that says it is a dog or bear or whatever category and append it to the BI alert clip, similar to how Blue Iris is able to take the plate from Plate Recognizer and put it onto the alert clip that then puts the plate into the Blue Iris Log? Sentry can do the same thing but was limited to just saying Sentry Flag or something like that.

1611245321096.png


And if so, how easy would it be to pull that into Blue Iris? I am thinking I would rather have the info reside in BI and allow me to do a clear of the photos being sent to AI for flagging purposes.
 
Last edited:

Ken98045

IPCT Contributor
Joined
Aug 3, 2020
Messages
216
Reaction score
69
Location
Seattle
I have released version 1.6.1 as a "Pre Release". This version adds support for multiple DeepStack AI servers.
It is here: Release On Guard Security Assistant Version 1.6.1 · Ken98045/On-Guard.

I'd like to get multiple people to try it before the "Pre-Release" tag comes off!

I've tried it with up to 10 DeepStack servers. On a PC with an NVidia GPU it definitely does help a lot to have multiple servers. However, I do think that using multiple severs is a stop-gap measure until DeepStack improves/implements the processing of multiple pictures simultaneously. That should not be a terribly difficult thing to do. Even if DeepStack is improved you might possibly want multiple servers if you have multiple PCs available.
 

Ken98045

IPCT Contributor
Joined
Aug 3, 2020
Messages
216
Reaction score
69
Location
Seattle
Since I know nothing about how this works, I am wondering if you know how you could take the AI that says it is a dog or bear or whatever category and append it to the BI alert clip, similar to how Blue Iris is able to take the plate from Plate Recognizer and put it onto the alert clip that then puts the plate into the Blue Iris Log? Sentry can do the same thing but was limited to just saying Sentry Flag or something like that.

1611245321096.png


And if so, how easy would it be to pull that into Blue Iris? I am thinking I would rather have the info reside in BI and allow me to do a clear of the photos being sent to AI for flagging purposes.
The only thing (that I know of) that Blue Iris supports is the "memo" field. Right now I just put the area in that field. I can add the object type as well. That should be relatively easy if there is just one object. However, in a complicated picture there may be several. I can add them. The question becomes can you see them all? That would be up to BI. I could also outline the area in the picture and tag the outline with the object type if that would be helpful.

I have not looked at other applications that do what you are saying because I have enough trouble keeping up with mine!
 

Ken98045

IPCT Contributor
Joined
Aug 3, 2020
Messages
216
Reaction score
69
Location
Seattle
Hi Ken,

I installed the latest beta and noticed the reference point on some of my cameras seems to disappear over time. When I put is back to to where it was it repositions the entire AOI. I'm currently running this with 12 cameras and have seen this on 8 of the 12 cameras. Is this a bug or should I just ignore it?

Thanks,

-Vettester
I have seen it disappear in the past, and I thoughI fixed them. However, along with the reference point I also save the picture resolution along with which it was set. This is because you may change picture resolution over time as you change your camera settings. The point was to prevent you from having it move on you. There may well be a problem with the logic of all that. I will make fixing it a very high priority.
 

Ken98045

IPCT Contributor
Joined
Aug 3, 2020
Messages
216
Reaction score
69
Location
Seattle
I have seen it disappear in the past, and I thoughI fixed them. However, along with the reference point I also save the picture resolution along with which it was set. This is because you may change picture resolution over time as you change your camera settings. The point was to prevent you from having it move on you. There may well be a problem with the logic of all that. I will make fixing it a very high priority.
Actually, if you are comfortable with the Windows Registry you could help me track down the issue. Look at: Computer\HKEY_CURRENT_USER\Software\K2Software\OnGuard\Cameras\
Under each camera you should see the the registration mark X and Y positions along with the resolution under which the registration was set. Please let me know what those values are if it has moved!
 

Vettester

Pulling my weight
Joined
Feb 5, 2017
Messages
255
Reaction score
131
Please let me know what those values are if it has moved!
I'll look into this later. I just installed 1.6.1 and the version is still reporting as 1.5.2. I know its version 1.6.1 because it let me add more instances of DeepStack.
 

wittaj

Known around here
Joined
Apr 28, 2019
Messages
3,935
Reaction score
4,744
Location
USA
The only thing (that I know of) that Blue Iris supports is the "memo" field. Right now I just put the area in that field. I can add the object type as well. That should be relatively easy if there is just one object. However, in a complicated picture there may be several. I can add them. The question becomes can you see them all? That would be up to BI. I could also outline the area in the picture and tag the outline with the object type if that would be helpful.

I have not looked at other applications that do what you are saying because I have enough trouble keeping up with mine!
Oh wow - so from that memo field, does the text that you put into that field then show up in the BI log next to the alert? Like right now, Plate Recognizer looks like this in the BI Alert file:

3 1/1/2021 12:03:20 AM Upstreet MOTION
3 1/1/2021 12:03:21 AM LPR1clone MOTION
0 1/1/2021 12:03:22 AM LPR1clone Plate: AXC7848 [91.4%]
3 1/1/2021 12:03:22 AM Street MOTION
 

wittaj

Known around here
Joined
Apr 28, 2019
Messages
3,935
Reaction score
4,744
Location
USA
I wish it was that simple LOL - how would one go about that?

In addition to what I asked about with this AI tool, I am also trying to see if that is possible from OpenALPR since it pulls from a video stream. I would then like to add the plate number into the Blue Iris memo field on the clip so that it then gets logged into the BI file. The issue I have with Plate Recognizer is it is based on reading a plate from a snapshot generated from Blue Iris and there are times of the day that a long shadow of the vehicle triggers the picture too early or a vehicle is larger and the picture sent for processing doesn't show the plate. The ability to use the videostream of OpenALPR and add that plate info onto the alert clip would ensure that the plate is read.
 

Vettester

Pulling my weight
Joined
Feb 5, 2017
Messages
255
Reaction score
131
Here's one that moved again since it was reset earlier today.

View attachment 80201
Here's another one that moved.

Screen Shot 2021-01-21 at 8.52.17 PM.png

I also noticed that when the registration point moves the AOI shifts as well. This occurs even though the GUI doesn't reflect the AOI shift. When this occurs motion does not get triggered in the affected area.
 

Vettester

Pulling my weight
Joined
Feb 5, 2017
Messages
255
Reaction score
131
I wish it was that simple LOL - how would one go about that?
Whatever you put in there is static so it's not very useful. Multiple requests have been made to have this changed.

 

Ken98045

IPCT Contributor
Joined
Aug 3, 2020
Messages
216
Reaction score
69
Location
Seattle
Whatever you put in there is static so it's not very useful. Multiple requests have been made to have this changed.

This was fixed a couple of releases ago. However, those releases with the fixes were marked as "Pre-Release".
Please use the one from here: Release On Guard Security Assistant Version 1.6.1.2 · Ken98045/On-Guard

I was waiting to have at least a few people try these "pre-releases" before tagging them as "releases". In the last couple of minutes I just marked the latest (1.6.1.2) as a "release" since it is at least better than the version you are apparently running. I did just triple check the bug you are referring to to make sure it is gone.

Note that the "current" version is 1.6.1, and should say so in help/about window.
Also, note that the 1.6.1 version contains support for connecting to multiple DeepStack servers.

FYI: Also, because the way in which the area is defined -- The search criteria is now an open ended list supporting all DeepStack object types -- the 1.6.1 version does require that you re-define your areas. Your camera settings should still be compatible with 1.5.1+, but not the areas. This is hopefully the last time there will be a major change in which areas are defined, so in the future it should be possible to upgrade without destroying your areas.
 
Last edited:
Top