04.03.2024, 20:07
(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.