16.10.2018, 08:28
(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
Ctrl+F5