Hi i am newbie in lua and luup programming. I have been reading luup in wiki.micasaverde and stumbled a section ‘luup for scenes’, where there is a flow chart explaining the general idea of scene program flows. But i still have some doubts understanding it. Maybe you guys can help me out.
I cannot find luup events in scene, but i found triggers. Is it the same thing?
If it is the same thing, there can be many events in one scene (assumption from the chart drawing), but i can only make one trigger in one scene. Is there a way to do multi triggers in one scene?
-And to clarify one more thing, the ‘main luup’ on the chart is the luup tab, not the luup in the trigger section right?
thanks
Indeed the terminology is confusing and not used consistently, so I understand your difficulty.
Triggers are not events, but something a bit different. However, in the context of triggers and scenes in that diagram:
[ul][li]'Event Luup’is set under the trigger Luup tag[/li]
[li]Scenes can have any number of triggers, any one of which can possibly start the scene running[/li]
[li]‘Main Luup code’ is indeed set under the scene Luup tag[/li][/ul]
Any trigger code, or the scene code itself, can abort the running of the scene by returning ‘false’.
What people complain about most is that in this construct you can’t, at the UI level, define a combination of states being required before the scene triggers. This is why the plugins like PLEG and CombinationVirtualSwitch were written. However, there is a deal of confusion about events and states. I share many of the sentiments posted here: (point #3 of most relevance in this context)