SpaceLogic KNX Forum
Schneider Electric SpaceLogic KNX forum to get support and share knowledge including selection, installation and troubleshooting for spaceLYnk, Wiser for KNX, eConfigure KNX, SpaceLogic KNX Hybrid module and other topics.
Posted: 2015-05-05 10:42 AM . Last Modified: 2024-07-15 12:00 AM
Link copied. Please paste this link to share this article on your social media post.
How to handle time and date objects at HomeLYnk? I'm trying to get time and date information using the LUA function os.date(), and the script available in the product manual, with no success. Another question is concerning the NTP Protocol Service. I already configured the HL in a proper LAN, with internet access running fine, and the NTPs addresses filled up. However, everytime I restart the system, I got the standard message concerning the incorrect time. I guess if the NTP service is enabled, these message should not appear (?). Tks in advance!
Link copied. Please paste this link to share this article on your social media post.
Hello Paolo,
what do you want to do with time and date?
Do you want to save it to KNX grp object? If yes, in what format?
You can use os.date() with different parameters.
-- get current data as table
not_t = os.date('*t')
Then you can access the values with dot notation.
E.g. hour=now_t.hour
If you do not use any parameter and call the function like this:
now = os.date()
It returns a string formated date and time.
If you want to save date values to 3byte KNX object,
you have to create a table like this:
-- date table
date = {
day = now_t.day,
month = now_t.month,
year = now_t.year,
}
Then you can update your grp object:
grp.update('1/1/1', date, dt.date)
For the NTP:
Try to ping your NTP server IP address from Configurator>>System>>Status>>Network Uttilities>>Ping.
Are you able to reach the server?
Best Regards
Tomas
Link copied. Please paste this link to share this article on your social media post.
Hello Tomas. Unfortunatelly, we have no HomeLYnk available next weeks to apply the codes you posted. However, I appreciate the assistance and as I run the tests, I'll post the results here.
Best regards!
Link copied. Please paste this link to share this article on your social media post.
Hello Paolo,
any news?
Regards
Tomas
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.