LogicMachine Forum
Detect KNX bus power down - 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: Detect KNX bus power down (/showthread.php?tid=3788)



Detect KNX bus power down - tpospichal - 05.01.2022

Hello is there any way how to catch KNX bus power loss by event script?

For example my LM has a power backup, but KNX Power source does not, so after power restores i need to run some scripts.

Thank you.


RE: Detect KNX bus power down - Daniel - 05.01.2022

Try this
Code:
function check()   local delta, wdt     wdt = io.readfile('/tmp/tpuart.wdt') or ''     wdt = tonumber(wdt) or 0     delta = os.time() - wdt   return delta <= 10 end checktp = check() log(checktp)



RE: Detect KNX bus power down - forsterm - 05.01.2022

or see this: https://forum.logicmachine.net/showthread.php?tid=293&pid=22845#pid22845
Code:
status = buslib.isconnected() log(status)