BI stopped calling AI - no errors, just stopped?

Post Reply
Ferguson
Posts: 71
Joined: Sat Feb 22, 2020 1:32 am

BI stopped calling AI - no errors, just stopped?

Post by Ferguson »

Running BI 5.9.4.11 x 64 with Code Project 2.6.5. This was all working fine together, I got 4 new cameras and decided to clean up and make the config consistent and somehow, somewhere in doing so I broke something.

Here's the problem -- everything appears to be working, no errors appear anywhere I can find, but BI has stopped confirming alerts with AI. It doesn't show anything in BI to indicate it tried, and watching the status in code project shows no activity.

BI's log shows:

Code: Select all

0 	8/9/2024 10:04:35.566 PM	Log                 	Retaining 13 files (77.9MB)
0 	8/9/2024 10:04:35.574 PM	Server              	Started on port 81
0 	8/9/2024 10:04:35.706 PM	AI                  	responding at 127.0.0.1:32168
so it thinks it can talk to it, so it appears related to not wanting to confirm. There is nothing in the log concerning AI other than that, and CP's log shows no calls. I've tried tweaking settings in the alert section, restarted CP, restarted BI, rebooted. I feel like I've unchecked some option and just plain forgot. But I can't find it.

Does anyone have any idea what I could have broken?

Again -- this was all working. I made no changes to CP, but did a lot of cleanup of configs in BI so most tabs are sync'd from one master camera. So I probably changed something. The screen shots are from that master camera and that master camera is the one I am using for testing.

I did set up alerts going to MQTT to get this working with Home Assistant but that should not occur until after confirmation. And it's not showing any errors either.

Here's a typical log of one event:

Code: Select all

0 	8/9/2024 10:30:15.311 PM	camBackDriveway     	ONVIF Event: IsMotion="true"
0 	8/9/2024 10:30:15.311 PM	camBackDriveway     	ONVIF Event: MotionAlarm (State="true")
0 	8/9/2024 10:30:15.312 PM	camBackDriveway     	ONVIF Event: RuleEngine/CellMotionDetector/Motion
0 	8/9/2024 10:30:15.313 PM	camBackDriveway     	ONVIF Event: MotionAlarm (State="true")
3 	8/9/2024 10:30:15.500 PM	camBackDriveway     	Triggered: ONVIF (IsMotion="true")
3 	8/9/2024 10:30:16.108 PM	camBackDriveway     	Alerted
0 	8/9/2024 10:30:16.113 PM	camBackDriveway     	MQTT: Publish OK to BlueIris/camBackDriveway/Status
0 	8/9/2024 10:30:20.100 PM	camBackDriveway     	ONVIF Event: RuleEngine/CellMotionDetector/Motion
I am using ONVIF events to detect motion. I've tried taking the motion zones on the alert page off and on (since there's a link to zones and where CP looks for objects) without impact.

Anything?
AI.jpg
AI.jpg (82.37 KiB) Viewed 259 times
Alert.jpg
Alert.jpg (67.77 KiB) Viewed 259 times
Alert_AI.jpg
Alert_AI.jpg (85.8 KiB) Viewed 259 times
User avatar
TimG
Posts: 2391
Joined: Tue Jun 18, 2019 10:45 am
Location: Nottinghamshire, UK.

Re: BI stopped calling AI - no errors, just stopped?

Post by TimG »

Weird !
OK, lets have a look. What we do know is that it was working until you adjusted everything, so it must be a setting !

1. BI5 general settings/ AI - Untick "Auto start/stop with Blue Iris". That was required early on with DeepStack, but will cause havoc with CPAI now as it runs as a self controlled service.
2. Are you even getting "Cancelled Alerts" ? Anything to show if CPAI is doing something ?
3. Do you have multiple Profiles ? Could it turn CPAI OFF in one ?
4. There is a note on the forum from the Deepstack era that you could prevent AI working by disabling Object detection in BI5. Since you are using ONVIF motion detection, I suspect you have a new variation of this issue here. I can see that you have Motion Zones A-H ghosted out. What does it do if you enable A-G ? It shouldn't have any negative effect if you don't have zones set up.
5. I note that you have DAT files enabled. Are you aware that they are only meant for setting up, and that they will fill your BI5 Alerts folder and block things without warning ? Turn them off, and delete the DAT files.

Let us know if that changes anything 8-)
Forum Moderator.
Problem ? Ask and we will try to assist, but please check the Help file.
Ferguson
Posts: 71
Joined: Sat Feb 22, 2020 1:32 am

Re: BI stopped calling AI - no errors, just stopped?

Post by Ferguson »

TimG wrote: Sat Aug 10, 2024 9:57 am Weird !
OK, lets have a look. What we do know is that it was working until you adjusted everything, so it must be a setting !
Oh, I think it's absolutely something I changed, I am just completely stuck on what. My GUESS is that it's two or more things, which has kept my attempts and un-changing or re-changing things from working.
TimG wrote: Sat Aug 10, 2024 9:57 am 1. BI5 general settings/ AI - Untick "Auto start/stop with Blue Iris". That was required early on with DeepStack, but will cause havoc with CPAI now as it runs as a self controlled service.
I sort of remembered that, but this was one of the random things to get it back. Done, restarted both services, no change.
TimG wrote: Sat Aug 10, 2024 9:57 am 2. Are you even getting "Cancelled Alerts" ? Anything to show if CPAI is doing something ?
No, there's no indication anywhere that CPAI is getting called, at all, and lots of indications it is not (the CPAI status and logs tabs do not change).
TimG wrote: Sat Aug 10, 2024 9:57 am 4. There is a note on the forum from the Deepstack era that you could prevent AI working by disabling Object detection in BI5. Since you are using ONVIF motion detection, I suspect you have a new variation of this issue here. I can see that you have Motion Zones A-H ghosted out. What does it do if you enable A-G ? It shouldn't have any negative effect if you don't have zones set up.
That was another random thing I tried; I just un-did that, no impact.
TimG wrote: Sat Aug 10, 2024 9:57 am 5. I note that you have DAT files enabled. Are you aware that they are only meant for setting up, and that they will fill your BI5 Alerts folder and block things without warning ? Turn them off, and delete the DAT files.
I was not, I did not realize it was a problem, in fact at the prior house I think they were on for years. I had 15g of files there and 17988 dat files. I deleted them. Thank you. I'd like to leave it on though for now as I finish setting up. I had plenty of space so doubt that was the issue.
TimG wrote: Sat Aug 10, 2024 9:57 am Let us know if that changes anything 8-)
No change, though I woke up realizing there was another significant thing I changed -- I was tired of the low rez fuzzy multi-camera display, and could not find a way to change it, so I removed (set to none) the video setup second channel. That uses the main stream for display.

But I just put it back for the primary (i.e. source of sync'd cameras) and that had no impact putting it back.

This begs a question the answer to which would help -- if I have cameras B sync'ing to camera A, and change something on camera A for example on the alerts page, how long does it take or what steps are needed to make camera B reflect the change?

Also, related, I think there is a "feature" concerning that. If I am syncing B to A, and in A I add to the alert tab, on-alert and on-reset some MQTT settings, then un-check sync on B and look in B's settings, they are not there.

I did try one thing that had some progress -- I recalled an old issue I had where CPAI was being called too often, I had in the alert tab, AI setup the static object analysis check box checked. I checked that (it was not checked) and started getting some calls to cpai on object detection. It did not fix the problem, but it shows BI is able to call CPAI when it wants to.

But I have a clue.... notice on my AI page the "Use GPU" is not checked, but is available. At this moment Use GPU is not available, I can't check it. Stop/start CPAI no change. One cleanup thing I was doing is making changes to get rid of some HW encode errors. I don't know what I did to disable this. The general Cameras tab is set for HW Accelerated decode of Nvidia NVDEC (I have a GTX 970). But in my changing things, something has disabled the check box for Use GPU, and experimenting with other settings I can't find what.

This GPU stuff came from chasing the error "HW encode setup failed: 483 for 'recording 0' check hardware compatibility. I turned off under the specific camera, record, file/format, recording 0 configure, HVA. It was set to Nvidia. I changed to none. I just put it back, the error returned, but the "use GPU" is not enabled again (since it's global I would be surprised if that did it).

So the root problem may or may not be related to some GPU setting. Though I would have thought that a bad setting would give an error related to CPAI, not just not call it.

So... still stuck. After breakfast I may just delete a camera and start over without sync'ing settings, see if I can get it working then. Other ideas welcomed.
Ferguson
Posts: 71
Joined: Sat Feb 22, 2020 1:32 am

Re: BI stopped calling AI - no errors, just stopped?

Post by Ferguson »

I found it. Mea Culpa (but you knew that).

In BI "motion detection" refers only to it's own (except in one place for zones).
AI_Problem.jpg
AI_Problem.jpg (150.53 KiB) Viewed 186 times
I still don't know why I could check use GPU before and now cannot. But I'm getting confirmations/cancellations again.
User avatar
TimG
Posts: 2391
Joined: Tue Jun 18, 2019 10:45 am
Location: Nottinghamshire, UK.

Re: BI stopped calling AI - no errors, just stopped?

Post by TimG »

Well done. My gut feeling was right, but I missed that in your settings, as it IS ticked in mine. It does make it clear how to use ONVIF triggers with CPAI though, which I will look into with my (Mainly Dahua) system.
Forum Moderator.
Problem ? Ask and we will try to assist, but please check the Help file.
Ferguson
Posts: 71
Joined: Sat Feb 22, 2020 1:32 am

Re: BI stopped calling AI - no errors, just stopped?

Post by Ferguson »

TimG wrote: Sat Aug 10, 2024 3:54 pm Well done. My gut feeling was right, but I missed that in your settings, as it IS ticked in mine. It does make it clear how to use ONVIF triggers with CPAI though, which I will look into with my (Mainly Dahua) system.
Yeah. A prior "gotcha" I found is that with ONVIF events only, if your camera has specific areas defined, you have to define them in the BI Motion detection areas section even though BI motion detection is turned off. Which... I get, as that's the only place to define it now there being no AI area definition, but it is sure confusing to have an option take effect when it is turned off.

Now I need to see if N can let the camera detect people and vehicles as opposed to just motion.
Post Reply