[OBSOLETE] Hue B Smart (Smart and FAST Hue Lighting)

I am planning on changing to the following:

If motion then
Action 1 turn on scene
Action 2 Wait 5 seconds, turn on group AND turn on all bulbs in that group

This should allow the scene to come on quickly then ST can be updated after. I’ll let you know how it goes…

I only had a single bridge device which had its type set to AP Hue Bridge from my previous instillation of hue lights and groups and scenes

I’ve tested the following in relation to scenes/groups/bulbs turning on/off with motion in CoRE:

  1. Turn on Scene
    Group and Bulb status sometimes don’t refresh in time so the TURN OFF command doesn’t turn the lights off.

  2. Turn on Scene AND group AND all bulbs
    Bulbs come on (1 at a time if there are a lot). If it is a different scene lights come on first, then ~1 second later colour and brightness change.

  3. Turn on Scene AND group
    Bulbs come on all at once. If it is a different scene lights come on first, then ~1 second later colour and brightness change.

  4. Turn on Scene / Second action of Wait 10 seconds, then Turn on Group
    Scene comes on instantly, 10 seconds later status of group updates.

I stopped at number 4 as this works perfectly and I have realised there is little need for the majority of my bulbs to be in ST. I have previously tried things like the Refresh command but it didn’t do the trick, ST still took ages to update the status of the bulbs/groups. By using Turn On even when the bulbs are already on, its forces ST to know the bulbs are now on.

1 Like

@Tino_Race-

This is very helpful. Thanks for posting. I have a couple of questions and suggestions:

In this case, how long was the delay / wait time after which your TURN OFF command was scheduled to occur?

Yeah. There is absolutely no reason to use bulbs AND groups AND scenes. Kinda defeats the purpose of having the groups / scenes.

have you tried using the setToGroup() / setTo2Groups() actions within the Scenes? Each scene can be applied to 1 or 2 specific groups. Although these actions are available within the Scene devices, they are really calling the Group device - applying a specific Scene settings only for the lights in a specific group or groups. I think the group status is immediately updated as a result.

Yup. I have only imported a couple of bulbs into my ST setup - I rely almost exclusively on scenes and groups (mostly using the setToGroup() / setTo2Groups() actions ).

Thanks!

In this case, how long was the delay / wait time after which your TURN OFF command was scheduled to occur?

It varied from room to room. Some were 1 minute, others were 3 minutes. All were less than the 5 minute frequency of the hub refresh.

have you tried using the setToGroup() / setTo2Groups() actions within the Scenes? Each scene can be applied to 1 or 2 specific groups. Although these actions are available within the Scene devices, they are really calling the Group device - applying a specific Scene settings only for the lights in a specific group or groups. I think the group status is immediately updated as a result.

I haven’t tried this yet, but I will test it one of my rooms this evening

@Tino_Race thank you very much for your input. I realise now that I need to redesign a little and your testing really helps to inform that redesign. Thanks!

Duuuuude. Here you go. I hope you abide.

Scenes

push - no parameters
off - no parameters
on - no parameters (in fact, this just calls the push() function)

setToGroup() - 1 number parameter. You can apply any scene to a specific group by calling this action and entering the GroupID number (which you can find on the Group device). As long as the scene controls some lights within the Group you identify in the parameter.
setTo2Groups() - 2 number parameters - same as above, but you can apply the scene to 2 Groups at once.

updateScene() - used by the Hue B Smart service manager to update to the lights and settings for a scene. The scene will adopt the state of the lights as they are when you do this.
updateSceneFromDevice() - You can use this by pressing the “Update Scene” tile or by calling it via CoRE. Just like the preceding, the scene will adopt the state of the lights as they are when you do this.

DONT USE
configure() - used by service manager app to initialize device
updateStatus() - used to communicate with service manager app
applySchedule() / noFix() / quickFix() - these features don’t work yet


Bulbs/Groups:

off / on - no parameters.

refresh - tries to update the status / state of the bulb or light.
poll - no parameters. Calls refresh.
reset - no parameters. used to reset the bulb to the “standard” settings of [level:100, saturation:56, hue:23]

You can test Hue, Level, Saturation, and Color Temperature by using the sliders on the Bulb & Group devices
setHue() - 1 Number parameter (from 1-254). Used to set the Hue (this parameter will be scaled to approximate the 0-65535 scale that Philips uses)
setHueUsing100() - 1 Number parameter (from 1-100) to control the Hue of a bulb or a group. I added it to help control via CoRE because CoRE uses 1-100 and Philips Hue does not.
setLevel() - 1 Number parameter (from 1-100). Used to set the brightness.
setSaturation() - 1 Number parameter (from 1-254). Used to set the saturation

setColorTemperature() - 1 number parameter (from 2000-6500). Used to set the color Temperature of a bulb or light. The 2000-6500 scale is the normal color Temperature scale. 2000 will be a very yellowish, soft temperature (like a candle) / 6500 will be a very white, almost florescent-like temperature.

You can test colorLoop and Flash by using the tiles on the Bulb & Group devices
colorloopOn() - no parameters - will cause a bulb or a group to loop through all colors.
colorloopOff() - no parameters - turns off the colorLoop
flash() - no parameters. Will cause a bulb or a group to flash for 5 seconds.

You can test transitionTime by using the tiles on the Bulb & Group devices
setTransitionTime() - 1 Number parameter. It will set the transition time = (the parameter) x (100 ms)
ttDown() - No parameters. It will reduce the transitionTime by 100 ms
ttUp() - No parameters. It will increase the transitionTime by 100 ms

getHextoXY() - converts Hex codes to the XY color scale. I doubt you will need.

DON’T USE
configure() - used by service manager app to initialize device
updateStatus() - used to communicate with service manager app
setAdjustedColor() - required so that the Smartthings color wheel works.

setColor() - most of the other functions just pass there parameters to this one. It requires an array, which needs some combination of level, XY, Hex, colorTemp, or Hue/Saturation.

transitionToColor() - I think that’s a CoRE action and not one of mine. You don’t need to use it, as you can adjust the transitionTime to you preferences and then change the color.

1 Like

@Tino_Race, @nitin.samani, @thedude130 -

I just updated the Scenes DTH to include turnGroupOn(inGroupID) - which might make it easier when scripting in CoRE ( so you can run all actions from same Scene device ).

Also updated the bulbs, lux bulbs, groups, and lux groups DTHs - general bug fixes, less chatty, etc.

What about White Ambiance Groups?

Sorry, I don’t understand what you’re asking.

Right now there is a DTH for Hue or Hue Lux Groups. I have a bunch of Hue White Ambiance bulbs. When I added a Hue White Ambiance group via HBS, HBS put made a Hue Lux Group, which removed my ability to setTemperature on the bulbs

Hope that helps,

Kristopher

Yes, now I understand, thanks. I don’t have any Ambience bulbs - and thus don’t have an Ambience-specific DTH - but I guess we could force them into the default bulb DTH, which would give you back color temp.

Thanks! I’ll update now. btw: can you please provide me with the github integration info, what should I enter in the relevant fields?

Owner:
Name:
Branch:

It’ll make updating a lot more seamless!

Best regards,
Nitin

I did a pull request days after you released Hue B Smart
Add White Ambiance Bulb by tmleafs · Pull Request #1 · infofiend/Hue_B_Smart · GitHub that adds Ambience bulbs to the app and a Ambience bulb device handler

2 Likes

Since all of the help provided here I have been playing with the best way to update the status of things when changes happen. I started with @Tino_Race advice, thus:

Before I used to use a global update routine like this: (I noticed that if you call refresh on one member of this custom DTH, all will get updated)

Finally I decided that having everything refresh every 15 seconds laborious on resources, and also sometimes 15 seconds is not fast enough, so instead I settled on this:

This way, if any groups are touched, whether from CoRE, SmartLighting, button controllers, or anything else, then I can ensure that the status of bulbs are kept up to date, (in order to use their state for any other logic).

Best regards,
Nitin

1 Like

@nitin.samani

The Github repo is Infofiend / Hue_B_Smart / master

@infofiend thank you sir.

I noticed the HBS DTHs declare color temperature as “colorTemp”. I believe ST defines this capability as “colorTemperature” instead.

Thanks. I’ll change that.

1 Like

Just updated to the new DTH. Less chatty is nice. :slight_smile: