Hello,
Is there any way to make a scene that can turn some lights on AND in the same time run another Scene?
Example: I want to create a scene called “Sunset”. At the sunset I want to turn on the porch light and to run the “Close blinds” scene.
Thanks,
You have to do this from LUA:
luup.call_action(“urn:micasaverde-com:serviceId:HomeAutomationGateway1”, “RunScene”, {SceneNum = YourSceneNumber}, 0)
Thank you. No other way to do it, except lua?
You could look to use triggers to turn scenes on?
You can create them to look for certain things to change and then run a scene.
PLEG allows you to run scenes using the advanced tab. Just use any PLEG device and look for the RunScene action.
Another way you can do it without Lua is to use a virtual switch. Your Sunset scene turns the Virtual Switch on, and your Close Blinds scene is triggered by the Virtual Switch turning on. (At some other time, say, midnight, reset the switch back to off so it’ll fire again tomorrow.)
The boilerplate Lua that Richard gave you is the simplest option.
Very good ideas. Thank you all guys for the help.
I will go for lua code - seems more flexible although the virtual switch idea is clearly more easy to implement
.
Any reason why I should use PLEG over lua?
Where is the run scene option? I have been looking for this and have never found it. I go to action and advanced and only see options for devices. Never for scenes. My pleg is current
In the Advanced Tab for actions …
Where it says Pick a Device, Select your PLEG Device, the ADD.
Then where it says Please Select, Select RunScene. Then specify the name of the Scene (case and space sensitive) or the scene number.
Found it… Thanks for that.