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.

Restore Settings on Power Up into KNX System
#6
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()
tag = 'thermostat'

if value then   
   uptime = os.monotonictime()  
 
   if uptime > 3 * 60 then     
      storage.delete(tag)  
    end
else  
...

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...
Reply


Messages In This Thread
RE: Restore Settings on Power Up into KNX System - by p_xatzi - 04.03.2024, 23:15

Forum Jump: