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

Beta Test! Version 1.4.1 has been uploaded to GitHub. It is not a new release. Therefore, you'd need to download the files and run the setup. Not too different, but...

This version adds:
Enhanced MQTT support. You can define your own topics and payloads. You can also transmit picture data in Base64 format.
A stop event is added when motion stops. The timeout for a "stop" is defined in the Camera. Using it for an area requires changing the area notifications. Support is there for both an URL notification and MQTT.
The ability to define a custom time frame when cleaning up old picture files.
Email notifications now included the object type causing the motion for each area.
There is better error handling. At least errors are displayed differently!
Bears are now separated out from "animals" as an object to select for notifications. We have bears that are somewhat of a nuisance. I want to be able to turn on lights when they are noticed. Also, DeepStack does provide support for bears. Now, I just wish they supported dear/elk.

However, in changing to this version you old camera and area files are no longer compatible. You will need to regenerate them!

I have tested this version for only a few hours. I want to get it out there, and get some feedback before making it a "Release". In particular, I'd like feedback on the MQTT enhancements.
 
  • Like
Reactions: silencery
perfect timing. I think i'm 85% finished with setting up my first camera. Got the red boxes and all for identification... but can not record main stream. Had to not use the auto-fill for camera trigger (as sent trigger to the substream camea) but instead manually edit to send trigger to mainstream camera. Thought it would be 100%, but nope, no alert image. Still tinkering. Did notice tons of SQL errors in the log. Will investigate. Once complete, will tackle MQTT.
 
That is odd because it should resolve to the same thing. Possibly it is a difference between Windows Professional and Windows Home? I use Pro. I'll do a Google search later.
Here is something I found. Apparently there are a LOT of hits on Google. I'll look a little further. Maybe I'll internally change "localhost" to "127.0.0.1" wherever I see it.

There most likely are two possibilities, either the network adapter driver or the hosts file has some problem.
To fix the hosts file issue:

  1. Go to %systemroot%\System32\drivers\etc
  2. Backup the hosts file
  3. Then open notepad with administrator rights.
  4. Navigate to the same folder and open the hosts file
  5. Make sure the first line after the # lines (comments) is 127.0.0.1 localhost and the second is ::1 localhost
  6. Then open cmd and run the command ipconfig /flushdns
  7. Restart the browser or whatever program you are using.
 
  • Like
Reactions: fenderman
perfect timing. I think i'm 85% finished with setting up my first camera. Got the red boxes and all for identification... but can not record main stream. Had to not use the auto-fill for camera trigger (as sent trigger to the substream camea) but instead manually edit to send trigger to mainstream camera. Thought it would be 100%, but nope, no alert image. Still tinkering. Did notice tons of SQL errors in the log. Will investigate. Once complete, will tackle MQTT.
SQL is used for tracking pictures with motion. The installer should install the appropriate SQL version and should copy the appropriate database files to a location under Users\YouUserName\AppData\Roaming\OnGuardDatabase. Please check to see if that file is there. Also, try turning off anti-virus temporarily both during the install process and when doing a test. Please let me know if the database files are not there. It would help too if you would go into your log file and copy out just one instance of the SQL error message.
 
SQL is used for tracking pictures with motion. The installer should install the appropriate SQL version and should copy the appropriate database files to a location under Users\YouUserName\AppData\Roaming\OnGuardDatabase. Please check to see if that file is there. Also, try turning off anti-virus temporarily both during the install process and when doing a test. Please let me know if the database files are not there. It would help too if you would go into your log file and copy out just one instance of the SQL error message.
Rebooted machine..100% working.
 
I guess it is wise to reboot machine after installing Deepstack and OnGuard. That cleared up the SQL errors for me.
 
  • Like
Reactions: fenderman
Here is something I found. Apparently there are a LOT of hits on Google. I'll look a little further. Maybe I'll internally change "localhost" to "127.0.0.1" wherever I see it.

There most likely are two possibilities, either the network adapter driver or the hosts file has some problem.
To fix the hosts file issue:

  1. Go to %systemroot%\System32\drivers\etc
  2. Backup the hosts file
  3. Then open notepad with administrator rights.
  4. Navigate to the same folder and open the hosts file
  5. Make sure the first line after the # lines (comments) is 127.0.0.1 localhost and the second is ::1 localhost
  6. Then open cmd and run the command ipconfig /flushdns
  7. Restart the browser or whatever program you are using.
ALSO SEE THESE BELOW -- I HAVEN'T TRIED ANY BECAUSE I DON'T NEED TO. PLEASE LET ME KNOW IF ANY ONE OF THESE THREE PROCEDURES WORK. OTHERWISE I'LL NEED TO CHANGE THE CODE. I SUSPECT SOLUTION #2 IS EASIEST, BUT.........

Another Solution

Open cmd window using "Run as Administrator" (right click on cmd should bring up that option.
netsh winsock reset - and press Enter.
netsh int ip reset - and press Enter.
ipconfig / release - and press Enter.
ipconfig / renew - and press Enter.
ipconfig / flushdns - and press Enter

Yet Another Solution

Press Windows key + R
Type: optionalfeatures.exe
Scroll down to SMB 1.0/CIFS File Sharing Support
Tick the SMB 1.0/CIFS Client
Untick SMB 1.0/CIFS Automatic Removal and
Untick SMB 1.0/CIFS Server
Click OK
 
I know option #2 did not work as I rebooted machine.
Trying #3 now.
 
no go for #3. trying both localhost and 127.0.0.1
only works with the IP of same machine that is running Blue Iris, OnGuard, & Deepstack.

Will try #1. Other folks have not mentioned this issue. Only me & Au. I bet is LAN internal LAN issue.
 
no go on #1. I suspect is because I'm on static IP on a somewhat secured subnet with various firewall rules activated. I'll just use the IP :)
 
no go for #3. trying both localhost and 127.0.0.1
only works with the IP of same machine that is running Blue Iris, OnGuard, & Deepstack.

Will try #1. Other folks have not mentioned this issue. Only me & Au. I bet is LAN internal LAN issue.
If you try # (and reboot) I would bet it would work. If not, behind the scenes I could translate the "localhost" address to 127.0.0.1. You can try using that in all setting in place of localhost and see if that works. Some people have reported that using 127.0.0.1 doesn't work either. I could try finding the IP address of your local PC and using that (say 192.168.0.2 instead of 127.0.0.1 or localhost). However, I hesitate to do that because there are sometimes problems finding the correct address. About 99% of the time you can find the correct local address, but sometimes people have weird network settings and what you come up with in a program just isn't the correct one.
 
no go on #1. I suspect is because I'm on static IP on a somewhat secured subnet with various firewall rules activated. I'll just use the IP :)
OK, well at this point I think the best solution is for me to add some notes to the documentation. I know that not everyone reads it, but then I can at least blame them!
 
before i tinker with MQTT, gotta figure out why my camera didn't even detect motion detection on amazon guy who just showed up but did detect me during walk test. more researching!
 

Attachments

  • A1_Front.20201224_141442297.5.jpg
    A1_Front.20201224_141442297.5.jpg
    136.5 KB · Views: 11
I updated the OnGuard-ReadMe.docx file on GitHub. It documents what to do if "localhost" does not work. It also gives the DeepStack Beta link and discusses using the GPU version. So, if you need to find DeepStack, just open the documentation and go toward the bottom. I'll try to keep that link updated if/when it changes.
 
before i tinker with MQTT, gotta figure out why my camera didn't even detect motion detection on amazon guy who just showed up but did detect me during walk test. more researching!
Make sure you press Refresh. The most recent pictures taken by BI should then show up. If you see a picture with the Amazon guy click the "Analyze" button to see why it might not have considered this "significant" motion. If the picture isn't there at all then you know BI somehow didn't see the motion.
 
I was right in the middle of re-doing area of interest, so deleted the old one. Since no new area of interest was created, that means no trigger :)
However, my last test.... this is that SQL error that keeps popping up:
2020.12.24 16:41:07:7875 - MainWindow - InsertMotionIfNecessary - Sql Exception on opening database connection: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 56 - Unable to load the SQLUserInstance.dll from the location specified in the registry. Verify that the Local Database Runtime feature of SQL Server Express is properly installed.)
 
I was right in the middle of re-doing area of interest, so deleted the old one. Since no new area of interest was created, that means no trigger :)
However, my last test.... this is that SQL error that keeps popping up:
2020.12.24 16:41:07:7875 - MainWindow - InsertMotionIfNecessary - Sql Exception on opening database connection: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 56 - Unable to load the SQLUserInstance.dll from the location specified in the registry. Verify that the Local Database Runtime feature of SQL Server Express is properly installed.)
Please go to the database location (somewhere in the previous 20 posts). Verify that the directory is there and that there are (2 I think) files in there too. If they are there, please turn off anti-virus and try again. My anti-virus didn't choke on it, but yours might. I knew that adding the SQL stuff might cause problems, but I think that it is worth the problems. Right now it is used for tracking motion files, but more utility may be added in the future. Let me know. I'll be on this forum most of the time, but not always always.
 
the 2 files are there. turned off anti-virus & windows firewall. error still presents itself. However, the program runs aok at first glance. It draws red rectangles, it does identify objects, it responds to alerts. 12/17 (initial install) to 12/24 no error message. Only starts 12/24 11am morning. Wish I could pinpoint when the log entries start/begin but seems to be all over the place. I will investigate for a little bit. Wonder if this relates to unable to use "localhost". I can use 127.0.01 or the direct IP but not localhost. It's not OnGuard issue because even from CMD prompt, can not ping local host (keeps coming back with IPv6 results unless I enter the -4 option and then it does come back with sucessful 127.0.0.1 results).
 
I believe that the app should run OK without the database. Just don't turn on/press the Motion Only button.
Your SQL issues are something I'll look into.