[quote=“wilme2, post:7, topic:200451”][quote=“rigpapa, post:6, topic:200451”][quote=“uros76, post:5, topic:200451”]Cool, it worked. On newly created reactor sensor I used reactor master device and its SystemPowerSource battery variable as condition. Attaching condition screenshot. Hope your recomendation was going into this direction :).
Takes 20 seconds to get the trigger working after I take off power but this delay doesn’t bother me. By the way I love the untrip action option, brilliant function implemented in plugin.
Thanks a bunch :). Off to next automation tasks.[/quote]
Yes. The delay is because the power source and battery level are not event-driven data in Vera/Luup, they have to be polled. They are updated every minute.[/quote]
Actually in L_G550Siren.lua the battery is level updated every 15 seconds, hence his indication of a 20 second delay. Which is crazy to me, so I just set it to 120 seconds. I also disabled the cellular usage poll - it was only polling every two hours, but went out to an internet server for that data (which is problematic at startup IMHO)… Maybe your 60 update is at a lower level?[/quote]
My 60-seconds is me going out with exactly that timing to the OS and running shell commands and parsing their stdout. I doubt those commands poll separately. More likely they’re just wrappers to pull data directly from /sys, which in turn pulls data from I2C, ports, or whatever the implementation interface is. I don’t have a Secure myself, so I can’t dissect them to find out.