Posts: 120
Threads: 40
Joined: Jun 2017
Reputation:
0
how can I write lua code and show me that it worked correctly?
for example if I write
print ("Hello word")
where I can see that this instruction was written
I can program program over a group address that physically does not exist a device? that executes that lua statement?
Posts: 1764
Threads: 6
Joined: Jul 2015
Reputation:
117
06.09.2017, 15:32
(This post was last modified: 06.09.2017, 15:35 by Erwin van der Zwart.)
Hi,
Use log("hello world") instead of print and check the log tab.
You cannot read/write to objects that do not exist in the object list as the object type is otherwise not known.
You can use event based scripts to execute the script by group address or tags (by multiple objects with same tag)
BR,
Erwin
Posts: 7764
Threads: 42
Joined: Jun 2015
Reputation:
447
You can execute script on any object, you should use virtual objects if value is not needed on the KNX bus.
Posts: 1764
Threads: 6
Joined: Jul 2015
Reputation:
117
06.09.2017, 17:49
(This post was last modified: 06.09.2017, 17:50 by Erwin van der Zwart.)
Hi,
Scripts can be triggered by change in a object value, by interval or as planned moment, so there is no need to always use the object value.
Depending on what you want to achieve you select a methode to activate a script or keep it running on a timed interval.
So if you want to execute a mysql command, what do you need? Must it be triggered on a specific action or do you want to check values every x period?
BR,
Erwin
Posts: 1764
Threads: 6
Joined: Jul 2015
Reputation:
117
Hi,
When you use only daily data then you can use a scheduled script and run it every day at 00:00 hour.
BR,
Erwin