Feature request: Also, execute the following Luup code

Is it possible to add the option to execute Luup code upon switching a virtual switch ON or OFF?
This would eliminate the need for extra scenes that only do just that when a virtual switch change state.

Thank you for all the good work @rigpapa

would be nice but reactor is probably what u want

Scenes would be so easy if Vera hadn’t decided that looking at a scene out of the corner of your eye, or thinking too long about its name was cause for a Luup reload. Just this morning I disabled my “Holiday Lights” scene by clicking on its “power” button in the UI and of course… Luup reload. Change the name of a scene? Luup reload. Go in to edit the scene… Luup reload. Go in and don’t edit the scene… Luup reload. It’s a bit over the top, and it’s what made me add “Activities” to Reactor in the first place.

Imagine, if you could just go into a scene, slam in a new device action, change the order of a few actions, manipulate the Lua a little, then “Save” and go straight out and try it in just a few seconds, no waiting. If I can do this in Reactor, they can bloody-well do it in the core. There’s only one circumstance (notifications) where Reactor requires a reload on a config edit, and that’s because it must use a scene to do its work and therefore is subject to Vera’s rules for making the changes effective.

Hopefully this goes better in the new firmware (and just so I’ve said it, if the new firmware’s answer to this is that it reboots faster… F-I-R-E-D!) :laughing:

4 Likes

I feel you :smile:
Even though Reactor seems to be the best thing ever happened to Vera it seems a bit overkill for this purpose alone. I’m trying to keep my Vera as bare metal as possible considering the limited resources, and hopefully a not so complex, future migration to the new firmware.

If there is no need for you or others to implement this, I can survive with my current setup for a while. If I eventually drown in scenes and reloads, count me in as a happy Reactor user.

I have used PLEG to do something similar. I have a VS that triggers a true/false condition that fires actions that uses LUA to send a command to Blue Iris to arm/disarm my cameras. Reactor should be able to mimic that, unless I misunderstand what the OP was asking.

I think you should bite the bullet and accept that vera needs a boost to their logic engine. In my opinion, Pleg insulated me from many of the prior firmware weirdness because so much was running in pleg and not luup.

1 Like