[OBSOLETE] Hue Advanced (Connect)

Hi @claytonjn
I have just come across this and am pretty excited with what I see. I intend to install later into my ST IDE but I have a question - you say this has full Hue API access, I have the Hue Motion sensors (some I have unpaired from the Hue bridge and paired direct to ST with the DH that Stephen_McLaughlin has been kind enough to build) however when I try various different CoRE rules I can’t get the Hue bulbs to work just how I want (and even Smart Lightning app isn’t working as it should i.e. my bulbs come on with Motion and lux below a set level but they don’t turn off after set time of no motion). A few weeks back I dug around the developer section on Hue website and was able to query the motion sensors via CLIP (I think that’s what it was called? I know if was via the API rest interface) and played with turning lights on and off and querying the motion sensors.
So my question is - can this app interface with the motion sensors? Read their state (lux, motion and temperature?) and therefore be able to use CoRE etc to set up automations?

Thanks in advance and sorry to waffle on a bit

Currently sensors are not supported. I’ve updated the first post to be a little bit more clear (when I started working on this Hue sensors did not exist).

I’ve added sensor support to my to-do list, although I can’t guarantee when I will have time to working on implementing it. Also, I have no motion sensors or Taps to work with so it will likely be a lot of trial and error. From a brief skim of the sensor implementation in the Hue API it looks like you can only find sensors/add new sensors, I’m not seeing a way to query the actual state of sensors but I might have missed it. Also, be aware that if they are implemented they would have the same update frequency as bulbs that are turned on/off outside of SmartThings (i.e. it might take up to 5 minutes for SmartThings to know that there was motion). To be honest, you’re probably best off either using Hue sensors connected to Hue and controlling your Hue lights directly, or getting Zigbee/Z-Wave sensors directly connected to SmartThings. Like I said, using Hue sensors connected to Hue bridge would behave more like presence sensors in SmartThings because of the delay in updates from Hue to SmartThings.

Thanks for the reply Clayton. I have queried the state of the sensors successfully but I can see what you mean about the delay if connected to Hue bridge. I might have a look for other sensors - I don’t like the SmartThings ones as no lux ability

I’m seeing bunch of these WARN messages from all my Hue bulbs.

11:32:33 AM: warn Front Door Light may not reachable by Hue bridge

Not causing any problems but just curious what that means.


That’s from some upstream changes implemented by SmartThings. It has to do with the upcoming device health stuff they’re implementing, which AFAIK is not fully complete, hence some random warnings. Shouldn’t effect functionality at all, so for now you can just ignore it.

1 Like

@claytonjn just tried installing but have come up with this issue.

So i uninstalled the normal Hue connect app and removed all bulbs, i then installed you app on IDE and enabled the OAuth option and updated (as with all other apps).

Connected the hub, bulbs etc however on the last screen is says all ok but i then get an error message straight after and every time i click done.

No lights are available in the things section.

You shouldn’t have to enable oauth, can you try removing everything again, disabling that, and trying again? Also, are you using the regular or development branch?

@claytonjn just deleted everything. Did a fresh install of the smartapp on IDE (without OAuth) then went through setup but still same error at the same stage.

These are the GitHub setting that im using on the IDE

Can you open live logging and see what gets logged when the error pops up? You should see some errors that correspond to the banner in the app.

@claytonjn just got it working, not sure how but removed everything then reinstalled and all working now


I would really like to use this. But I have 14 hue bulbs in 5 different rooms with many smartapps connected. Removing hue bulbs means breaking all smartapp integrations.
Is there any possibility of changing to this device type with an easiear method.

For example, changing the device type on IDE for each hue bulb ?
would that work ?

1 Like

I feel your pain - during development I often switch between the stock Hue (Connect) and Hue Advanced (I have 29 bulbs).

Unfortunately, the way that SmartThings is structured in regards to LAN devices (Service Manager SmartApp), the SmartApp needs to “create” the devices in order to be able to control them. So all of your lights created by Hue (Connect) cannot be controlled by Hue Advanced (Connect) even if you change their device handler. Unlike directly connected devices, the SmartApp actually does all of the controlling, the device handlers merely talk to the SmartApp to tell it what they want it to do. So your only option really is to completely remove and re-add all of the Hue devices.

All I can do is suggest ways to make that process easier. I typically write up a quick text file with the relevant SmartApps and which bulbs are assigned to them, so that I make sure I don’t forget any automatons. Listing SmartApps with the assigned bulbs, rather than bulbs with the assigned SmartApps, takes a bit longer to draft up but it’s much easier to bulk remove the devices from a SmartApp and to re-add the devices back. For SmartApps where bulbs are required to save the setup you have two options - one is to completely remove the SmartApp and re-add it, the other is to create a virtual bulb as a placeholder.

Hope this helps.

1 Like

thanks. that was pretty close to what I did when I changed my Hue bridge to tne new version.
But it’s really a lot of time which I think I can’t spare nowadays. Maybe sometime in future…
or at a sudden decision…

Silly question, but how do I use the beta GitHub code? I have installed the normal code ok from Git but would like to try beta. Thanks

Easiest way is to change the branch to Hue-Advanced-Development, then do the regular GitHub update (including publish).

1 Like

Thanks @claytonjn. Is the delay updated fixed in production yet? Or just beta? I have switched back from using Hue motion sensors tied directly into ST to having the sensors connected direct to the Hue hub. I noticed that the hue hub is then settings lights on and off but the Hue Advanced in ST isn’t registering the light changes anywhere near fast enough


Hi @claytonjn, Here’s the error I get when I try to configure the Hue Advanced (Connect) SmartApp

de00b717-8ffe-481a-8980-f93ab5f84616  22:57:25: error grails.validation.ValidationException: Validation Error(s) occurred during save():
- Field error in object 'physicalgraph.device.Device' on field 'deviceNetworkId': rejected value [0017882A70E0]; codes [physicalgraph.device.Device.deviceNetworkId.unique.error.physicalgraph.device.Device.deviceNetworkId,physicalgraph.device.Device.deviceNetworkId.unique.error.deviceNetworkId,physicalgraph.device.Device.deviceNetworkId.unique.error.java.lang.String,physicalgraph.device.Device.deviceNetworkId.unique.error,device.deviceNetworkId.unique.error.physicalgraph.device.Device.deviceNetworkId,device.deviceNetworkId.unique.error.deviceNetworkId,device.deviceNetworkId.unique.error.java.lang.String,device.deviceNetworkId.unique.error,physicalgraph.device.Device.deviceNetworkId.unique.physicalgraph.device.Device.deviceNetworkId,physicalgraph.device.Device.deviceNetworkId.unique.deviceNetworkId,physicalgraph.device.Device.deviceNetworkId.unique.java.lang.String,physicalgraph.device.Device.deviceNetworkId.unique,device.deviceNetworkId.unique.physicalgraph.device.Device.deviceNetworkId,device.deviceNetworkId.unique.deviceNetworkId,device.deviceNetworkId.unique.java.lang.String,device.deviceNetworkId.unique,unique.physicalgraph.device.Device.deviceNetworkId,unique.deviceNetworkId,unique.java.lang.String,unique]; arguments [deviceNetworkId,class physicalgraph.device.Device,0017882A70E0]; default message [{0} must be unique]
@ line 564
de00b717-8ffe-481a-8980-f93ab5f84616  22:57:25: debug getChildDevices(false), children=0
de00b717-8ffe-481a-8980-f93ab5f84616  22:57:25: debug Initializing
de00b717-8ffe-481a-8980-f93ab5f84616  22:57:25: trace Installed with settings: [selectedGroups:[de00b717-8ffe-481a-8980-f93ab5f84616/groups/3, de00b717-8ffe-481a-8980-f93ab5f84616/groups/9, de00b717-8ffe-481a-8980-f93ab5f84616/groups/13], updateNotifications:true, gitHubBranch:[Stable], circadianDaylightIntegration:true, selectedHue:0017882A70E0, updatePush:true, selectedTransition:1, selectedBulbs:[de00b717-8ffe-481a-8980-f93ab5f84616/lights/2, de00b717-8ffe-481a-8980-f93ab5f84616/lights/10, de00b717-8ffe-481a-8980-f93ab5f84616/lights/1, de00b717-8ffe-481a-8980-f93ab5f84616/lights/7, de00b717-8ffe-481a-8980-f93ab5f84616/lights/9, de00b717-8ffe-481a-8980-f93ab5f84616/lights/8, de00b717-8ffe-481a-8980-f93ab5f84616/lights/13, de00b717-8ffe-481a-8980-f93ab5f84616/lights/14, de00b717-8ffe-481a-8980-f93ab5f84616/lights/11, de00b717-8ffe-481a-8980-f93ab5f84616/lights/12]]
 22:57:22: info Waiting on events...

I should add, I also have the Hue (Connect) SmartApp in the list… should I remove that?

You have to remove all hue devices, including the bridge. Once everything’s removed, Hue (Connect) should also go away. It looks to me like the bridge is still in there.

Got it installed, thanks!

However, I have a few issues still…

if I modify the brightness through the Hue app, HomeKit, or through a dimmer, it doesn’t update the brightness of the HUE Advanced light group in ST. (It does update the brightness on the individual lights in ST though.

Everything is pulled in through the API provided by Philips. So if changing the brightness in the Hue app, etc. sets the brightness for each individual light in a group, rather than the group as a whole, and the API does not show any changes in the group, ST won’t be updated. That’s really more of an issue with the API itself and/or how those apps/devices operate. I pretty much exclusively control my Hue devices through ST and only use the Hue app as a backup so I’ve never really looked into this but I am almost positive this is the case.

I could potentially “hack” together a solution, keep track of which devices are in a group and poll those individually as well as the group, however that could cause issues when the group is updated in ST but the individual devices don’t report changes. Plus, it would be a lot more overhead and could easily cause the SmartApp to exceed the execution time limit so I really don’t think that’s a good solution. To be honest, the only good solution would be for Philips to update the API so that if lights in a group are updated individually, the group is updated. The problem is, what if the lights are all set differently, what would the group report, etc.

There’s really no good way to have multiple platforms all controlling the same devices. The only scale-able solution is to have one central controller that handles the logic of all devices and acts as the interface to them.