Dahua day/night switch utility - DahuaSunriseSunset

crc2004

Pulling my weight
Joined
Apr 18, 2016
Messages
213
Reaction score
144
How many times do you issue the adjustFocus command?
 

bp2008

Staff member
Joined
Mar 10, 2014
Messages
12,673
Reaction score
14,017
Location
USA
5 times when manual focusing. 4 times when autofocusing with a set zoom level. 1 time when just autofocusing without a set zoom level.
 

achalmersman

Pulling my weight
Joined
Jan 26, 2017
Messages
267
Reaction score
116
Location
Delaware USA
Hi, I installed and ran .exe but get no results with "get current zoom / focus". It just doesnt do anything no error any anything. What am I doing wrong? Its a 5231 z12

Edit: disregard. Im an idiot

Sent from my VS990 using Tapatalk
 

achalmersman

Pulling my weight
Joined
Jan 26, 2017
Messages
267
Reaction score
116
Location
Delaware USA
Ok, got it installed and working the cams, but the date / prediction is 1/1/0001 at 12:00AM. Does this have to have an internet connection? This is an isolated network I am on with no internet. Thanks, Andrew

Sent from my VS990 using Tapatalk
 

achalmersman

Pulling my weight
Joined
Jan 26, 2017
Messages
267
Reaction score
116
Location
Delaware USA
It does not need an internet connection. It does need latitude and longitude. I'm not confident that the code for calculating sunrise and sunset works in all parts of the world.
Im in Delaware USA. I had a lat and long in the settings. Any idea why the date is so far off? I dissabled it for now because it was forcing my cams to day profile and its night.


Sent from my VS990 using Tapatalk
 

bp2008

Staff member
Joined
Mar 10, 2014
Messages
12,673
Reaction score
14,017
Location
USA
The location you entered is in western China. The USA is all negative longitude values.

Apparently the sunrise calculator code I'm using doesn't like that the entered coordinates and the time zone of the computer are so far apart.
 

achalmersman

Pulling my weight
Joined
Jan 26, 2017
Messages
267
Reaction score
116
Location
Delaware USA
The location you entered is in western China. The USA is all negative longitude values.

Apparently the sunrise calculator code I'm using doesn't like that the entered coordinates and the time zone of the computer are so far apart.
Well I guess that would do it lol. Google listed my position as positive values. I double checked it lol. I just did it on the NASA site and it was negative. Picture to prove im not a liar lol. Ill go back tonight and fix it. Thanks!


Sent from my VS990 using Tapatalk
 

achalmersman

Pulling my weight
Joined
Jan 26, 2017
Messages
267
Reaction score
116
Location
Delaware USA
Yeah, unfortunately there are a lot of ways of writing latitude and longitude.
Oh the West indication means negative side of prime meridian. Brushed up on my geography today. How about that. Sorry I just dont ever use coordinates in my day to day stuff and have forgotten this stuff lol.

Sent from my VS990 using Tapatalk
 

0blar

Getting the hang of it
Joined
May 17, 2017
Messages
281
Reaction score
34
Hi
Is it possible to have your soft also running for linux ?
(Sorry but i don't have programmation skills to make it)
 

0blar

Getting the hang of it
Joined
May 17, 2017
Messages
281
Reaction score
34
Thanks for your reply
do you have any other solution that can be run on linux system ?
 

Tinman

Known around here
Joined
Nov 2, 2015
Messages
1,209
Reaction score
1,476
Location
USA
Just found and set this up today for a few of my cams.....works great ! Thanks BP2008
 

achalmersman

Pulling my weight
Joined
Jan 26, 2017
Messages
267
Reaction score
116
Location
Delaware USA
I also wanted to thank @bp2008 for his work and responses. As soon as I entered the negative sign in the coordinates the prediction date and time etc all worked. I guess your theory about the extreme mismatch with the PC was right. Thanks Again.

Sent from my VS990 using Tapatalk
 

bp2008

Staff member
Joined
Mar 10, 2014
Messages
12,673
Reaction score
14,017
Location
USA
I guess your theory about the extreme mismatch with the PC was right.
;) I entered the same coordinates on my own system and stepped through the code in a debugger to figure out why it was failing to find sunrise and sunset times. The code that calculates this stuff is not something I wrote so I had no idea it had that limitation.
 
Top