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.

Get data times from Schedulers !
#1
Hi everybody ! I have a small problem, do not know if anyone can do it?
In LM5 there are Schedulers section (located next to the Scripting section). This part, we can manually change the timer (outside the interface into the Schedulers).
As shown in the figure, I now want to get (GET) the data in this region 1, and save it to an object such as 1/1/1. For example, take the data of the time "Start time", get the date "Days of the week".
Who can get this data can show me, with a script? I am very very thank you everyone!

Attached Files Thumbnail(s)
   
Reply
#2
See this post: https://forum.logicmachine.net/showthread.php?tid=686
Reply
#3
Thank you for helping me ! I have read and accessed a table as follows:
---------------------------------
* table:
  [first]
   * table:
    [start_hour]
     * number: 12
    [start_min]
     * number: 30
    [id]
     * number: 1
  [2]
   * table:
    [start_hour]
     * number: 21
    [start_min]
     * number: 5
    [id]
     * number: 2
----------------------------------
But I do not know how to get this [start_hour], [start_min], [id] to a KNX address.
For example I want to address: 1/1/1; 1/1/2; 1/1/3
grp.write ('1/1/1', [start_hour])! it does not work.
I was a new person ! hope everyone sympathized.
Reply
#4
Hi,

Try: (change tablename to the name of your table)
Code:
grp.write ('1/1/1', tablename[1].start_hour)
grp.write ('1/1/2', tablename[1].start_min)
grp.write ('1/1/3', tablename[1].id)

grp.write ('1/1/4', tablename[2].start_hour)
grp.write ('1/1/5', tablename[2].start_min)
grp.write ('1/1/6', tablename[2].id)
BR,

Erwin
Reply
#5
You will probably need a scheduled script that runs every minute to catch event updates (if any). Change id from 1 to your event ID if needed:
Code:
id = 1
event = db:getrow('SELECT * FROM scheduler_events WHERE id=?', id)

grp.checkwrite('1/1/1', event.start_hour)
grp.checkwrite('1/1/2', event.start_min)
grp.checkwrite('1/1/3', event.id)
Reply


Forum Jump: