The Vera Community forums have moved!

Advanced => Plugins & Plugin Development => Programming => Alternate UI to UI7 => Topic started by: RHCPNG on October 17, 2018, 10:44:02 am

Title: Scene as trigger for another scene
Post by: RHCPNG on October 17, 2018, 10:44:02 am
Hi guys,

I was wondering, is it possible to use a scene as trigger for another scene? I know there are workarounds for this, but I?m still curious. I couldn?t find an answer to this question.

Thnx.
Title: Re: Scene as trigger for another scene
Post by: rafale77 on October 17, 2018, 12:54:16 pm
There is a code I have implemented and pushed to openLuup and AK has accepted which does something similar: have an action in the scene editor to run another scene. I am not sure how this could be implemented on a vera.
Title: Re: Scene as trigger for another scene
Post by: rigpapa on October 17, 2018, 01:18:42 pm
Hi guys,

I was wondering, is it possible to use a scene as trigger for another scene? I know there are workarounds for this, but I?m still curious. I couldn?t find an answer to this question.

Thnx.

I have many scenes that run (trigger) other scenes. For example, almost every room of every floor of my house has an "off" scene to shut everything down in that room. I also have a "level off" scene for each floor that runs the off scenes of the rooms on that level via a series of action calls in scene Lua.

Code: [Select]
luup.call_action( "urn:micasaverde-com:serviceId:HomeAutomationGateway1", "RunScene", { SceneNum=xx }, 0 )
luup.call_action( "urn:micasaverde-com:serviceId:HomeAutomationGateway1", "RunScene", { SceneNum=yy }, 0 )
luup.call_action( "urn:micasaverde-com:serviceId:HomeAutomationGateway1", "RunScene", { SceneNum=zz }, 0 )
return true

Not sure what other workarounds there may be, but that seems to be the most direct approach.
Title: Re: Scene as trigger for another scene
Post by: RHCPNG on October 18, 2018, 10:10:59 am
Thanks both! These are great solutions. Especially the action for a scene in openluup.
Title: Re: Scene as trigger for another scene
Post by: amg0 on October 18, 2018, 10:54:24 am
Thanks both! These are great solutions. Especially the action for a scene in openluup.
see http://forum.micasaverde.com/index.php/topic,33308.msg419873.html#new
the runscene upnp action

the advantage ( when I have time ) is that it shoudl work in mutlicontroller mode, so runscene('1-123') should be valid ( but I have not coded that yet )