Premise Scene's and Set-Restore behavior

Motorola Premise

franky

Member
There are a few problems I run into with scenes when using the Set-Restore and I wonder if anyone has dealt with this and found a simple solution. I'll describe it in terms of a simple scene that turns a light on while playing.

First, if Premise restarts while a scene is playing, it seems the scene forgets the original state of the the light. So when the scene stops the light is not turned off. Second, if the something (a person) directly turns the light off and on while the scene is playing, then again the scene forgets the light's original state and doesn't restore it. (This might be intended design. Maybe it makes sense for the light to now be consider under manual operation instead of under scene control.) Finally, I suppose I usually don't even really want a "Restore" exactly. Instead I want the light to definitely go off when the scene stop no matter what the original state was.

I can imagine making all this happen a couple different ways. For example, instead of one scene to do this I can have two "Set" behavior scenes, one to set the light on and another to set the light off. But now I have twice as many scenes to manage and I don't get the nice "Playing" scene state UI to show up in the browser. Another solution might be to have scripts that run when the scene's Play state changes and set my light property in that script. But this is much more tedious than the builder's UI for creating scenes.

Does anyone else experience this sort of problem? Do you have any creative solutions?
 
I think you've described what everyone has experienced and the lack of replies indicates no one has developed a neat solution. If a light is already on when a Set-Restore scene begins, it will be left on when the Scene ends because it has been 'restored' to its initial condition. That's not how I want a Scene to work but that is how they do because they allow for layering of Scenes. I read somewhere about scene-layering (something about a Play Movie, or Music, scene being suspended by an Answer Telephone scene or thereabouts) that demonstrates a scene's power to restore devices to their initial state after a series of changes that would cause you headaches if handled via scripting. However, it represents a level of sophistication I've never employed.

I like Builder's visual depiction of a Scene and the flexibility Scenes offer. However, I too would've preferred a simple ON/OFF mode that works regardless of a light's initial or interim conditions.

I've also considered using two Set Scenes (one to turn a device on and the other to turn it off) but it is clumsy when viewed in Builder and just 'feels wrong'; it's a kludge to overcome a design feature that doesn't bend to my will.

I recall reading someone's solution, to scheduling events, was to create a new class. He extended the Room class so that it would allow scheduling of all lights within a room. I only read about his solution and never saw any code posted. It was innovative but it seemed to me that there'd be no way to see all schedules in one place (each room held its own separate schedule).

Here's a gotcha I discovered the hard way. I have a Timer that runs an 'AllLightsOff' script at 11:00 PM. The script iterates through Premise Home and turns everything off, using the SetValueForced method, except our Porch lights (that are driven by a Scene). What I initially overlooked to do was have the script stop any running Scenes, like my Evening scene which runs until 11:30 PM. So here's the scenario:
  1. Lights controlled by the Evening scene were manually turned on before the Evening scene started.
  2. The Evening scene started at 7:00 PM
  3. At 11:00 PM, the AllLightOff script turned off the lights.
  4. At 11:30 PM, the Evening scene stopped and restored the lights to their initial state, namely on!
  5. !@?%$!? is uttered by me.


Something I've been meaning to try (but haven't found the time) is to simply add a PropertyChange script to a scene that fires when Play = false. It would iterate through all members of the scene and set them (using SetValueForced) to the state I want. Regardless of what 'Restore' does, the script would have the final say. Still a kludge but at least it doesn't feel as awkward as having separate 'set-on' and 'set-off' scenes and Scenes continue to look tidy in Builder.
 
Okay, well I guess it's good to know I'm not overlooking something obvious. If I come up with any ideas that seem generally reusable I'll post it.
 
It's a shame we don't have access to the source code -- would be nice to create a new "Scene Behavior" option called Set-Unset to go along with Set and Set-Restore...
 
Back
Top