[DEPRECATED] [PORT] Hue B Smart

@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():

D'oh. Ok, fixed now. If you grab the latest version of the group driver it should work.

Yep, that fixed it! BTW, I really like the flashNotify command, looking forward to the update to the white ambiance code so I can use it system side.

Well, it just so happens... :wink: Watch this space

1 Like

OK, I've updated the Ambiance Bulb and Ambiance Group drivers. But I haven't got these type of bulbs yet so I haven't been able to test the changes, you'll have to let me know if there are any issues. If you do try them please can you keep an eye out in the logs for "Unhandled parameter: ..." as that will indicate I've removed bits related to color which I don't think are needed but I may be wrong.

Running some errands, will give it a try in a couple hours. Thanks.

@xap ok, just installed and yes, I'm seeing the error you mentioned on the group:

dev:30102018-11-13 04:16:41.913 pm traceHue B Smart Ambience Bulb: setColorTemperature ( 6500 )

dev:30102018-11-13 04:16:39.668 pm debugUnhandled parameter: colormode. Value: ct

dev:30102018-11-13 04:16:39.666 pm traceHue B Ambience Group: updateStatus ( colormode:ct )

dev:30102018-11-13 04:16:39.657 pm debugUnhandled parameter: hue. Value: null

dev:30102018-11-13 04:16:39.655 pm traceHue B Ambience Group: updateStatus ( hue:null )

dev:30102018-11-13 04:16:39.643 pm debugUnhandled parameter: effect. Value: null

dev:30102018-11-13 04:16:39.641 pm traceHue B Ambience Group: updateStatus ( effect:null )

dev:30102018-11-13 04:16:39.629 pm debugUnhandled parameter: xy. Value: null

dev:30102018-11-13 04:16:39.627 pm traceHue B Ambience Group: updateStatus ( xy:null )

dev:30102018-11-13 04:16:39.614 pm traceHue B Ambience Group: updateStatus ( ct:343 )

dev:30102018-11-13 04:16:39.567 pm debugUnhandled parameter: sat. Value: null

dev:30102018-11-13 04:16:39.565 pm traceHue B Ambience Group: updateStatus ( sat:null )

dev:30102018-11-13 04:16:39.547 pm debugUpdate Needed: Current Value of level = 40 & newValue = 100

dev:30102018-11-13 04:16:39.543 pm traceHue B Ambience Group: updateStatus ( bri:254 )

dev:30102018-11-13 04:16:39.524 pm debugUpdate Needed: Current Value of switch = false & newValue = true

dev:30102018-11-13 04:16:39.520 pm traceHue B Ambience Group: updateStatus ( on:true )

dev:30102018-11-13 04:16:15.199 pm traceHue B Smart Ambience Group: refresh():

dev:30102018-11-13 04:16:14.034 pm traceHue B Smart Ambience Group: setLevel ( 100 ):

dev:30102018-11-13 04:15:43.056 pm debugUnhandled parameter: colormode. Value: ct

dev:30102018-11-13 04:15:43.054 pm traceHue B Ambience Group: updateStatus ( colormode:ct )

dev:30102018-11-13 04:15:43.042 pm debugUnhandled parameter: hue. Value: null

dev:30102018-11-13 04:15:43.040 pm traceHue B Ambience Group: updateStatus ( hue:null )

dev:30102018-11-13 04:15:43.028 pm debugUnhandled parameter: effect. Value: null

dev:30102018-11-13 04:15:43.026 pm traceHue B Ambience Group: updateStatus ( effect:null )

dev:30102018-11-13 04:15:43.014 pm debugUnhandled parameter: xy. Value: null

dev:30102018-11-13 04:15:43.012 pm traceHue B Ambience Group: updateStatus ( xy:null )

dev:30102018-11-13 04:15:42.999 pm traceHue B Ambience Group: updateStatus ( ct:343 )

dev:30102018-11-13 04:15:42.989 pm debugUnhandled parameter: sat. Value: null

dev:30102018-11-13 04:15:42.987 pm traceHue B Ambience Group: updateStatus ( sat:null )

dev:30102018-11-13 04:15:42.975 pm traceHue B Ambience Group: updateStatus ( bri:102 )

dev:30102018-11-13 04:15:42.959 pm traceHue B Ambience Group: updateStatus ( on:false )

dev:30102018-11-13 04:15:30.041 pm traceHue B Smart Ambiance Group: flashOff():

dev:30102018-11-13 04:15:24.856 pm traceHue B Smart Ambiance Group: flashOn():

dev:30102018-11-13 04:15:24.850 pm traceHue B Smart Ambiance Group: flashNotify():

dev:30102018-11-13 04:15:15.688 pm debugUnhandled parameter: colormode. Value: ct

dev:30102018-11-13 04:15:15.684 pm traceHue B Ambience Group: updateStatus ( colormode:ct )

dev:30102018-11-13 04:15:15.664 pm debugUnhandled parameter: hue. Value: null

dev:30102018-11-13 04:15:15.659 pm traceHue B Ambience Group: updateStatus ( hue:null )

dev:30102018-11-13 04:15:15.634 pm debugUnhandled parameter: effect. Value: null

dev:30102018-11-13 04:15:15.629 pm traceHue B Ambience Group: updateStatus ( effect:null )

dev:30102018-11-13 04:15:15.598 pm debugUnhandled parameter: xy. Value: null

dev:30102018-11-13 04:15:15.593 pm traceHue B Ambience Group: updateStatus ( xy:null )

dev:30102018-11-13 04:15:15.527 pm traceHue B Ambience Group: updateStatus ( ct:343 )

dev:30102018-11-13 04:15:15.497 pm debugUnhandled parameter: sat. Value: null

dev:30102018-11-13 04:15:15.491 pm traceHue B Ambience Group: updateStatus ( sat:null )

dev:30102018-11-13 04:15:15.424 pm traceHue B Ambience Group: updateStatus ( bri:102 )

dev:30102018-11-13 04:15:15.355 pm traceHue B Ambience Group: updateStatus ( on:false )