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.

Read device id
#1
Hi

Im wondering if its possible with an event script which is actived by an tag to be able to read the device id which updated the group address.

i've seen that in objectlog there is a column for source adress which is the data i need.

The reason for this is that I want to create a script which checks who is sending data and if its the wrong sender overwrite the last command.
Reply
#2
Check event.src variable
Reply
#3
Thanks!
Thats excatly what i was looking for Smile

Just a off topic question, but how can i find documentation for these types of variables?

I use this a lot (https://openrb.com/docs/lua.htm), but this documentation is missing a lot of the more advanced functions in LM.
Reply
#4
This is a part of built-in help in the editor. Click "Scripting basics" in the right sidebar in the editor.
Reply
#5
Thanks as always, now i know that as well Smile Got all the values i needed now.
Reply
#6
Hi again,

got a new question, almost the same as topic so didn't want to start a new thread only for this question.

i've now been able to identify the device which sends a write command and save it to storage for later use, but when i send a read command from eiter ETS or a topssytem the tag doesn't get "updated". So my script dosn't get triggered and the cant do the logic i want. 

What i want to do is that when topsystem doesn't have a value and sends a read request for the value the script will be triggeredt and get this from the storage and update the value. 

Is there a way for the tag to be triggered by a read request?
Reply
#7
Enable "Execute on group read" in event script settings.
Reply
#8
Fantastic! Thank you!

LM got all the features ready to go <3
Reply


Forum Jump: