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
#5
(04.03.2024, 15:02)admin Wrote: 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()
tag = 'thermostat'

if value then
  uptime = os.monotonictime()

  if uptime > 3 * 60 then
    storage.delete(tag)
  end
else
  values = {}
  objects = grp.tag(tag)

  for _, object in ipairs(objects) do
    values[ object.address ] = object.value
  end

  storage.set(tag, values)
end

Init script, adjust delay as needed.
Code:
os.sleep(30)

tag = 'thermostat'
values = storage.get(tag)

if values then
  for address, value in pairs(values) do
    grp.write(address, value)
    os.sleep(0.1)
  end

  storage.delete(tag)
end

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


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

Forum Jump: