Logic Machine Forum
Status of all addresses inside of a middle group - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: Status of all addresses inside of a middle group (/showthread.php?tid=4485)



Status of all addresses inside of a middle group - sck - 10.01.2023

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!!


RE: Status of all addresses inside of a middle group - admin - 10.01.2023

You can use tags like in this example: https://forum.logicmachine.net/showthread.php?tid=2316&pid=14510#pid14510


RE: Status of all addresses inside of a middle group - sck - 10.01.2023

(10.01.2023, 10:44)admin Wrote: You can use tags like in this example: https://forum.logicmachine.net/showthread.php?tid=2316&pid=14510#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,


RE: Status of all addresses inside of a middle group - Daniel - 10.01.2023

Check in the log tab


RE: Status of all addresses inside of a middle group - sck - 10.01.2023

(10.01.2023, 14:44)Daniel Wrote: Check in the log tab

Daniel thank you, the two missing are there!