Restore Settings on Power Up into KNX System - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: General (https://forum.logicmachine.net/forumdisplay.php?fid=2) +--- Thread: Restore Settings on Power Up into KNX System (/showthread.php?tid=5280) |
Restore Settings on Power Up into KNX System - p_xatzi - 04.03.2024 Hi, I have KNX thermostats that do not retain settings on power up. I want to be able, upon power up, to restore all selected settings to these thermostats and the rest of the system. As I understand, LM Objects are retentive. However, upon power up thermostats may resend their statuses on bus and thus stored settings inside LM Objects will be changed. The KNX power supply is in UPS. However, power outages usually have long duration. So, to sum up. As a solution I thought of this solution: Use a conventional ton delay timer powered directly from the net and connect its relay to a KNX input (closed contact -> true and vise versa). Then when power fails on edje down I will receive false with which I will store settings into storage during UPS back up. Then if power outage lasts for enough time as UPS will be shut down on power restore LM will boot and then after let’s say 3 minutes delay I will receive a true that will restore and write everything from storage memory. Due to complexity of this solution, I would like to ask if this is already solved… Thanks in advance! RE: Restore Settings on Power Up into KNX System - admin - 04.03.2024 You can use init script in LM. Add a short delay via os.sleep() and then resend values to the KNX bus: https://forum.logicmachine.net/showthread.php?tid=1878&pid=11677#pid11677 RE: Restore Settings on Power Up into KNX System - p_xatzi - 04.03.2024 (04.03.2024, 11:55)admin Wrote: You can use init script in LM. Add a short delay via os.sleep() and then resend values to the KNX bus: https://forum.logicmachine.net/showthread.php?tid=1878&pid=11677#pid11677 Thanks admin. I have thought about it but what if thermostats send their new statuses during os.sleep time? Devices will boot together. Similarly, if os.sleep time is set to zero how to ensure that no telegrams from both parts co-exist at the same time on the bus? RE: Restore Settings on Power Up into KNX System - admin - 04.03.2024 Can you disable sending thermostat status on power up? If not then you can use your monitoring solution via KNX input. Not an ideal solution but should work in most cases. When power is ON (event value = true), the storage is cleared but only if LM has been running for at least 3 minutes. When power is OFF (event value = false), all object values with thermostat tag are saved into storage. Event script: Code: value = event.getvalue() Init script, adjust delay as needed. Code: os.sleep(30) RE: Restore Settings on Power Up into KNX System - p_xatzi - 04.03.2024 (04.03.2024, 15:02)admin Wrote: Can you disable sending thermostat status on power up? This is a really old installation (and hardware) we are involved in and there isn't really much we can do. Thanks for the help and code admin. RE: Restore Settings on Power Up into KNX System - p_xatzi - 04.03.2024 I just realize that TON timer could be omitted - if you agree - as the delay it inserts, is just to clear storage memory if power up is made before UPS shutdown. Code: value = event.getvalue() So, instead of the TON Timer, we can use a simple contact like "On-Off Switch" or similar (MCB, etc.) that will be always electrically closed. I mean that we are concerned only about the edge down part of the monitored input. Thus, "value == true" part of code needs to be removed. In my opinion clearing the storage memory in this part of code is not important as it will be overwritten when needed... RE: Restore Settings on Power Up into KNX System - admin - 05.03.2024 You can simply use a 230V relay connected to a KNX binary input to monitor external power. Clearing storage is needed. Otherwise if LM is rebooted for any other reason than UPS power loss then old thermostat values will be restored. RE: Restore Settings on Power Up into KNX System - p_xatzi - 05.03.2024 (05.03.2024, 06:10)admin Wrote: You can simply use a 230V relay connected to a KNX binary input to monitor external power. Clearing storage is needed. Otherwise if LM is rebooted for any other reason than UPS power loss then old thermostat values will be restored.Reboot "for other reason" scenario never crossed my mind. However using the simple relay, that is, without introducing time delay for value true will ignore event script in case BA2.2 (see attachment). So, in order to use a simple relay contact we could either resend digital input value cyclically in the bus or use a flag to store that power failure actually happened, every time power gets cut. This flag will be checked (if true) in the start-up script in order to resend values and then it will be (always) reset.
POWER UP DIAGRAM.pdf (Size: 80.34 KB / Downloads: 17)
|