Strange issue recently - Dahua cameras rebooted via BI are in a loop...

pyspilf

Getting the hang of it
May 22, 2017
95
68
Madrid, Spain
On occasion, the odd camera will go into No Signal, and I have always first tried to reset the camera or reboot it via BI. If that doesn't work, then I go to the camera GUI or power cycle it, etc.

I have recently observed something new, and a bit odd... it seems to be happening for Dahua cameras only...

When a camera is rebooted from BI, it reboots, and then starts looping into periodic reboots, like every minute or so. The only way I have found to break the cycle is to restart BI.

All cameras are on their latest firmwares and working fine. And BI is on the latest version too.

I didn't at first, but after it started happening with another Dahua camera, I looked at the camera log and found all these repeated entries - they happen every minute or so. Once I restart BI the camera is happy again...

90 2025-04-17 08:49:09 System Save Config
91 2025-04-17 08:49:06 System Certificate Management
92 2025-04-17 08:49:06 System Certificate Management
93 2025-04-17 08:49:05 System Certificate Management
94 2025-04-17 08:49:05 System Certificate Management
95 2025-04-17 08:49:04 System Certificate Management
96 2025-04-17 08:49:04 System Certificate Management
97 2025-04-17 08:48:59 System Start up
98 2025-04-17 08:48:09 System Reboot
99 2025-04-17 08:48:05 admin Login

This happens if I reboot the camera manually via BI or if the watchdog does it.

Incidentally, I recently enabled the watchdog feature on BI and also configured it to send MQTT messages on signal loss and restore so I have a clearer view of what is going on. I have it configured like this:

1744874249329.png

If no one has seen this issue or dealt with it, then I will write to Ken and post back any findings here.

Cheers
 
What are your "On Loss" and "On Restore" settings?

Does a rollback to the previous version fix it?
 
  • Like
Reactions: looney2ns
Hi Tony,

For both signal loss and restore, the only thing I configured is for BI to send a MQTT message with a simple JSON payload, that I consume in my HomeSeer system and then send to InfluxDB, as I am building a Grafana dashboard with a state timeline for each camera. The purpose is to observe system stability long-term, but I digress...

The same loop behavior happens if I manually do 'PTZ/Control' -> 'Reboot Device'

I stumbled upon it quite by chance. I configured the watchdog to send MQTT and I wanted to test it, so I used 'PTZ/Control' -> 'Reboot Device' to cause a signal loss and see if I received the message, and that's when I started seeing the loop behavior.

I am on BI 5.9.9.37 as this contained a small feature update I asked Ken to include (ability to include &MEMO even when you format a scheduled status email with other text in the email body, previously recent log entries would only be included if the email body was left empty)

I can try to revert to 5.9.9.36 but I may also drop a line to Ken.

Cheers
 
  • Like
Reactions: TonyR
Update:

So I have made a few adjustments, I think the loop may have been caused by the 30 seconds being too low and the reboot after 3 attempts, since these cameras take a while to reboot.

Having changed it to this, as shown below (45 seconds and 5 attempts) it no longer loops and reboots OK.

However, the ONVIF events are not processed correctly after the reboot. A camera reset (restart, not reboot) in BI is needed to get ONVIF events flowing correctly.

I tried the setting for 'Reset camera/window after:' and set it to 5 timeouts, same as for the reboot, but it has no effect.

I also disabled ONVIF user authentication on camera, and also checked both camera and BI server have the same time and are synching to the same time server.

It seems like the known handshake issue for ONVIF/Dahua, but there is no way to monitor for ONVIF issues, which is a problem if one relies on ONVIF as a trigger.

I am speaking to BI support so if anything relevant transpires I will update here.

1744906644301.png
 
And last update so far - I have tested on 5.9.9.19 and 5.9.9.36 and the issue is still there, both on a 5442 and a 2431 camera, regardless of if ONVIF authentication is on or off... in summary, reboot is working fine, but ONVIF is not after the reboot and only recovers after asking BI to reset/restart the camera

The 5442 is a popular camera around here, I wonder if anyone else is experiencing issues like this recently, and on what version of BI... (my 5442's are updated to the latest version of fw from Andy)
 
After a lot more looking into it, and reading on a few other sites/forums, I had a look at time stamps:

Here is when the camera is working fine (or if it has been reset in BI after a reboot fails to work properly with ONVIF, and then works fine):

1744923608591.png

And here is after a reboot when ONVIF is not working:

1744923688755.png

I am not entirely sure if this is the issue, as the time shown is not contained in the same XML field, but it seems odd to me. I will share this also with Ken.
 
Quick update - while I wait for BI Support to let me know if they have any solution for this, I have found a workaround and I tested it successfully.

This assumes use of MQTT and some system to issue an HTTP request. In my case:

1. Blue Iris sends a MQTT message on Signal Loss and Signal Restore using the Watchdog feature
2. My Home Automation system (HomeSeer) has a device to represent Signal status for each camera, and is updated via point (1) above, using the mcsMQTT plugin
3. An event on HomeSeer will trigger when the Signal changes from NOK to OK, after a wait period of 5 seconds, and issue a HTTP command to Blue Iris to reset the camera

Point (3) assumes that the sequence of a camera going from NOK to OK for signal status was the result of a reboot, and assumes ONVIF would need a reset of the camera window to resume proper operation. In any case, even if the camera is fine, a reset will do no harm. I am also assuming that if the camera was alerted and/or recording, by default the signal has to be OK.

It's not the cleanest solution, but it is automated and beats having to login to Blue Iris to reset a camera once I see ONVIF is no longer working... particularly if I am away.

Happy to share more details if anyone using HomeSeer happens to be in the same predicament.