Reactor ver 1.5 Stable/Pre-Release

Thanks rigpapa for replying.
In terms of ideas, I think it would be awesome if there was a set of conditions to turn a device on.
Then a set of conditions to turn that device off.
Plus your excellent idea on a condition or expression to control the brightness/dimming.

You have a knack and skill within this app to have a clear and easy to use interface which is evident by the popularity and uptake.

Thanks for your continual work and commitment to this app, you are making the lives of all us poor Vera users so much more flexible, productive and better off.

[quote=“rigpapa, post:7, topic:199805”]The 1.5 version of Reactor posted yesterday, with the features mentioned in my prior post here (scene runner, primarily).

One of the new features specifically for VeraSecure is that it checks the AC/DC operating state of the system, and the system battery level. Since I don’t have a Secure yet (and Vera apparently isn’t offering the developer discount on them, so they’re pricey), I relied on help from another member (thank you @wilme2) to find the necessary tools and their responses for that implementation, but I need someone to test it live. If you have a Secure, you should have two state variables on the Reactor master device: SystemPowerSource and SystemBatteryLevel. You can use them in ReactorSensor conditions by using a “service” condition, selecting the Reactor master device, and then those variables. The SystemPowerSource is best checked with a “starts with” condition, testing against the strings “DC” (for utility power) or “Battery” (for loss of utility/on battery). The SystemBatteryLevel is simply a percentage (0-100).

If someone with a Secure could give these a look and get back to me, I’d appreciate it.[/quote]

i can confirm that for
“DC” (for utility power)
the string is actually “utility” when powered on and not on battery

also the battery level is returning blank/null
but that could be because its currently powered
that being said, the battery level is always listed within the system even when plugged in
as vera has encorporated some battery management to allow the battery to last longer
they cycle the last 10% so it can go as low as 90% while plugged in

i will see what happens when unplugged and get back to you
however i can confirm there is already a system service/variable called verasecure
and it has an item called battery level
this does work and returns the battery level, wether on dc or on battery
there is also an item called status which currently returns a value of 0
i will see if it returns 1 when on battery
if theese both work you will not need these items under the reactor service

[quote=“charettepa, post:22, topic:199805”]i can confirm that for
“DC” (for utility power)
the string is actually “utility” when powered on and not on battery[/quote]

That’s correct, my bad. The strings will be “utility” or “battery” as appropriate. Forgot I remapped those (I thought “DC” was confusing because battery is DC power, too, ya know).

also the battery level is returning blank/null

I see why. In my match expression to parse it out, I used a JavaScript regex pattern (“\d”) instead of the Lua form (“%d”), so it wasn’t going to match anything and just produce blank results, as you are seeing. If you care, you can pull the current stable branch version of L_Reactor.lua (right-click link, Save as…) and upload it to your Vera (Apps > Develop apps > Luup files). I think that will fix it.

[quote=“rigpapa, post:23, topic:199805”][quote=“charettepa, post:22, topic:199805”]i can confirm that for
“DC” (for utility power)
the string is actually “utility” when powered on and not on battery[/quote]

That’s correct, my bad. The strings will be “utility” or “battery” as appropriate. Forgot I remapped those (I thought “DC” was confusing because battery is DC power, too, ya know).

also the battery level is returning blank/null

I see why. In my match expression to parse it out, I used a JavaScript regex pattern (“\d”) instead of the Lua form (“%d”), so it wasn’t going to match anything and just produce blank results, as you are seeing. If you care, you can pull the current stable branch version of L_Reactor.lua (right-click link, Save as…) and upload it to your Vera (Apps > Develop apps > Luup files). I think that will fix it.[/quote]

i can confirm they now function as you describe