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.

novice, Help me please
#1
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?
Reply
#2
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
Reply
#3
(06.09.2017, 15:32)Erwin van der Zwart Wrote: 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

Thank you Mr. Erwin if I worked on the log Smile
when in the object tab says to create virtual object even doing that will not work the script?
Reply
#4
You can execute script on any object, you should use virtual objects if value is not needed on the KNX bus.
Reply
#5
(06.09.2017, 16:31)admin Wrote: You can execute script on any object, you should use virtual objects if value is not needed on the KNX bus.

ok thanks a lot, now if i run a mysql query
Does it have to be about a specific object as well?
Reply
#6
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
Reply
#7
(06.09.2017, 17:49)Erwin van der Zwart Wrote: 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


I want to take the data of the database of the group addresses, value, tags, type of value among others and send it to my web page to make some reports with that data to execute that daily code
Reply
#8
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
Reply
#9
You can also use remote services to request object list from LM instead of sending it. You have to enable it in system config and set export flag for objects you want to be visible for remote requests.
http://openrb.com/docs/remote-new.htm
Reply


Forum Jump: