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.

KNX GPS receiver with W4K
#13
(16.10.2018, 08:16)Ruslan25 Wrote: Hi again
Is it possible to send the right time and date to Knx bus from wiser?

Skickat från min S41 via Tapatalk

Copy paste from w4k manuals


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)
------------------------------
Ctrl+F5
Reply


Messages In This Thread
KNX GPS receiver with W4K - by Ruslan25 - 18.08.2018, 14:47
RE: KNX GPS receiver with W4K - by Ruslan25 - 19.08.2018, 04:34
RE: KNX GPS receiver with W4K - by Ruslan25 - 19.08.2018, 11:02
RE: KNX GPS receiver with W4K - by Daniel - 20.08.2018, 07:30
RE: KNX GPS receiver with W4K - by Ruslan25 - 20.08.2018, 09:31
RE: KNX GPS receiver with W4K - by Ruslan25 - 20.08.2018, 10:04
RE: KNX GPS receiver with W4K - by Ruslan25 - 21.08.2018, 16:19
KNX GPS receiver with W4K - by Ruslan25 - 16.10.2018, 08:16
RE: KNX GPS receiver with W4K - by Daniel - 16.10.2018, 08:28

Forum Jump: