Wrong timeofday daytime,nighttime,...
Posted: Friday 03 April 2020 8:42
What's wrong in my mind? How to use it?
I have set the right location in settings and get the right times at the dashboard and with json:
But if I try to use it in lua:
i get wrong times:
...and the SunRiseInMinutes doesn't change the value!?
What I want is to run a script only when it is bright outside
I have set the right location in settings and get the right times at the dashboard and with json:
Code: Select all
/json.htm?type=command¶m=getSunRiseSet
Code: Select all
AstrTwilightEnd "21:42"
AstrTwilightStart "04:51"
CivTwilightEnd "20:21"
CivTwilightStart "06:12"
DayLength "13:03"
NautTwilightEnd "21:00"
NautTwilightStart "05:33"
ServerTime "2020-04-03 08:26:40"
SunAtSouth "13:17"
Sunrise "06:45"
Sunset "19:48"
status "OK"
title "getSunRiseSet"
Code: Select all
print(timeofday['Daytime'])
print('SunriseInMinutes '..timeofday['SunriseInMinutes'] )
Code: Select all
2020-04-03 08:29:39.444 Status: LUA: Nighttime
2020-04-03 08:29:39.444 Status: LUA: SunriseInMinutes 405
What I want is to run a script only when it is bright outside