BETA call for superState scene app (all better now!)

I am running into a problem where I trigger a virtual switch on motion to set the scene. At times transitioning from one scene to another the hue bulbs don’t all change.

Example:
Mode Night on Motion trigger virtual switch one
Virtual switch one has 3 bulbs (1 white brightness 10%, 2 pink brightness 10%, 3 pink brightness 10%)

Mode Awake on Motion trigger virtual switch two
Virtual switch two has 3 bulbs all are white with 80% brightness

When mode switches from Awake to Night and motion is detected, only 1 or 2 of the bulbs actually change to the settings of virtual switch one.

Has anyone experienced that?

1 Like

The ability of this app to control hues is reliant on the hue ST integration, which at best is currently flaky.
I know they’ve been working on the hue integration, but to be honest there’s probably so many different versions that folks are using, its even harder to say if it’s gotten better or worse.

This is another reason this APP has not progressed out of beta…

2 Likes

I figured as much. Thanks for the reply

So I have a virtual switch that is supposed to be turned on and off with a hello home action. More often than not the scene does not change when I expected. I emailed support about this and they’re denying me help.

“Since virtual switches are user created and aren’t officially supported by SmartThings, there’s not a whole lot we can do on our end. If you go into your custom SmartApps in the IDE and look at the code, it should tell you who the author is and you can look him up in our community and ask the creator some questions about what’s going on.”

I know you’ve stated the problems with hue and smartThings before, but I am at the end of my rope with smartThings support. Any idea why this fails? Can you give me some pointers on how to trouble shoot this so I can force the support staff to help me?

1 Like

@Keo, does the scene work correctly when you use the virtual switch via the app?

Yes the switch works in the app, it’s only when the mode change is supposed to happen. When the mode change fails to trigger the switch, I can go into the app and see that the virtual switch is turned off. Pushing the switch corrects the problem mostly. Sometimes only 1 or 2 of the 3 bulbs change to the color and brightness the scene is set to. Multiple on/off presses and the scene finally corrects itself.

I’d also like to add that I look at the log and can see that the mode change isn’t even attempting to turn the switch on. If I change modes a few times, eventually I see an activity entry that says “I also set the [insert switch name here] to on”

To get Tech Support to acknowledge the problem, use a real (supported model) Switch instead of a Virtual Switch.

good point @tgauchat, @Keo see if your mode change will properly activate a real switch, if it doesn’t then support should be able to help you. Once it runs a real switch correctly, then replace that with the scene VS.

2 Likes

this app sounds really interesting. I have a full house of lifx and can’t even use ifttt to set scenes. Only via the app - so it sounds like i’ll be able to use this app to do just that… looking forward to trying it out.

I’ve not tested it with these bulbs, but have a go and let me know.

I did just as you said and after removing and adding my hub back, things appear to be working. I installed superState again, and when I trigger the virtual switch only one bulb turns on. This is the error I see in the log:

34e01438-dc80-4e4f-bb19-a3722c1ff555 3:50:53 PM CDT: error java.lang.NullPointerException: Cannot invoke method toInteger() on null object @ line 442
34e01438-dc80-4e4f-bb19-a3722c1ff555 3:50:53 PM CDT: info cmdHandler- g1s1 on request
34e01438-dc80-4e4f-bb19-a3722c1ff555 3:50:53 PM CDT: debug getChildDevices(false), children=3
34e01438-dc80-4e4f-bb19-a3722c1ff555 3:50:53 PM CDT: info cmdHandler- scene:g1s1 name:switch value:on cmd:on
34e01438-dc80-4e4f-bb19-a3722c1ff555 3:50:53 PM CDT: error java.lang.NullPointerException: Cannot invoke method toInteger() on null object @ line 442
34e01438-dc80-4e4f-bb19-a3722c1ff555 3:50:53 PM CDT: info cmdHandler- g1s1 on request

Ok. I just changed the color from the ST hue bulb color wheel and the saturation was set. I am not sure why it wasn’t set before. Everything is working.

My use case for this app would be:
Scene is turned on but the actual light state are not changed (if they are off - they remain off). When the light turns on via motion later on - the scene colours will be used.

Seems like it captures the current state and you can’t modify it to not change the on off state. But other than that works nicely tho it didn’t change my bulbs colour when i wanted it to remain off

If you include a light in the scene, and that light is off when the scene is captured, activating that scene will turn the light off if it was on, or do nothing if it was already off.
I think you can do what you want by creating two scenes, one of which is triggered by the motion detector.
Regarding colors not changing, hue colors need to be set with the ST app (so ST has the current color settings), as the hue to ST change notification is slow/intermittent.

I created a scene with 8 devices and set the state of each bulb with ST. When I snap the superstate the device lights to “on” then immediately switches “off”, and all 8 lights switch off. When I next click the device to activate the scene only one of the 8 bulbs actually illuminates. It is the same bulb each time. No matter what I try all 8 bulbs turn off when snapped but only the one bulb will turn back on with my chosen scene.

@pd_, couple of questions:
For the bulbs that do not turn on via the scene switch, do they retain the colors you set when activated by the bulb device?
What kind of bulbs are those that do not activate via the scene switch?
Another thing you could try is less bulbs in the scene as a test.

The state of the scene switch you describe when going through the snap cycle is working as expected.

This app hasn’t progressed past beta as It’s a bit too intensive (slow) using V1 hub.

I don’t know what failed my first few attempts, but I reset each bulb once again and found it working. Thanks for the smart app. The bulbs were all Hue by the way.

This happens to me quite a bit. I really love the app, but the slowness and inconsistency of the ST hub has made it very frustrating to integrate hue bulbs.

@Mike_Maxwell - Will this app work on V2?

1 Like

@Keo
There’s two issues that conspire to make this app marginal currently:
–Cloud latency and execution time limits, these should be resolved with V2.
–HUE -> ST device updates, since HUE relies on polling to update ST, this forces the user to set the HUE’s with the ST device, which is less than optimal.
This app should rock on V2, but since I don’t have one, I can’t say for sure.

2 Likes

Hi

I’m using this app and think it’s great. Thank you so much for sharing!

The only issue I am having is that the device doesn’t seem to be capturing me the colour for my Osram Lightify bulbs. When I switch the device on, it just turns on the lamp and goes to the last colour it was set to. I have set the colour using ST, not th Lightify app.

The bulb is set up as a ‘Zigbee Hue Bulb’.

Many thanks for any help.