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

Its really impossible to say without seeing IDE logs. But if neither HueREConnect not Hue B Smart are able to read your scenes & groups correctly, I would venture to say that the problem lays with your Hue setup.

How did you create your scenes & groups? Have you tried using the Hue CLIP tool to see whether they are properly saved on the Hue Hub?

I installed this for the first time today and had what looks to be the same problem as @bozjan. I solved it by adding the hitting Done even though it found no items on the hub, then opening the bridge device it created, clicking the gear to see the preferences, then clicking Done without changing anything. Now go back to the hub and the search found all of my bulbs/scenes/groups.

@infofiend: To diagnose this I added logging in a few places and found that state.host and state.userName were null when the bridge’s discoverItems() function was called. It looks like this already should have been set by initialize() when called from installed(). The documentation on the state object suggests it does not write until the end of execution: maybe there is a timing problem there or something. Whatever the issue was, it worked for me after I did the above. Though, the items were added as generic names (“Hue B Smart Scene”, etc) rather than their names from the hub. I can rename them, but that seems odd.

Anyway, thanks for your work on this!

Thanks Steven! I’ll look into it. I’ve noticed a couple other very weird state issues recently (in other apps), so I’m not sure what to make of this. It was so stable for a long time…

In the section of the SmartApp adding the scenes (same with other types), it looks like the child devices are being added from the “name” property:
“label”: s.name

And it looks like the correct property is “label”:
“label”: s.label

Now the devices are added with the correct names.

Thanks!

Bridge dth version 1.1. Github isn’t telling me there’s a newer version. Is that the latest?

Wait - you’re saying that none of the devices were being added with the correct names? Or just your scenes?

Correct: I added groups, bulbs, and scenes and they all added with the type name as their device names. After I changed the code to use the label property (which was actually already used by some of the code like the debug logging), then the names added correctly.

In case there is any confusion, I had never used HBS before today and I installed it via the Github integration in the IDE, so this should be the latest code for everything.

Its definitely the latest code - I see it on my setup. The puzzling thing about this is that its been working this way since the beginning. But thanks for the help - I’ll update smartapp on GitHub.

Happy to help. And happy to have HBS set up now. Thanks!

I had to re-setup Hue B Smart. I removed everything. Setup the smartapp and it found my bridge but it won’t discover any of my bulbs, groups, scenes or anything… What can I do? Do I have to delete and re-add?

WAAAAIIIIT a minute - exactly what lines of code were you referring to? Some of the code (e.g., line 503) properly refers to the “name” attribute of the scene on the Hue Hub.

@smknight @Stacy_Butera -

Are you using iOS or Android? Is anyone else experiencing this?

Android here

So I just remembered that ST moved Hue stuff to discover locally. After setting up all the device handlers and smartapp, I then went back into the “things” and ran add a new thing … picked up my bridge and once added went back into HBS and all my groups, bulbs, and scenes popped right up.

So I noticed that when adding my groups and scenes the name didn’t get imported from Hue. Even when I ran local discovery.

Came up like that. I manually changed the name of my groups from within ST. They lag when picking up if the lights are on and off now.

Logs show this:

2421a588-d53d-46ac-9e5e-333347aec04a 2:47:28 PM: error java.lang.NullPointerException: Cannot invoke method updateStatus() on null object @ line 328
2421a588-d53d-46ac-9e5e-333347aec04a 2:47:28 PM: debug GROUP: devId = 001788281D07/GROUP6
2421a588-d53d-46ac-9e5e-333347aec04a 2:47:28 PM: debug k = /groups/6/action/transitiontime, split1 = groups, split2 = 6, split3 = action, split4= transitiontime, value = 4
2421a588-d53d-46ac-9e5e-333347aec04a 2:47:28 PM: trace [/groups/6/action/transitiontime:4]
2421a588-d53d-46ac-9e5e-333347aec04a 2:47:28 PM: trace parse()
2421a588-d53d-46ac-9e5e-333347aec04a 2:46:43 PM: error java.lang.NullPointerException: Cannot invoke method updateStatus() on null object @ line 328

I unwittingly did this trying to add a new Lightstrip I installed this weekend. It just would not stop scanning or finding the new device, so I finally just hit done.

When I did finally see the new Lightstrip, it had a generic “Hue B Smart Bulb” instead of picking up the actual label I gave it in the Hue app. I manually changed it to match, and everything seems to work.

But there is definitely some sort of bug that has hit recently since I didn’t have this problem with the bulb names before.

I don’t have it in front of me at the moment, but I looked for each occurrence of AddChildDevice (or similar name), then if it was passing
“label”: [device variable name].name

then I changed it to
“label”: [device variable name].label

I did not take note of whether it affected all types or all lines of code where name was used, but I observed the generic names created when I created bulbs, scenes, and groups.
The reason I knew [device variable name].label would work is because the log.debug statements were already using this and showing the correct names.

OK - that’s makes sense. I’ll update the code. I believe that this happened after the 2.3.1 SmartThings update.

I know my Hue Hub updated last night.
Today all my Hue B Smart devices are stuck on previous statuses. When i try to switch one on it changes to Turning On and then goes back to Off. Although the devices do switch on, to switch them off i can click whilst it’s on "Turning Off"
When i look for new devices, scenes, etc. It gets stuck indefinitely. Nothing obvious in the logs.

So after trying to delete the Hue “Thing” (not the bulbs) I get unauthorized when trying to view the hub in the smart app. I get an error has occurred when trying to delete the smart app through Smart Things and I can’t delete the smart app in the IDE as it’s installed!
I’ve deleted all the bulbs, scenes and group “things” and still no luck!

I updated the Hue B Smart app on Github to version .9c. This version addresses the smartapp not listing the actual names (by using the change suggested by @smknight - thanks!!!).

@Stacy_Butera , @M3Rocket , and any others who have experienced this problem (likely caused by the ST’s recent 2.3.1 update) - this version should solve your issues. Please let me know if it doesn’t.