You can use rscalc function from common functions to get sunrise and sunset time in minutes. Then you can convert it to text (or use a day/time object instead):
Hi
Thank you for your reply but the first two rows are the problem. I don't want two separated stores for geo coordinates. I set these values in the system date/time dialogue. Can I at least read it from here?
The best solution would be if the system took these values from KNX objects provided by my meteo station.
LM5Lp, firmware: 2018.08.22 and 2021.12.15, FlashSYS v2, ARMv7 Processor rev 5 (v7l), kernel 4.4.151 and 4.4.259
25.02.2018, 08:42 (This post was last modified: 25.02.2018, 09:00 by buuuudzik.)
(22.09.2017, 10:24)admin Wrote: You can use rscalc function from common functions to get sunrise and sunset time in minutes. Then you can convert it to text (or use a day/time object instead):
I've checked with also -22 and also not right.
See what I've found in User guide for Spacelynk and what I've found on Google Maps for Lublin. And also on page latlong.net
26.02.2018, 14:31 (This post was last modified: 26.02.2018, 14:48 by buuuudzik.)
Right
I had no problem in my suncalculation script because I had there appriopriate order. But what about positive and negative values? In above screenshot from google there is no sign but should be. Can you maybe add some info about this into your manual?
But if it is about these values I've checked the trend from twilight sensor and 0lux is at 5:50 and 17:50. If it is about sun elevation 0° is at 6:40 and 17:05. What is the goal of this sunset sunrise script? Checking if elevation == 0° or other value?
There are several types of sunrise/sunset, rscalc gives values when sun is at 0°.
Why do you think there should be a sign in coordinates for a location in Poland? It is above equator and east of Greenwich, so both latitude and longitude are positive numbers.
That's because it a US website. They also have time zone offsets in reverse, Berlin should be UTC +1. Their interpretation of longitude is incorrect and misleading.
I know such situation like A B and + - in RS-485 But google is also US company and NOAA is some governmental departure so sounds very professional Good to know how it is on LM. Thanks Admin
Can someone help me, please!
How can I compare (in a if / elseif) the sunrise and sunset results (from Admin's script above) to os.time() to define if it is morning, day ore evening?
date = os.date('*t')
now = date.hour * 60 + date.min
-- from 0:00 to sunrise
if now < sunrise then
alert('before sunrise')
-- from sunset to 23:59
elseif now > sunset then
alert('after sunset')
else
alert('day')
end
date = os.date('*t')
now = date.hour * 60 + date.min
-- from 0:00 to sunrise
if now < sunrise then
alert('before sunrise')
-- from sunset to 23:59
elseif now > sunset then
alert('after sunset')
else
alert('day')
end
(22.09.2017, 10:24)admin Wrote: You can use rscalc function from common functions to get sunrise and sunset time in minutes. Then you can convert it to text (or use a day/time object instead):
Is it possible to get unix time when using rscalc? I'm using the values from the settings (lat, long), but getting 600 as result from sunrise = rascals(latitude).