LogicMachine Forum
Save & Restore State - Printable Version

+- LogicMachine 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: Save & Restore State (/showthread.php?tid=6188)



Save & Restore State - phil32 - 14.11.2025

Hi Guys, 
I do have few objects for lighting control which are exported into bacnet and we control them from the bacnet...
I will creat another object in the LM5 that turns ON all of the lights, and instead of switching OFF, we want to restores each light to its previous state?
I need a method to store the current values and write them back after the override.
Any examples or script are appreciated.


RE: Save & Restore State - Daniel - 14.11.2025

Why don't you just create another global group in KNX for all lights and use it to control all. Then you need another group for bacnet to send on/off and for ON you send 1 to all lights group and for OFF you read state of all individual groups and re-send its value.


RE: Save & Restore State - phil32 - 14.11.2025

(14.11.2025, 09:04)Daniel Wrote: Why don't you just create another global group in KNX for all lights and use it to control all. Then you need another group for bacnet to send on/off and for ON you send 1 to all lights group and for OFF you read state of all individual groups and re-send its value.

I can create the global group but i can't change the bacnet objects because i do not have any control to the BMS system...


RE: Save & Restore State - Daniel - 14.11.2025

What is going to trigger the restoring of value state?


RE: Save & Restore State - phil32 - 14.11.2025

(14.11.2025, 09:32)Daniel Wrote: What is going to trigger the restoring of value state?
1bit virtual object (will be controlled from mosaic)


RE: Save & Restore State - Daniel - 14.11.2025

It makes no difference, the whole point is to make global command separate from individual groups. The individual groups will store old value and you can use it.