Is there a way to use a PLEG Action (Advanced) to set a variable in a Variable Container plugin to set, say, “Variable2” to the current timestamp (the equivalent of os.time())?
One way would be to
put the Luup to populate the timestamp into Variable Container into a scene.
Record the scene number.
In the advanced tab of your PLEG action, you can select PLEG as the device, then add it and select Run A Scene.
PLEG will execute that scene with the Luup.
[quote=“Bulldoglowell, post:2, topic:179473”]One way would be to
put the Luup to populate the timestamp into Variable Container into a scene.
Record the scene number.
In the advanced tab of your PLEG action, you can select PLEG as the device, then add it and select Run A Scene.
PLEG will execute that scene with the Luup.[/quote]
True. Trying to avoid running it as a scene though (am currently using scenes, etc and they’re a PITA when it comes to Luup/Lua restarts. PLEG handles that more gracefully, IMHO.
understood, but this scene would only execute as a result of a condition within PLEG, so the scene bridging a Luup restart would only be a factor if vera restarts the precise moment that this scene is run.
a scene populating a variable would execute in milliseconds.
You could use the # operator recently added to PLEG to get the timestamp of the Condition as an argument for the action. Something like:
Conditions
DoVC
Actions
DoVC VariableContainer SetVariable1 newVariable1={(#DoVC)}
nice