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.

Status of all addresses inside of a middle group
#1
Hi! I am new to LUA and the logic machine and would like to see if you can help me.

I have all the windows and door sensors under the group addresses 6/3 and I would like to create a function to check the status (1 bit) of the addresses in it so I can identify how many doors or windows are open and return the name of them.

I saw some examples of creating arrays to input all the addresses manually and then go through all of them with a for or similar but I wonder whether there is a way to automate it a bit more.

Thank you!!
Reply
#2
You can use tags like in this example: https://forum.logicmachine.net/showthrea...0#pid14510
Reply
#3
(10.01.2023, 10:44)admin Wrote: You can use tags like in this example: https://forum.logicmachine.net/showthrea...0#pid14510

Thank you for your prompt response!!

I have 12 items which I tagged but when running the script I only get the address of 10 of them. Do you know why?

Also, how I can ensure that I don't lose the tags? I guess that unless I modify them they will remain as they were set and with a backup, I will have a copy of them but I would like to check with you first.

Regards,

Attached Files Thumbnail(s)
   
Reply
#4
Check in the log tab
------------------------------
Ctrl+F5
Reply
#5
(10.01.2023, 14:44)Daniel Wrote: Check in the log tab

Daniel thank you, the two missing are there!
Reply


Forum Jump: