You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I think the idea of this program is really nice and I would like to use it to control lights outside of the house. Time for sunrise and sunset are being correctly calculated for my location.
Unfortunately, when using example stated in the documentation it doesn't work as I expect it.
I expect program to terminate 30 min prior sunset. For some reason it terminates after 10 sec.
Below is a debug printout. Last line in debug printout is a mystery to me. Why "wait" is being reduced!?
I'm running "latest" version that I fetched and built about a week ago. Running on RPi3.
pi@pismart:~ $ sunwait wait debug set offset -00:30:00 <My Latitude> <My Longitude>
Debug: argv[1]: >wait<
Debug: argv[2]: >debug<
Debug: argv[3]: >set<
Debug: argv[4]: >offset<
Debug: argv[6]: >XXXXXXXXXX<
Debug: argv[7]: >XXXXXXXXXX<
Debug: All output to use local timezone (nogmt).
Debug: Now utcTm: Mon Apr 22 11:09:26 2019 GMT
Debug: Now localTm: Mon Apr 22 13:09:26 2019 CEST
Debug: Now UTC bias (add to GMT to get CEST) hours: 2.000000
Debug: UTC Bias (hours): 2.000000
Debug: Now: Days since 2000: 7051
Debug: Target year set to: 119
Debug: Target mon set to: 3
Debug: Target mday set to: 22
Debug: Target utcTm: Mon Apr 22 00:00:00 2019 GMT
Debug: Target localTm: Mon Apr 22 02:00:00 2019 CEST
Debug: Target UTC bias (add to GMT to get CEST) hours: 2.000000
Debug: Target: Days since 2000: 7051
Debug: Co-ordinates - Latitude: XXXXXXXXX
Debug: Co-ordinates - Longitude: XXXXXXXXX
Debug: Twilight - Daylight
Debug: User specified offset (hours): -0.500000
Debug: Function selected: Wait
Debug: sunriset.cpp: Sun directly south: 10.940656 UTC, Dirunal Arc = 14.845321 hours
Debug: sunriset.cpp: Days since 2000: 7050
Debug: sunriset.cpp: Sun directly south: 10.937158 UTC, Dirunal Arc = 14.929036 hours
Debug: sunriset.cpp: Days since 2000: 7051
Debug: sunriset.cpp: Sun directly south: 10.933778 UTC, Dirunal Arc = 15.012551 hours
Debug: sunriset.cpp: Days since 2000: 7052 Debug: Wait reduced from 27880 to 10 seconds.
pi@pismart:~ $ echo $?
0
The text was updated successfully, but these errors were encountered:
According to the code you do reduce wait to 10 sec when running in debug mode (by design). But it seems that even for "normal" mode same/similar timeout being applied.
Source code in question:
//
// In debug mode, we don't want to wait for sunrise or sunset. Wait a minute instead.
//
if (pRun->debug == ONOFF_ON)
{ printf("Debug: Wait reduced from %li to 10 seconds.\n", waitSeconds);
waitSeconds = 10;
}
else if (pRun->functionPoll == ONOFF_ON) waitSeconds += 60; // Make more sure that a subsequent POLL works properly (wink ;-)
Hi! I think the idea of this program is really nice and I would like to use it to control lights outside of the house. Time for sunrise and sunset are being correctly calculated for my location.
Unfortunately, when using example stated in the documentation it doesn't work as I expect it.
I expect program to terminate 30 min prior sunset. For some reason it terminates after 10 sec.
Below is a debug printout. Last line in debug printout is a mystery to me. Why "wait" is being reduced!?
I'm running "latest" version that I fetched and built about a week ago. Running on RPi3.
pi@pismart:~ $ sunwait wait debug set offset -00:30:00 <My Latitude> <My Longitude>
Debug: argv[1]: >wait<
Debug: argv[2]: >debug<
Debug: argv[3]: >set<
Debug: argv[4]: >offset<
Debug: argv[6]: >XXXXXXXXXX<
Debug: argv[7]: >XXXXXXXXXX<
Debug: All output to use local timezone (nogmt).
Debug: Now utcTm: Mon Apr 22 11:09:26 2019 GMT
Debug: Now localTm: Mon Apr 22 13:09:26 2019 CEST
Debug: Now UTC bias (add to GMT to get CEST) hours: 2.000000
Debug: UTC Bias (hours): 2.000000
Debug: Now: Days since 2000: 7051
Debug: Target year set to: 119
Debug: Target mon set to: 3
Debug: Target mday set to: 22
Debug: Target utcTm: Mon Apr 22 00:00:00 2019 GMT
Debug: Target localTm: Mon Apr 22 02:00:00 2019 CEST
Debug: Target UTC bias (add to GMT to get CEST) hours: 2.000000
Debug: Target: Days since 2000: 7051
Debug: Co-ordinates - Latitude: XXXXXXXXX
Debug: Co-ordinates - Longitude: XXXXXXXXX
Debug: Twilight - Daylight
Debug: User specified offset (hours): -0.500000
Debug: Function selected: Wait
Debug: sunriset.cpp: Sun directly south: 10.940656 UTC, Dirunal Arc = 14.845321 hours
Debug: sunriset.cpp: Days since 2000: 7050
Debug: sunriset.cpp: Sun directly south: 10.937158 UTC, Dirunal Arc = 14.929036 hours
Debug: sunriset.cpp: Days since 2000: 7051
Debug: sunriset.cpp: Sun directly south: 10.933778 UTC, Dirunal Arc = 15.012551 hours
Debug: sunriset.cpp: Days since 2000: 7052
Debug: Wait reduced from 27880 to 10 seconds.
pi@pismart:~ $ echo $?
0
The text was updated successfully, but these errors were encountered: