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.

Modifying (writing) LM system date/time
#2
(13.04.2020, 09:46)SigmaTec Wrote: Γεια σας όλα,

υπάρχει κάποιος τρόπος στο Lua να ενημερώσετε την ημερομηνία / ώρα του συστήματος LM για να το προσαρμόσετε με ένα σενάριο;

Πολλοί ευχαριστώ εκ των προτέρων για τη βοήθειά σας.

Όλα τα καλύτερα από τη Γαλλία.
Hi 
I use resident script rate 60
-- 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('9/1/3', time, dt.time)
grp.write('9/1/2', date, dt.date)
Reply


Messages In This Thread
RE: Modifying (writing) LM system date/time - by balatis - 13.04.2020, 15:26

Forum Jump: