[DEPRECATED] [PORT] Hue B Smart

NB: This app and drivers should be considered as deprecated. I have personally switched over to CoCoHue (and suggest folk looking for fuller Hue support than the native drivers do the same :slight_smile:)

4 Likes

Very nice. I have been thinking of doing this myself. Do these drivers support ramp rate setting?

Not sure, they are a direct port of the ST drivers so if those ones did these should. I have only tested the functionality that I use.

EDIT: These drivers support both a setting per bulb to set the transition time, and also support the setLevel(level, durationSecs) method.

I don't think this is true...I see Hue groups in my device list and I am able to send commands to the groups as if they were bulbs.

Just checked the built in integration and I see you're right, it has support for groups, just not scenes. I've updated the post accordingly. :+1:

1 Like

Thanks for this port, this was my "go-to" hue integration in ST mostly because of its ability to use custom scenes created "outside" of the hue app. Hopefully I'll be able to finally use custom transition times without pairing the bulbs directly to HE.

@xap Got this installed without issue, however, I'm not seeing the option to "push" buttons in RM or other apps. However, they do show up as switches. Inside the device settings the option to "push" is working fine so I assume it must be some sort of HE specific syntax to define the momentary "button"?

Yes, buttons in HE work differently to ST. I have to admit I've done a fairly basic port, simply got stuff working. It needs some TLC to make it more HE native.

I can work around it by using the switch on command but it complicates some of my RM rules. I've already made the modifications, but it would be nice to be able to use the "button press per mode" functionality already built in to RM and other native HE apps.

Nonetheless, it's awesome to be able to use this app in HE now, so far it seems to run perfectly for my uses and having the ability to use scenes and the flash command are VERY welcome.

Thanks for your efforts, I look forward to further development.

PS. I also noticed that the port won't recognize the transition time entry in HE's set level command. Unfortunately it doesn't just ignore it like it does in the native app, but instead breaks the command all together. Not a big deal for me because I usually set my transition times in the scene itself using the Android app all4hue, but this might be a desirable feature for others.

I've updated the Hue B Smart Bulb and Hue B Smart Scene drivers to work better with Hubitat. I've made some fairly drastic changes to the bulb driver to tidy it up and remove a lot of the extraneous stuff that wasn't used in Hubitat, if I've removed something you use let me know but it should all be there.
I've also updated the scene driver to use the Hubitat "pushable" capability, buttons work quite differently in Hubitat.
Have a go, hopefully should all work for you now.

Thanks for your efforts! I tried using the "pushable" button function in a quick test, but I'm getting an error. I have RM set to push button 1 in the scene, but it's resulting in this:

2018-11-08 09:32:37.879 am [error](java.lang.NullPointerException: null (allHandler)

[app:4722]Test Flash: vButton - Test pushed 1

[app:4722]java.lang.NullPointerException: null (allHandler)

[app:4722]Test Flash: vButton - Test pushed 1

--- Live Log Started, waiting for events ---

I also tried the flashon command on one of my bulbs, it worked but I got this error:

2018-11-08 09:44:00.791 am [error]java.lang.IllegalArgumentException: Name cannot be null. on line 396 (flashOn)

Ok, if you use the latest version of the smart bulb and scene drivers it should be fixed now.

I've also adjusted the flash methods:

flashOn() - flashes for as long as Hue will let it (seems to be about 15-20 seconds)
flashOff() - cancels the flashes
flashOnce() - flashes the lights once
flashNotify() - flashes the lights for as many seconds as is set in the "flash notification seconds" config property for the bulb

Latest update seems to have resolved my errors, thanks.

@xap everything has been working well for me. I've disabled the debug logging in the app and drivers to prevent it from flooding the log history, but I'm still seeing one frequently. Can this be muted without causing issues?

Bridge Discovering all items on Hue hub
Initialize Bridge ip x.x.x.x.x.
version 1.71

Thanks!

I've adjusted the drivers for the the bulb, group, scene and bridge to use the new boolean setting on the app to determine if they output log info or not. I'll get around to the other device types soonish as I'm expecting to buy a bunch of white ambiance bulbs.

1 Like

Thanks for this, made a big difference, looking forward to the future additions as I have several of the white ambiance bulbs too.

@xap I noticed that the new code completely mutes all activity for the devices from the logs including ON/OFF is there a way it could still offer an option to mute all but the ON/OFF states? Not super important, but if it's an easy fix it would be nice.

@xap not sure if you realized this, but the new code for the flash commands on the devices has broken the flash for the "groups" at least with regards to the "hue b smart group". The individual devices in the group work fine, but if I try to execute a flash on the group it fails with this error;

java.lang.IllegalArgumentException: Command 'flash' is not supported by device. (allHandlerS)

The command still works for the white ambiance groups so I'm assuming it is due to the new code for additional flash functions?

Try using the flashNotify method instead, that should work.

no error, logging shows activity but lights do not flash.

dev:30092018-11-13 09:44:07.668 am traceHue B Smart Bulb: flashOff():

dev:30092018-11-13 09:44:02.515 am traceHue B Smart Bulb: flashOn():

dev:30092018-11-13 09:44:02.511 am traceHue B Smart Bulb: flashNotify():