Sylvania Smart bulb RGB help


#1

Alright I’ve made numerous pistons with these Sylvania bulbs and never had a issue. I recently just installed 2 into 1 light fixture in my kitchen and im trying to create a piston that basically when the “kitchen light switch” turns on it sets both bulbs to a color temperature of 5000k.
This works as described most of the time if I turn the light on with the switch however when I use the app or a routine to turn the Kitchen light switch on the bulbs will come on, both go to 5000k and then few seconds later ~10 bulb number to kind of does it own thing with most of the time it turning blue. For the life of me I can’t get these bulbs to just sync.

I essentially want bulb 1 to be the master and bulb 2 to follow. ive created numerous HSL commands for bulb 1 and bulb 2 to follow and they work.
Ive created commands for if bulb 2 changes for it to change back to bulb 1 settings. however with Webcore seeing Color temperatures and HSL separately its leaving me stumped.

below ill attach the screenshot of the piston.


#2

The general rule of thumb that I follow is to choose one of the following:

  • With ‘Smart’ switches, I use ‘dumb’ bulbs
  • With ‘dumb’ switches, I use ‘Smart’ bulbs

If you use ‘Smart’ switches with ‘Smart’ bulbs then you are effectively making your smart bulbs dumb whenever the switch is off. (plus, it takes a few moments for the bulbs to reconnect to the network once power has been restored)


Pro Tip:
Also keep in mind that you have 9 triggers here, so if any of those events comes into the hub, then this piston will run top to bottom each time!!


#3

yeah ive used these bulbs elsewhere with smart switches and never had a issue. they normally turn on to what ever they were on when you shut them off but this one new one is giving me all kinds of issues.

I think what I want to do is basically if the kitchen light switch turns on then wait 15 seconds and run color temperature setup but can’t figure out how to factor in a delay basically so the lights can reconnect to the network.


#4

This part sounds easy.

IF switch changes to on
Then
    Wait 15 seconds
    Set bulb's color etc
END IF

It is also possible to make bulb 4 match bulb 5…
OR
to make bulb 5 match bulb 4…

… but a real pain in the butt to try to do this both ways.

It is infinitely better if you designate a “master” and let the other bulb be the “follower”.


And one last note. If you are using Hue & Saturation, then you can delete all code related to color temps. Alternatively, if you are using color temps, you can delete all code referencing Hue and Saturation. If you try to keep them all in, you will find that most bulbs will contradict, and you will often be left with the wrong color/shade.


#5

I would love to make bulb 4 the master and make bulb 5 follow but it seems it gets weird because the Sylvania bulb doesn’t see color it adjust by hue and saturation and color temperature and as far as I’ve seen theres no way to make it always match if that makes sense. I set separate commands to match HSL and Match Temp and which command is last is the one it does so if I switch bulb 4 to blue it’ll change bulb 5 to blue for a second then revert to the temperature of bulb 4 which might be 5000k even though the bulb is displaying blue color.


#6

Yes, this is why I was suggesting dropping all references to color temps.
Just use HSL and the blue should ‘stick’.


#7

so instead of setting the “On” to color temp 5000k find a HSL combo that is close essentially and make it that?


#8

No. You can safely force a color temp anytime in any piston. (line 17-25 looks good)

What I am suggesting is removing any mirroring (master/following) using the color temps.
(IE: Delete lines 41-58)

This way any programming logic is based on the HSL.


#9

yeah I got that much of it but thats where it gets tricky because the bulbs do one or the other. I need bulb 5 to just mirror bulb 4 all the time.
I was trying to figure out a way to essentially like ping bulb 4 periodically and if there different then change bulb 5 to what ever bulb 4 is because it seems that a lot of times on “turn on” bulb 4 will go to a temperature and bulb 5 will follow for about 10 second then bulb 5 will change to a random color on its own like blue.


#10

One decent hack is you can use programming logic to match the HSL… (as talked about above)

On the occasions where you want a colorTemp used, let that piston simply send the colorTemp command to both bulbs. (without mirroring them)

This gives you the best of both worlds (unless you manually slide the color temp on bulb 4).


#11

One thing that I have noticed in the past with many bulbs is:

Changing the HSL does not necessarily change the colorTemp
—and—
Changing the colorTemp does not necessarily change the HSL

Because of this, mirroring both HSL and colorTemp is ultra tricky…
(the numbers often contradict each other)

How is webCoRE supposed to know which numbers to look at, and which to ignore?!?

If it looks at all of the numbers, then you may get the right match for a moment, before the other numbers come along and ruin the shade.


#12

yeah thats my issue and wasn’t sure if there was some fancy way to get it to just mirror all the time. I tried using the color manager app by SmartThings and it works very well however it only mirrors changes made by the user so if the bulb changes colors on its own then it won’t correct it.

thats why I wasn’t sure if there was some way to like ping the device and copy it to the other bulb essentially.


#13

Yes, you can ‘ping’ the device, and match whatever is found…

But how will you determine whether to use the HSL or the colorTemps in any given moment?
(you can’t use both, as you’ve discovered)


#14

yeah that is true I guess!


#15

I try to let my pistons do most (all) of my heavy lifting… The only time I manually play with colors or colorTemps is when I am trying to add a new setting to a piston. Once I get it right manually, then webCoRE can return to that at any time in the future, with no mirroring necessary.

How often do you manually play with bulb 4’s colors?
How often do you manually play with bulb 4’s colorTemp?


#16

I essentially never play with the the color temp. I really just want them to be 5000k when my wife comes home and turns the switch one.

as for color thats kid of a random thing here and there as I have about 6 of these bulbs right now. more of a toy then a useful feature lol


#17

Oh perfect!! That is the best possible answer!!!

Here is my suggestion then:

In the piston that welcomes home the wife, just add this line:
With Bulb 4 & 5, set colorTemp to 5000k

In the mirroring piston, mirror bulb 5 to match bulb 4 using only Hue, Saturation, and Level.

The best of both worlds!!


#18

what the easiest way to write a mirror command then for bulb 5?


#19

Your lines 26-40 looks pretty good to me

The only time this may cause issues is if you are using colorTemps and change the level.
(but you can drop the level from the lines above if you want)


#20

A slightly more advanced version could split hue/sat from the level:

IF Bulb 4's hue changes
   or
   Bulb 4's saturation changes
       Then
       Set bulb 5 hue to bulb 4 hue
       Set bulb 5 sat to bulb 4 sat
END IF

IF Bulb 4's level changes
       Then
       Set bulb 5 level to bulb 4 level 
END IF

This method keeps the level changes with colorTemps from messing with your H&S