This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Sunrise sunset
#1
Is a lan connection required to use scheduled sunrise/sunset? And dose this function run if there is no internet connection?
Reply
#2
It's calculated internally based on current date and configured coordinates. Internet connection is not required.
Reply
#3
Hi,

I don’t fully agree with that, without internet you don’t have NTP so you risk a wrong time after power outage, I would add a KNX time DCF77 and a script to keep the controller on time...

BR,

Erwin
Reply
#4
(05.11.2019, 09:05)admin Wrote: It's calculated internally based on current date and configured coordinates. Internet connection is not required.
 Is it possible to improve the internall clock so that it will stay on time even if it's no longer connected to the internet?
Reply
#5
(05.11.2019, 14:59)Joep Wrote:
(05.11.2019, 09:05)admin Wrote: It's calculated internally based on current date and configured coordinates. Internet connection is not required.
 Is it possible to improve the internall clock so that it will stay on time even if it's no longer connected to the internet?
 is there some way to have the user enter the correct time from Visu If power were to fail?
Reply
#6
Hi,

Yes, you can add a knx time and date object to the visu and a TAG to it and add this as a event based script to it that is triggered by the TAG:

Code:
if event.sender == 'us' then -- Only execute when action comes from visu
   date = grp.getvalue('1/1/1')
   time = grp.getvalue('1/1/2')
   cmd = string.format("date -s '%d-%d-%d %d:%d:%d'", date.year, date.month, date.day, time.hour, time.minute, time.second)
   os.execute(cmd)
end
When the user updates the KNX objects from the visu the script will update the controller time and date 

To keep the objects in the visu up to date with the system time you can add this script as resident at 60 seconds:
Code:
-- get current data as table
now = os.date('*t')

-- system week day starts from sunday, convert it to knx format
wday = now.wday == 1 and 7 or now.wday - 1

-- time table
time = {
day = wday,
hour = now.hour,
minute = now.min,
second = now.sec,
}

-- date table
date = {
day = now.day,
month = now.month,
year = now.year,
}

-- write to bus
grp.write('1/1/2', time, dt.time)
grp.write('1/1/1', date, dt.date)
BR,

Erwin
Reply
#7
You can also use USB-GPS if antenna can be placed somewhere where GPS reception is possible.
Reply
#8
(06.11.2019, 08:37)admin Wrote: You can also use USB-GPS if antenna can be placed somewhere where GPS reception is possible.

And altso a KNX clock with a built-in battery can be used. But these of course need a little adjusting of the time along the year. GPS is better.
Reply
#9
LM has built-in real-time clock and there's a super capacitor instead of battery which will keep the clock going during a short power outage.
Reply
#10
(06.11.2019, 09:05)admin Wrote: LM has built-in real-time clock and there's a super capacitor instead of battery which will keep the clock going during a short power outage.

That was new to me. Clever! It's very rare that there is a long term outage in my area. But i know places nearby where there is power outage for several days almost every time there is a big autumn storm. Will the super capacitor last several days, or are we talking about hours?
Reply
#11
Only several hours. You should install a UPS if long outages happen often.
Reply
#12
(06.11.2019, 08:58)Kai-Roger Wrote: And altso a KNX clock with a built-in battery can be used. But these of course need a little adjusting of the time along the year. GPS is better.

Hi,

Always a nice discussion, in my opinion you should connect a IoT device to a network that supports IoT features (: If you don't you will lose functionality..

If you use our time sender MTN677290 you can connect a DCF77 antenna and set in the parameters the daylight saving time period so you don't need to change along the year. But i agree that a USB GPS probably would be a cheaper solution.

@Admin: Does it work native or do we need a script to set the time from the USB GPS fetched data?

BR,

Erwin
Reply
#13
There's no ready-made script but NMEA protocol is fairly simple (ASCII-based). You need to read lines from serial port and split them into chunks separated by ",". Then extract time/date from field values. There are also GPS receivers with RS232. These need an extra power supply but can have longer cables compared to USB.
Reply
#14
(06.11.2019, 09:49)admin Wrote: There's no ready-made script but NMEA protocol is fairly simple (ASCII-based). You need to read lines from serial port and split them into chunks separated by ",". Then extract time/date from field values. There are also GPS receivers with RS232. These need an extra power supply but can have longer cables compared to USB.

Hi,

I will figure that out when needed, no problem, just was curious if it was native, but was expecting this answer already (:

BR,

Erwin
Reply
#15
Hello, everybody,

I have seen that I can specify date, time and latitude and longitude in the settings of the logic machine.

I want the outdoor lighting to turn on at sunset.
What is the easiest way to query this sunset condition?

Thank you very much and best regards
Chris
Reply
#16
Hi,

The easiest way is to create a scheduler with sunset/sunrise events and attach it to your outdoor light object.

BR,

Erwin
Reply
#17
Sorry, I need a little more help. Where do I find the option to choose Sunset? Where can I do that? I can't find anything. Do I do this by code?
Reply
#18
Which firmware version are you using?
Reply
#19
HW: LM5 Lite + Ext (i.MX6)
SW: 20180822
Reply
#20
   
Reply


Forum Jump: