[BETA] Hue (Re)Connect - with scene handling

@r4nd0m you are never going to achieve an update cycle of 10-15 seconds working for you, it will cripple the hub and make it extremely unreliable.
Polling is not the way this should be done
The only way would be to have the philips hub send its update when something changes, but alas the philips API does not support this.
So this leaves one other possibility which is to attach the control device I.e. The dimmer directly to ST. I believe that the philips dimmer can be attached to ST and there is a community device type for it, but I was aware some people had issues with it. Im not sure if this has been fixed yet?

Also getting a “failed to save page: itemDiscovery” message when trying to use this. I’m also using the new light strip, tried the workaround @infofiend mentioned with no luck. Anyone figure it out?

Well I have tried everything possible and look for an option to overcome the disconnect issues with directly connecting the dimmer to ST - seems like there is no solution at all at this moment whichever route I go …

Funny you say it will degrade the hubs functionality as I see plenty of double or triple messages on my hub hence I would think it should be possible - depending on how much things are a tally connected … to be fair such a poll cannot be that big of a query and neither should be the parsed response message …

the poll is a huge query as every time you refresh a single hue bulb using pollster it refreshes the state of all bulbs connected to the hue hub. just look at your logs to see how much traffick and logging is generated, also time how long the full refresh takes, im my setup this takes about 20 seconds for all my bulbs.

Bit of a novice here as well. Just a couple questions:

  • Do I have to remove the Hue Hub from smart things as well, or just the bulbs?
  • Does it work with the light strips?

Thanks for all your efforts here, I’ve been looking for something like this for a while!

Sean-

My “workaround” was for a much earlier version than the current one - which I believe shouldn’t need it. I don’t know what version you are using, but check to see if you are using the most current.

Another option would be to try [UPDATED as of March 24, 2016] Hue Lights & Groups & Scenes (OH MY!)

This works very well for me (as a UK user) and allows me to, at last, link my Amazon Echo to my Hue scenes using IFTTT!

Thanks for all the hard work!

I have now modified the pollster.smartapp and hardcoded the interval to less than a minute simply by changing the cron input line and removing the input for the interval - so you only get to chose the bulbs to refresh and in my tests so far this is working just fine …

@r4nd0m just because you can doesn’t mean you should. how long have you been running this for? for example an overpolling experience i had recently, after enabling the polling my hub stopped working after a day or so zwave network died a death even though i was not polling the zwave network. this was proved after much difficulty to be attributable to the polling cycle i had.

if its working for you then good, but i caution that if it takes a few days for your hub to stop working you wouldn’t know necessarily that the issue is caused by your excessive polling.

2 Likes

thanks for the information - I will keep an eye on it - I am currently refreshing every 45 seconds and with the few bulbs where this applies (4) it seems to work fine at the moment - been running for a few hours - until there is a working procedure for getting an update from the HUE bridge from external changes (dimmer switch) quicker than 5 minutes I will be hunting for workarounds which this clearly is - an alternative would be using Mood Cube and the Open/Close sensor instead to have manual switches but that doesnt seem to be reasonable though I could think of some fancy looking switches …

Thanks for the great app and device handlers! I’m having a couple issues though:

  1. Scenes I create using the Hue app for iOS sometimes cannot be seen by the Reconnect smart app. I have left the SmartThings app searching for extended periods and the scenes don’t show up, even though I’ve verified they’re created by using the Hue API.

  2. It seems like the Reconnect app can only see scenes put onto the Hub by the official Hue app. I’ve tried creating scenes using Hue Lights (a pretty nice Hue app for iOS), and the scenes are never detected. Is there a reason for this behavior?

Anyway, thanks again!

Hi - Hue (re)connect has been working well for me over the last week or so but this morning when I selected the app from within iOS SmartThings it gave me a not authorised error and took me back to the main menu.

When I now select the app I get the spinning timer and then nothing else (ie. stays in the menu of installed SmartApps). In the debug console I am seeing the following :-

11:50:28 AM: trace NON-HUE EVENT devicetype:04, mac:5442493EF137, networkAddress:C0A80192, deviceAddress:C351, stringCount:04, ssdpPath:/Ircc.xml, ssdpUSN:uuid:00000000-0000-1010-8000-
5442493ef137::upnp:rootdevice, ssdpTerm:, ssdpNTS:ssdp:alive

11:50:28 AM: trace Location: devicetype:04, mac:5442493EF137, networkAddress:C0A80192, deviceAddress:C351, stringCount:04, ssdpPath:/Ircc.xml, ssdpUSN:uuid:00000000-0000-1010-8000-5442493ef137::upnp:rootdevice, ssdpTerm:, ssdpNTS:ssdp:alive

11:50:28 AM: error java.lang.NullPointerException @ line 286

I have looked at line 286 in the code but it’s a simple date assignment/comparison so I don’t believe this is the issue and I have tried uninstalling the app from within the IDE but receive the following message :-

“This SmartApp can’t be deleted at this time because it is installed by one or more users”

Any pointers to getting this great app working again?

Thanks.

James.

Hello, I’m really sorry to ask such a simple question in here, but I just picked up an ST hub and found some limitations. In searching for an answer, I found this thread, which seems to have exactly what I’m looking for! Unfortunately, I haven’t a clue as to how to get it to work. I’m copying the code from github (I click on raw code) and then copy that directly to a new smart app in the code window. It also says in the readme to copy each file from the device directory, so I went into there and copied each of those and placed them into the code window in the smartapp. When I click save and then publish, I get a bunch of errors. Really sorry, but can anyone point a new person in the right direction?

Check out this FAQ

2 Likes

Thank you–my mistake was in creating device types as well as the program. I got it working now, which is really great–thank your for the link!

And thank you very much to the creator of this–I’ve read through this entire thread and it looks like a ton of work, it is much appreciated

FYI if anyone like me is interested in using Hue Groups, this has been added in the latest version just be sure to grab the device type also

1 Like

Thanks @Fuzzyligic for your contribution :slight_smile:

1 Like

Yes because I’m filtering out the scene to fetch only the one that get created by the Hue App.

All the scenes created with the Hue App have a name like " on " where the is the name scene and the is the transition time if any (otherwise it’s 0).

I’m using this because from the Hue App when you trigger a scene to Off it will create another scene like " off " that I tried to fetch from HueReconnect to be able to turnoff a scene.

This can also be done by hand (from another app for example):

Create a scene with name "myscene on 0"
Create an opposite scene (setting all the lights to off) with name “myscene off 0”

Then you should be able to see the scene and add it as well as the Off related scene.

@bobfather word of warning the name from hue v1.4 is a maximum of 32 characters but that includes the " on 0" and " Off 0" so that means your name for your scene should be no longer than 26 characters otherwise the " on 0" and " Off 0" will not be appended properly, i hit this problem, so just started using Codes for my Scenes that i want in ST like STLRBlPiYe ( i.e Living Room Blue Pink Yellow) then i just rename in the ST app once added.

Hello Fuzzy!

I installed it, it seems to look for the group in the hue hub. So I have the create the groups in the hue app? I can’t find where…

Thanks!