Are there scenes?

@wackware

I’m not into scenes but could imagine setting music and volume (Sonos?), turning on specific TV channel and/or Blue Ray (assume Logitec Harmony integration).

P.S. Good to see you back on these forums.

Hmmmm, sounds doable. Grab capabilities, attributes and states of selected devices, store, and then create virtual child device to replay them on device tile tap.

P.S. thanks, I had a big house project that required too much time.

The issue here is not what I want. If scenes are done properly, any stateful entity can be a added to a scene. It can be a thermostat, a music player, a door lock or even another scene. The Scene object is merely a container and should be agnostic of the device type, as long as it provides save state and restore state methods.

1 Like

This is needed in other SmartThings apps. When a light is triggered by motion at 10%, it would be nice to return it back to 100% so the next manual use is logical. After Sonos blairs out an alarm at 100%, the volume needs to return to the previous volume not to blow you out of the house next time. Seems that this concept should be native and not need special error prone coding.

I think I’m finally understanding the real advantage of scenes that I’m sure you scene advocates have known all along. The real strength is popping out of the scene.

1 Like

It is needed everywhere throughout SmartThings. Think of the Hue integration. The overwhelming majority of apps only know they are capable of on and off. We need some kind of auto-enumeration of input capabilities that is provided by the device type. That way if I input a Hue as one of the lights in an app, it is “smart” enough to know its settable states and show them to me.

It seems to me this was at the heart of SmartThings initially but has gotten lost in some integrations, forcing app specific incarnations to fully support them.

1 Like

I agree with this, @geko, and I think you’re later comments about scene machine trying to be a fill-in is a perfect example of how ST can close this gap: There are plenty of developers who’ve written programs that will help fill in the holes, but to the best of my knowledge they haven’t worked out the process totally yet for these programs to get into the hands of average users easily.

Yeah, we can post 'em here or on Github or share them in the IDE, but that still requires more steps then the ‘average joe’ is going to want to do. The non-technically inclined person is going to want to just pull up the program in their mobile app and install/run it.

2 Likes

I’m glad I was able to convince at least one person. :slight_smile:

Yes, scenes are very simple, yet powerful concept. And the fact is that it’s not that difficult to implement. In SmartThings terminology, all that required is a generic “state” capability that implements two commands - save() and restore(). Save returns a map of attribute/value pairs that a scene manager can save and restore() takes this map as an argument leaving it up to device handler how to restore itself. It’s called “polymorphism” :smiley:

I think @geko is pointing out a fundamental architectural limitation with SmartThings. There needs to be a method to group devices, store their parameters (on/off, values i.e. temperature and dim level), change them and then pop out. The development environment needs this concept to be native so it is easy and natural for a developer to do it the correct way.

I think Hello Home was an attempt to create such a state model but it is limited by its mutual exclusive nature among others.

It may be a simple concept but I can see issues implementing. My two examples of dimmed lights on motion and Sonos alarm return to previous state when complete. This is quite simple because the state has a finite period. But what about home theatre scene? What pops it out; a manual switch? And do you allow devices to overlap scenes or can devices ONLY be in one scene at a time? Seems you need to be able to stack scenes so an alarm scene can pop off and reveal the home theatre scene that was pushed on earlier.

1 Like

I’m afraid you’re overthinking it. A scene is simply a collection of captured states of all devices included in a scene. It cannot be “undone”, but it can be replaced with another scene. And that’s were the power is. With the scenes and a rule builder, you can create a complex, yet manageable graph (a state machine) to completely automate your home. And yes, any device can be included in any number of scenes.

On the UI side, a scene is represented simply by a push button (a tile) with a label. It’s not a switch, again, because a scene cannot be “turned off”.

1 Like

Yeah, on the UI side it should be pretty easy… just a momentary button tile to activate a scene.

The idea of turning off a scene is interesting though… I know we’re going beyond what a scene is really designed for, but the idea would be to save the current state of all devices in the scene, then activate the scene. When the scene is turned off, it would revert all the devices to the previous state.

In theory it would be do-able… use and on/off button tile to turn on/off the scene. When a new scene is activated it turns off all virtual tiles used for other scenes.

That said, I’m having a hard time envisioning a practical application for such a setup. Especially if you start “stacking” scenes. If go from scene A to scene B, should scene B record the state of device-X when scene A is active? Or should it record the state of device-X after scene A shuts down? Could get messy for the end user fast.

1 Like

I’m sure you are correct here.

But it seems like it needs some sort of stack type logic. Take the alarm case; the code to flash lights and blair a siren should just pop off the stack when complete and return to the existing state (scenes).

1 Like

Yes, correct, but this is outside of the scope of the scene. You’re talking about sequencing logic here. But you cannot implement it efficiently unless you have a scene as a “first class” object.

See my response to @beckwith, you’re talking about a simple state machine (or a sequencer) here that has two scenes and uses a switch as an input.

Yes, this can also be accomplished with “transitional” scenes that a created dynamically and destroyed after they’re used.

1 Like

Geko perfectly described what scenes have always been with the home automation systems I’ve used for the past 15 years.

Ed Pope, I tried to take you up on your challenge to get more into the guts of ST, but I hit a road block pretty much from the start. I’m able to get into the IDE, but I have no idea how to install an app. The online instructions mention that I need to go to a “My Apps” section, but I see no such section anywhere in the IDE interface.

@Dignan17, let us know here what you are trying to do. And we can help you with the issue. The My Apps section is under the ST App that is on your smartphone. I am thinking you are looking for the MY SmartApps section under the IDE.

Once you are there hit new smartapp on the right side. Type in Test for the name and Test for the description and hit create. Then just paste the application into IDE, overwriting the current code that is there (this is just a basic starting point for people). When done, hit save and if all is well, then publish. This will publish the App to your account.

You may have to exit the SmartThings App on your device and come back into it, in order to see the new app.

BTW, I am very interested in where all this scenes talk is going. I see how it would be neat to have the ability to save the state of certain devices to create a scene. Otherwise just use a standard default state, unless you are currently using a scene. I do see the neatness of this idea.

The ST has the Away, Back Home etc. But those just change a status, and while many of the things you want can be handled through them, it would be more flexible to do it with scenes.

Is there a way to poll for all devices on ST? Then to get current status? If so, this should be easy to do.

The IDE tutorial is here:
https://support.smartthings.com/hc/en-us/sections/200174500-Developer-Maker-Introduction

The documentation constantly refers to a “My Apps” section in the IDE, so that’s what I was looking for. I looked on the phone too, but don’t see it anywhere? Where is it supposed to be?

edit
Aha, finally found the link I was supposed to click on to get into the developer tools. I suspect that if you’ve clicked on this in the past, you forget that you once needed to. I had been going in circles trying to get to that point. From there I was able to install an app and get going.

Congrats sir. Sorry I could not answer you earlier, I was doing my dialysis session,