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

I updated to this version last evening and although having to remove the previous version and install the new packages was painful it seems well worth the effort. Much faster and seems to do whatis expected, particularly with Hue groups and Scenes.

Thank you for sharing this code, its been a lifesaver allowing me to use 7 button control switches very successfully with several hue groups.

I have one question - is it possible to be able to save the last used setting s(scene) for a group and then have them set when an on button is pressed. At present I am using one of the buttons as a toggle to switch off and then back on - but to a random color,. If i donā€™t specify a color I get some pretty unpleasant default values it seems.

Again many, many thanks for this upgrade.

If I understand you correctly, youā€™re asking whether itā€™s possible to save the state of a group and then recall that particular state in response to pressing a button on a physical remote.

Yes - you could set up a Hue scene for that group and then have the button press turn on that scene once youā€™ve added it to ST. But that would be a fixed state, rather than the last state. If you want the last state, try using a CoRE Piston to save the state of the group into a variable whenever the group turns on. Then use a second CoRE Piston to reload that state to the group when you press the remoteā€™s button.

Thank you - Iā€™ll give that a go.

much appreciated.

I was playing around a bit with room set-ups in the official Hue iOS app, and I think I borked my Hue B Smart set-up. Half of my groups stopped working, and when I try to re-discover within the smart app it appears to hang with this error in the log:

java.lang.NullPointerException: Cannot get property ā€˜lightsā€™ on null object @ line 1207

Any thoughts?

EDIT - Used the API Debug Tool to see what damage I did to my Groups. I manually removed the associated devices in SmartThings and now Hue B Smart discovery shows my bulbs, scenes, and groups again.

Huh. Do you know what you did to ā€œborkā€ your groups?

I had one Hue bulb completely stop responding to commands from the Hue hub, so I had to delete it and then re-add it manually from its serial number to fix. While I was in the app, I started changing the config of some ā€œRoomsā€ to play with Siri. As part of that, I moved some bulbs out of one ā€œRoomā€ and into another ā€“ not realizing that Room = Group. Thatā€™s when SmartThings started going sideways for those affected bulbs and groups. Attempting to re-discover is what threw that error in the live log.

Got this all up and running and first impressions is its a little quicker so thank you for that.

Just to make sure i understand correctly, with this i could just import the one ā€œreadā€ scene for example from hue and then apply it to any light using core rather than importing 8 different read scenes ect?

Just to make sure i understand correctly, with this i could just import the one ā€œreadā€ scene for example from hue and then apply it to any light using core rather than importing 8 different read scenes ect?

Sort of. You can apply any scene to any group. So, any scene setting can be applied to any light as long as (1) the light you want to apply the scene setting on is part of that scene and (2) the light you want to apply the scene on is part of the group.

You will need to use CoRE (or create your own smartapp) in order to apply a scene to a specific group. Enable expert mode in CoRE settings. Then you will see the setToGroup() and setToGroups() actions in the scene switch actions. I use this to set the lights of a specific room to the scene I want based on the mode that my house is in.

I think i understand now, i could technically create scenes with all my lights in and then use the groups to apply to the bulbs i want to.

Exactly. 10 chars

1 Like

Is the updateStatus() command meant to receive updates form the Hue Hub, or to send updates to the Hue Hub?

Well, I guess Iā€™ll take a step back, right now I am using CoRE to turn on a scene (or scenes) as intended. I also have a Google Home, which I only have connected through Hue directly (instead of through ST).

So, right now, say I turn on a Z-wave switch controlling these lights, I have something like:

IF light turns ON
Using SceneX Settogroup(Living Room Group #)
Using Living Room Group - REFRESH

This seems to do a pretty good job keeping ST and Hue in sync (but its not perfect). Does Updatestatus() take the place of refresh? Should it be used at all? Or is it just meant to be in the background?

Thanks in advance.

Does Updatestatus() take the place of refresh? Should it be used at all? Or is it just meant to be in the background?

updateStatus() is used by the service manager when sending status/state updates from the Hue Hub. I should probably make that function private. :sunglasses:

To force a status update, use refresh()

I feel stupid, because Iā€™m guessing Iā€™ve overlooked some instructions somewhereā€¦ With that said, how do I set this up? I added the smartapp and dths from github. What do I do after that point? I go to the smartapp and it says itā€™s searching for a bridge, but never finds one. I pressed the hue bridge button, but still didnā€™t find it. What are the steps I need to follow with the smartapp and dths? Thx. I really appreciate the help, and hope I didnā€™t overlook some obvious instructions somewhere :).

Could we possibly get a list of functions and how to use them, especially those with parameters? So far I see:

Scenes:
Configure
Push
Turn off
Turn on
applySchedule()
noFix()
quickFix()
setToGroups()
setTo2Groups()
updateScene()
updateSceneFromDevice()
updateStatus()

Bulbs/Groups:
Configure
Poll
Refresh
Reset
Set Color
Set color temperature
Set hue
Set level
Set saturation
Transition to color
Turn off
Turn on
colorloopOff()
colorloopOn()
flash()
getHextoXY()
setHueUsing100()
setTransitionTime()
ttDown()
ttUp()
updateStatus()

For example, I have tried using flash with no parameters, and it appears to change my lights back to white and flash for a few seconds then stop without returning to the previous state. Is there any way to control what color the lights flash or for how long using parameters?

Thanks for all of the work on this. My lights are working much better using scenes and the set to groups function. Canā€™t wait to be able to modify bridge scenes directly.

So I just switched over from the old smartapp (OH My!) to Hue B Smart. Iā€™m using Smartlighting for my light rules

4 bulbs and 2 lightstrips

Iā€™ve noticed that the response time is much improved and also noticed that transitions between ā€œscenesā€ are smoother. I like the changes in the actual smartapp when you bring in your hub, groups, bulbs, scenes, etc.

Hue and ST seem to be in sync one thing I did notice is that I set up a rule using the group instead of the bulbs and strips (Since itā€™s grouped from Hue) and this works for my needs, however, turning off the group didnā€™t seem to update the bulb status until I refreshed it myself. Problem solved by removing the bulbs from the smartapp and therefore ST.

But so far thatā€™s the only thing I noticed.

My instilation is unable to find my hue bridge.

I think it may be due to interference from hue lights and groups and scenes which I have to submit a support ticket to uninstall because it simply wont do so no matter the approach

I tried switching the device type of my hue bridge back to its ā€œstockā€ device type and still nothing, I also tried changing it to the new Hue B smart device type as well as pushing the link button

EDIT: Solution was to delete the hue bridge from My Devices

Which bridge did you delete, the official Hue device, or do you mean just the Hue B Smart device?

Very interesting, and thank you for sharing this. I use CoRE to control all lights using groups, and I have the same issue as noted by a few others, ST take a longgg time to update the status of the lights, which if you then use in forward logic, causes issues. I currently have a piston to refresh all my bulbs every 15 seconds in an effort to keep things in sync - but itā€™s not the most elegant solution. Furthermore, when raising a ticket with ST over the weekend regarding a slow responding Lightify bulb, (integrated direct into ST with native DTH), they looked into my hub and seemed to suggest that the refresh was really hammering it, and might be responsible for my Lightify issue. When I paused the piston that refreshed, the Lightify indeed seemed to respond again.

There could be a few culprits in the above scenario, CoRE, Lightify, however I think that the refresh one is most pertinent to this thread. Perhaps when you control a group rather than individual bulb something is missing that does not force a refreshā€¦?

Best regards,
Nitin

I had the same issue. I tried using the Refresh command but this didnā€™t make any difference. The work around for my lighting core pistons is:

If Motion detected Then
Turn on scene AND turn on Group AND turn on all bulbs in that group

If no motion Then
Wait 2 minutes
Turn off Group AND turn off all bulbs in that group

This way ST is explicitly told that the group and bulbs are on. The trade off here is that the bulbs come on before the scene does so if it can take a few secs for the right scene to come on if the previous scene was different.

I like that, right now I have just the bulbs, and all seems to be working, both from CoRE and SmartLightening. Everything updates immediately - only adverse effect is that rooms come on a bulb at a time. I might try to add it all in the mix how you are suggesting. I guess that when I check the states in CoRE, I need to check the states of all also (for completeness).

At least everything is workable now, and I do not have to have my piston running a refresh every 15 seconds - with a flooded log!

(Turns out the Lightify is still buggy - totally unrelated but forced me to finally get to the bottom of this!).