Philips Hue Groups Control App

Great work @zpriddy!

I now have both lights and groups set up and they all work well in response to setting an attribute. BUT - I can’t seem to get any of the tiles to show the correct state, and the “refresh” / “polling” commands don’t work for lights or groups.

The error returned for a light refresh is:

groovy.lang.MissingMethodException: No signature of method: script14238925343421315198162.poll() is applicable for argument types: (script1423894685817920356801) values: [script1423894685817920356801@52621905]
Possible solutions: poll(), now(), page(), url(), mode(java.util.Map), page(java.util.Map) @ line 238

I get substantively similar error for a group refresh:

groovy.lang.MissingMethodException: No signature of method: script14238925343421315198162.poll() is applicable for argument types: (script1423896409675814626050) values: [script1423896409675814626050@7ac5d3e4]
Possible solutions: poll(), now(), page(), url(), mode(java.util.Map), page(java.util.Map) @ line 251

Any ideas?

Thanks,
Tony

That was a problem that I was having with the stock app… It something that I want to start digging into and see if I can find a solution to it.

I wanted to give everyone an update, I got the newer version of the Hue (Connect) app and have modified it again. I have the poll and refresh working, I will say that it does not work for just one device, but polls all hue via doDeviceSync. I have it posted as ‘zp_hue_groups_and_lights_connect_new.groovy’ on my github. Also don’t forget to add the custom devices for everything to work.

4 Likes

Hey Zach,

I am actually having trouble getting this to recognize my Hue hub. I can get the normal Hue Connect to pick it up. Any insight?

Kristopher

I’m not sure… I haven’t had to repair my hub for months now so it may be a firmware update. I’ll try to do a code compare between mine and smartthings and see what I can find. I’ll keep you updated

Did this fix all of your bulbs not turning on or off?

chiming in here that after installation of zpriddy’s modified hue connect and custom device types, everything installs properly and appears to work except neither single bulbs nor groups responded to on/off commands.
Polling does seem to work. When I issue an on command from Things dashboard, even though the light never turns on and the icon turns green, within a min or so, the polling shades the light icon grey again.

looking forward to a fix is possible since the standard hue connect app is bunk.

So I just did a check of this… (Sorry I got discarded with my Amazon Echo code for the last week…) but all the files that are on there are the same as whats currently running on my hub…

When you did install this on did you delete all hue devices from your ST hub manually? - I would suggest doing this again :confused:

Thanks for the reply and no worries. I see the activity on the echo! Anxious to try that next.

Yes I deleted everything and installed your code fresh.
I actually rolled back to the previous code before the last update you did and finally got the lights to respond both as single and as groups. However polling doesn’t function
Love the transition changes and the ability to control and entire room at once. I’ll keep tinkering with it!
Good stuff man. Transition command for hues is so underutilized.

The polling is an issue and I use pollster… It’s some weird problem in with the hue… But with my code when you poll one light it will poll all… That was my solution

Hi Zpriddy,

Everything installs properly and appears to work; however, none of my bulbs or groups respond to any on/off commands. From the logs, I keep getting:

NOT PROCESSED: [{“error”:{“type”:5,“address”:"/groups/1g",“description”:“invalid/missing parameters in body”}}]

I deleted everything and tried to re-install. Same issue. Do you any have insight on what the issue is? Let me know. Thanks for your help and time.

Im trying to dig into that right now… Im thinking it may be an update on the hue hub

Ok, I have ZPriddy’s Hue Groups app and devices installed, and it has correctly identified the groups on my bridge. Nice! Thanks!

The problem is that Smartthings still can’t detect the state of my lights, unless I manually go into the light device (e.g., “Dining Room”) and refresh it. Say I turn my DR lights on via Smartthings, then go into the Hue app and turn them off. Smartthings still thinks they are on.

Just pulling down the Smartthings refresh doesn’t do the trick. Is there any way to make it more immediately responsive?

It does seem to do some kind of background polling, because as I’ve typed this, it did detect the change. I just can’t seem to make it happen manually without some in-depth intervention.

Don’t get me wrong: this is still way better than what ST and Hue provide by default. So again, thanks. Just wondering if this is an issue that others are having and can be fixed.

As far as I know it does a 5 minutes polling. The state will reflect correctly based on how close you are to the 5 minute polling. Another tip is when it starts failing for some reason, just go to the connect app and when it starts dicovering bulbs and see spooning wheels for a few seconds, click done and exit out of hue connect app. This clears any stuck polling. Try this and watch in the IDE, how quickly all your bulbs will appear there.

Ron, are you using this app?

Oops! Sorry! Wrong thread. I use the native ST hue connect app. Sorry for the confusion! At the doctors and did niot pay much attention! I so do apologize! :frowning:

Hey @zpriddy. Thanks for all your help on this. I just tried installing the setup myself and got the same error/issue as @soedmond

NOT PROCESSED: [{"error":{"type":5,"address":"/groups/1g","description":"invalid/missing parameters in body"}}]

Did you happen to figure out what was going on here?

I wish I had a better answer for you… I have the same code in mine and moved over to the v2 hub… and it worked just fine for me. I’ll take a look and see if I can update the code in it.

I’m on the new Hue bridge and can’t update my light setup via the smartapp anymore. It found the new bridge and I can still do everything I could on the day I migrated, but if I move a light (say, a regular Hue bulb to my front porch to make spooky Halloween lighting effects), I can’t get the app to save my new setup. It talks fine to the bridge and finds the new light names/groups correctly, but hangs when I try to save: “Failed to save page: bulbDiscovery”.

I have tried to reinstall the app (without removing the one that still sort of works), but the new installation won’t discover the bridge at all - nor will the default Hue app, so I think that’s a bigger issue.

Just wondering if you’d seen this behavior before and had any suggestions. Thanks!

Hi Guys,

I’ve done a little bit of work on @zpriddy’s device types tonight. My changes may not suit everyone, but here’s a quick rundown of what I’ve done so far:

  1. Update the tiles to the ‘new’ style
  2. Enforce a minimum of 1% when calling setLevel(...)
  3. Do not change the switch state to on when setLevel(...) is called.
  4. Reduce default transition times.

I’ve found these changes make using the bulbs/groups from the app much more enjoyable, but it is obviously a bit out of the norm from how these devices normally work in SmartThings. As an example, you could now change the brightness of a bulb/group in the background and the next time it is powered on by any means it will come on at the desired brightness. I use this as a way for me to simplify my automation by not needing to configure a dimmer level with my triggers.

I do have some some plans to continue improving the device types. In particular, I’d like to make the default transition time dynamic so that it’s effectively zero when the level is 1% and is several seconds when the level is 100%. This would maintain the nice smooth transitions while avoiding the ‘delay’ that is seen when turning off lights that are dimmed to 1%.

3 Likes