Dahua day/night switch utility - DahuaSunriseSunset

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,870
Reaction score
48,514
Location
USA
So in the night profile setting, go to illumination or IR and adjust it.
 

Cele

n3wb
Joined
Jan 25, 2021
Messages
5
Reaction score
1
Location
Germany
OK, but my Problem is that the Camera didn't Change the Profil when it goes to nightvision. Under Profile Management i can online choose General, Full Time and schedule. Maybe i have a thinking failure
 

biggen

Known around here
Joined
May 6, 2018
Messages
2,563
Reaction score
2,837
The camera doesn't change the profile on its own unless you are using the built-in scheduling function of the camera which is terrible since it doesn't take in account the different times of sunrise/sunset. That was the reason this utility and other like it were born. To track the changes of sunrise/sunset and to force the profile switch times of the camera to the actual times you want based off of those sunrise/sunset times.

You need to use this utility (or another script) to flip the cameras to day/night. So you setup ahead of time both profiles on the camera with all your settings for each profile (brightness, gain, etc...). Then the script changes your camera to the Nighttime/Daytime settings based on the time YOU decide which is normally sunrise/sunset or some offset close to that.
 

Cele

n3wb
Joined
Jan 25, 2021
Messages
5
Reaction score
1
Location
Germany
Ahh okay i understand! I thought the Main resaon for this sunrise/Sunset Skript was that all Camera Change there Profil at the Same Time. That is very silly from the Dev Team to Not Change the Profil with the Switch of the nightvision.

I thank you a Lot for the Help!
 

IReallyLikePizza2

Known around here
Joined
May 14, 2019
Messages
1,852
Reaction score
4,443
Location
Houston
Is there an issue with special characters in the password field? My password ends with an @, and its not getting the current zoom (Or doing anything I think)

This is how it looks

1613689331566.png
 

tech101

Known around here
Joined
Mar 30, 2015
Messages
1,474
Reaction score
2,130
Location
SF BayArea, USA
I have a thought. So I have my POE Switch including my camera on a very big UPS. I have some cameras which are forced to stay in color at night. I use this app to force other cams in black and white all good there.

However here is a scenario I was thinking today. So My UPS can run my system non stop for 8 hours.. or more. However What if say The powers goes out at night and some of the cams are gonna stay in color however there wont be enough light since the lights are out..

Any way to kind of make it say detect when the PC switches to UPS after sunset to sunrise switch all camera to B/W mode with IR set to Smart IR ?

or anyone have achieve this in some other fashion would love to hear..
 

AILATI

Young grasshopper
Joined
Oct 20, 2019
Messages
54
Reaction score
1
Location
dahua
Ho NVR-5216-4k/s2 aggiornato all'ultima versione firmware 10/20 e anche le IPC-CAM aggiornate alle versioni ultime 2020, nelle IPC-CAM è presente il profilo giorno/notte mentre in NVR no ! In NVR ci sono solo i tre profili che tutti conosciamo perfettamente, NORMALE,GIORNO,NOTTE. Ora mi chiedo essendo NVR a fare da pilota sulle IPC-CAM come sarà mai possibile che le IPC-CAM possano commutare se all'interno di NVR manca il profilo GIORNO/NOTTE? E' un grande buco nero che ancora ad oggi non è stato risolto riguardo la commutazione giorno e notte, questo problema è un vero handicap per il sistema perché nella giornata ci sono variazioni di luce che portano la scena video a cambiare inducendo zone d'ombra che richiedono WDR o altre funzioni possibili ... C'è qualcuno che ha notizie se nei prossimi aggiornamenti futuri l'amatissima DAHUA risolverà questo problema forse ormai dimenticato ma di vitale importanza ? GRAZIE ......
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,870
Reaction score
48,514
Location
USA
@samplenhold - glad the members here were able to help you out - another fine example of collectively the members of this forum can solve many issues that develop.

Bigger question is did those cameras come with that unchecked and why (because I did not have to do that in my 5442) or did you somehow do when setting up trying to limit access?
 

avg2424

n3wb
Joined
Mar 24, 2021
Messages
2
Reaction score
0
Location
california
Hi guys,
I found this forum while searching for specs to a PIR floodlight camera.

I have a Lorex system and I've been trying to find a way to get the profiles to switch day/night automatically.
The problem I am having is that my profiles aren't being set in the NVR. I can confirm http commands made a change to VideoInMode[X].Config[0], but nothing takes effect.
I can also confirm that that is the correct setting in my system comparing before and afters from changing profiles in the NVR.

What am I missing that isn't allowing me to change profiles on the fly using http commands?

Edit:
I found the solution:
Lorex NVR command needs to be set at
setConfig&VideoInOptions[0].NightOptions.SwitchMode=0
Day SwitchMode=0
Normal SwitchMode=4
Night SwitchMode=3

I need to test these out
Depends on Brightness SwitchMode=1
Sunset/Sunrise SwitchMode=2

Apparently the VideoInMode doesn't matter because it gets overridden by SwitchMode
NOTE: I used NightOptions.SwitchMode because it worked. There's also a Normal.Switchmode and a SwitchMode. I will test further as maybe because it is night, it works, perhaps during the day I need to switch a different one.

Additional notes:
I used bp's exe and was getting errors authenticating. There is no CGI service in my Lorex NVR so I whitelisted the IP that was running it and it passed through fine. The problem is that it's still the wrong command. I may write the change using his source code if I get some time
 
Last edited:

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,870
Reaction score
48,514
Location
USA
Go into the camera settings page on the NVR and look for the Microsoft e Web Browser and select it and it will go to the camera GUI (photo credit bigredfish from his PSA thread). Your screen may look a little different to get into the camera gui and see if doing it this way gets you access to some other features the NVR is blocking - it did for my neighbors Lorex. From there you can set schedules for day/night or a time schedule.


1611926899349.png



I do not think bp's utility or typing in API commands will work thru an NVR due to it assigning the cameras a different IP address range, but I haven't tried it or have heard people have success passing those through an NVR.
 

avg2424

n3wb
Joined
Mar 24, 2021
Messages
2
Reaction score
0
Location
california
Go into the camera settings page on the NVR and look for the Microsoft e Web Browser and select it and it will go to the camera GUI (photo credit bigredfish from his PSA thread). Your screen may look a little different to get into the camera gui and see if doing it this way gets you access to some other features the NVR is blocking - it did for my neighbors Lorex. From there you can set schedules for day/night or a time schedule.

I do not think bp's utility or typing in API commands will work thru an NVR due to it assigning the cameras a different IP address range, but I haven't tried it or have heard people have success passing those through an NVR.
Thank you for your reply.
Your suggestion is a gui of what I was working on with http commands. bp's utility works, but it is sending the wrong command for my NVR to process the change. It's sending the settings straight to the cameras, but my NVR will not register the change without using the alternate commands. (I have a Lorex N881A6)
Scheduling works fine (Only visible through the cameras through http or your suggestion), but I would prefer a utility that keeps up with the sunup/sundown offsets throughout the year.

FYI, it appears the gui method doesn't work for cameras not plugged directly into the NVR (such as a wifi camera). I'm sure there is an alternate method to reach the gui on those.


EDIT:
I appears that I can forego scheduling and use setConfig&VideoInOptions[X].NightOptions.SwitchMode=1 to automatically switch profiles based on light conditions :thumb:
 
Last edited:

thespaugh

n3wb
Joined
Jun 19, 2019
Messages
3
Reaction score
8
Location
Washington
Top