Dahua day/night switch utility - DahuaSunriseSunset

Good catch, I actually was using the correct notation in BI. When I copied and deleted my user:pass I put in a typo.

I did end up figuring out my issue was enabling https on the camera. I had used a self signed (generated on the camera) cert, that i think was throwing an error in BI. I disabled https on the camera and things are working as expected. FWIW, I first tried running a https: web request and BI was throwing a Web: error: stream XXXX in the logs. I assume this was b/c of the self signed cert. Can anyone confirm and know how to get BI to accept the self signed cert for a web request?
I think you will find that most users here wouldn't bother with https and certificates on a device that should be fully isolated to local (LAN) traffic only. Sounds like way more trouble than it is worth.
 
Last edited:
I'm running DahuaSunriseSunset on 3 Dahua Cams. One of them is not switching day/night like the others. It's always ahead and switching into night-mode too soon.
Can i improve settings on DahuaSunriseSunset or BI to get better results?
 
You need to move them on the camera using the DST offset time. Move it ahead one hour and it should behave like the others.
 
  • Like
Reactions: Joshude and Mike A.
Wow - the Blue Iris command is genius! This is working perfectly! One note - it appears that your camera password can't contain an '@' or '.' The command does not successfully issue to the camera. However if I issue the command in web browser it works correctly. I changed my passwords and removed special characters, though it isn't ideal.

Is there any special escape characters I can include in the URL to indicate the the '@' is part of the password?

Thanks!
 
Have been using the "Dahua-Sunrise-Sunset" utility with BI version 5 on a dual NIC Windows 10 system and it works well. The cameras all switch settings as required. Plus the cameras are on their own subnet and isolated from the internet.

The issue is that local sunup/sundown does not take into account sun vs clouds. Is there a method to use an external outside LUX (light sensor) that can trigger this utility on the dual NIC BI Windows 10 computer?

Did noticed, earlier in the thread, that one individual did use a PI plus a LUX sensor, but not sure of all of the technical details for installation and setup.

As a side note, previously used a Hubitat C7 hub for camera switching. However, this will only work if the cameras are on the same network as the hub. A LUX sensor could be added to the Hubitat hub for monitoring light levels and then perhaps somehow be used to trigger the sunrise/sunset utility in place of local sunrise and sunset as one idea.

Suggestions on what to consider and what works would be appreciated.
 
Have been using the "Dahua-Sunrise-Sunset" utility with BI version 5 on a dual NIC Windows 10 system and it works well. The cameras all switch settings as required. Plus the cameras are on their own subnet and isolated from the internet.

The issue is that local sunup/sundown does not take into account sun vs clouds. Is there a method to use an external outside LUX (light sensor) that can trigger this utility on the dual NIC BI Windows 10 computer?

Did noticed, earlier in the thread, that one individual did use a PI plus a LUX sensor, but not sure of all of the technical details for installation and setup.

As a side note, previously used a Hubitat C7 hub for camera switching. However, this will only work if the cameras are on the same network as the hub. A LUX sensor could be added to the Hubitat hub for monitoring light levels and then perhaps somehow be used to trigger the sunrise/sunset utility in place of local sunrise and sunset as one idea.

Suggestions on what to consider and what works would be appreciated.
I'd say most of us don't concern ourselves with clouds. We just pick a time to switch from day to night. All my cameras switch to day/night exactly at sunrise/sunset. Only my LPR camera switches to night 45 minutes before sunset and then back to day 45 minutes after sunrise. That gives it plenty of ambient light to focus after the switch occurs.

I'm sure you could program up a custom utility that incorporates a LUX sensor. It just seems overly complicated to me.
 
This is a really cool command - thanks for posting about the BI integration.

I do have a question / problem. I currently have several Loryta IPC-T5442TM-AS cameras. The BI "PTZ Presets" are working great - in that they switch between Day and Night like a charm. My problem is that the "Night" profile locks out the "color" mode - forcing the camera into an IR mode. I have enough street-light for my cameras that color is 100% preferred - even during night time.

Is there a solution to this? Ultimately, I'm trying to set different exposure settings for day and night. Having the same exposure settings 24/7 ruins the quality half the time.

I'll keep digging through this thread and see what I can find.
 
Is there any special escape characters I can include in the URL to indicate the the '@' is part of the password?
Maybe HTML URL encoding will solve this. Change the @ to %40

You also mentioned trouble if a . (period) was used. Its encoded value is %2E

- Thomas
 
Eager to hear if the URL encoding will work , or not. Fearing the cleartext password will get 'passed on' without being decoded :/
 
Using the sunset utility with BI on Windows 10. The set and rise times do not parallel the data from the utility under "Next Sunrise and Sunset".

For today (26th) the utility lists rise at 5:18:55 AM and set at 10:55:11 PM - Offset set to zero for both.

Actual sunrise camera switch occurred at 5:24:55 AM.

Computer clock set for correct time.

Why are the times so far off? Is there a fix?

i.e. could just offset the rise by 6 minutes as hack, but that does not solve the issue of why the times do not come close to matching. Will do more checking to see if the time stays at 6 minutes or varies, etc.