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

Just sent it via PM…

I have added some scenes and modified some existing ones, but I cannot get the reconnect app to discover them. Any suggestions besides triggering them on Hue side, that doesn’t seem to do the trick for me… looking at the logs, it says hub discovered previously and just polling after that. Does it mean i need to delete app and start over to trigger rediscovery?

I am working on a potential fix. I’ll let you know.

1 Like

Ok Guys, I pushed some fixes. (to the smartapp and the bridge device)

  • fetch new scene, works fine now, you just need to wait for the refresh
  • better handling of bridge response

I notice something that I cannot fix. When triggering a scene if you fetch the light state through the HUE API, it could take like 4/5s to get the real state for certain lights (they appear as off till then). So I added a timed refresh when you trigger a scene (10 s) this way the lights states should be good when fetched.

1 Like

This happens with the official app too. Just happened to me yesterday. No more than 20 bulbs at the time.

Logs when tou have the issue could help :slight_smile: or give me 20+ bulbs for testing :stuck_out_tongue:

1 Like

Nice work on the scene refresh! I like how the bulbs are now displayed and the “null” is gone.

Side note, can I send you an Aeon Labs Gen 5 Motion sensor so you can replicate the nice device type you’ve created for Fibaro. I’ve tried to step through your code, but it tripped me quickly :slight_smile:

Sorry but I do not have so much spare time… :frowning: and I’m moving the next month.

1 Like

Hi there, is fetching new scenes working for you? I’ve been trying to refresh mine for couple of days and cannot get the app to do it. Thoughts?

Yes it works. I just added a dummy scene and it showed in the list. Be sure to use the latest code and wait enough to let the app refresh the scenes.

Hey thanks for your quick response. It looks like the scenes don’t update if already discovered. My workaround was to delete them and recreate them on Hue hub. Isn’t that big of a deal. But something to keep in mind, for future reference…

If you change an existing scene then yes you have to delete the old one. It’s because the hue bridge will create another scene with the same name. So if you change your scene 10 times, you will end with 10 scenes with same name on the bridge. (That’s a limitation of the hue Api).

1 Like

I had some trouble getting this to work until I copied and pasted from the “raw” code in github. When I first tried to install, everything seemed to work but turning things on or off did nothing. I don’t know, this just might be coincidence but I tried three times and I finally got things to work when I did that.

BTW, fantastic work incorporating the Hue scenes into ST. This makes it 10X better being able to automate everything so easily in ST. Now, when I tell Alexa to “Turn on the TV”, she turns on the power to my media center, then she connects to my harmony hub and turns on all the correct devices that go with my TV, and finally, a routine is executed that turns off lights and switches on a hue scene for watching movies. My final puzzle is to figure out how to turn on my Mac Mini that I use as a media player. The Mac Mini has an electronic “ON” button that requires a physical press to make it work. I think I’m going to try a push solenoid that is connected to a smart outlet to accomplish that task.

Update: Well I got it to work with my Mac Mini turning on using a push solenoid and several apps:

1 Like

Addeed some new scenes and bulbs. When I go into the smart app, it disocvers everything, but when i hit done it says “failed to save page: itemDiscovery”

cffe757d-36dc-4d46-acab-9e24ae0f6e01 8:25:35 AM: error java.lang.NullPointerException: Cannot get property ‘hub’ on null object @ line 393
cffe757d-36dc-4d46-acab-9e24ae0f6e01 8:25:35 AM: debug found Living Room 2 with id cffe757d-36dc-4d46-acab-9e24ae0f6e01/6 already exists, type: 'Hue Bulb’
cffe757d-36dc-4d46-acab-9e24ae0f6e01 8:25:35 AM: debug found Fireplace 1 with id cffe757d-36dc-4d46-acab-9e24ae0f6e01/13 already exists, type: 'Hue Bulb’
cffe757d-36dc-4d46-acab-9e24ae0f6e01 8:25:35 AM: debug found Fireplace 2 with id cffe757d-36dc-4d46-acab-9e24ae0f6e01/14 already exists, type: 'Hue Bulb’
cffe757d-36dc-4d46-acab-9e24ae0f6e01 8:25:35 AM: debug found Fireplace 3 with id cffe757d-36dc-4d46-acab-9e24ae0f6e01/15 already exists, type: 'Hue Bulb’
cffe757d-36dc-4d46-acab-9e24ae0f6e01 8:25:35 AM: debug found Living Room 1 with id cffe757d-36dc-4d46-acab-9e24ae0f6e01/5 already exists, type: 'Hue Bulb’
cffe757d-36dc-4d46-acab-9e24ae0f6e01 8:25:35 AM: debug found Hue Go with id cffe757d-36dc-4d46-acab-9e24ae0f6e01/8 already exists, type: 'Hue Bulb’
cffe757d-36dc-4d46-acab-9e24ae0f6e01 8:25:35 AM: debug found Back Door Light with id cffe757d-36dc-4d46-acab-9e24ae0f6e01/9 already exists, type: 'Hue Lux Bulb’
cffe757d-36dc-4d46-acab-9e24ae0f6e01 8:25:35 AM: debug found Hue Bridge with id 001788120EB2 already exists
cffe757d-36dc-4d46-acab-9e24ae0f6e01 8:25:35 AM: trace Updated with settings: [selectedScenes:[cffe757d-36dc-4d46-acab-9e24ae0f6e01/12fa61363-on-0, cffe757d-36dc-4d46-acab-9e24ae0f6e01/a93dfce7a-on-0, cffe757d-36dc-4d46-acab-9e24ae0f6e01/b03e11915-on-0, cffe757d-36dc-4d46-acab-9e24ae0f6e01/6e3f1e410-on-0, cffe757d-36dc-4d46-acab-9e24ae0f6e01/537291a30-on-0, cffe757d-36dc-4d46-acab-9e24ae0f6e01/7f33fe8c7-on-0, cffe757d-36dc-4d46-acab-9e24ae0f6e01/fe9c1ab49-on-0, cffe757d-36dc-4d46-acab-9e24ae0f6e01/ba5718be6-on-0, cffe757d-36dc-4d46-acab-9e24ae0f6e01/13d492e01-off-0, cffe757d-36dc-4d46-acab-9e24ae0f6e01/441bdd35e-on-0, cffe757d-36dc-4d46-acab-9e24ae0f6e01/0ddc22b3b-on-0, cffe757d-36dc-4d46-acab-9e24ae0f6e01/383028ab3-on-0, cffe757d-36dc-4d46-acab-9e24ae0f6e01/a01306cd9-on-0, cffe757d-36dc-4d46-acab-9e24ae0f6e01/f5a162092-on-0, cffe757d-36dc-4d46-acab-9e24ae0f6e01/642757fb4-on-0, cffe757d-36dc-4d46-acab-9e24ae0f6e01/f6bd85013-on-0, cffe757d-36dc-4d46-acab-9e24ae0f6e01/03de447b3-on-0, cffe757d-36dc-4d46-acab-9e24ae0f6e01/0a1b7b592-on-0, cffe757d-36dc-4d46-acab-9e24ae0f6e01/eada8be0c-on-0], selectedBulbs:[cffe757d-36dc-4d46-acab-9e24ae0f6e01/9, cffe757d-36dc-4d46-acab-9e24ae0f6e01/7, cffe757d-36dc-4d46-acab-9e24ae0f6e01/4, cffe757d-36dc-4d46-acab-9e24ae0f6e01/8, cffe757d-36dc-4d46-acab-9e24ae0f6e01/5, cffe757d-36dc-4d46-acab-9e24ae0f6e01/15, cffe757d-36dc-4d46-acab-9e24ae0f6e01/14, cffe757d-36dc-4d46-acab-9e24ae0f6e01/13, cffe757d-36dc-4d46-acab-9e24ae0f6e01/6, cffe757d-36dc-4d46-acab-9e24ae0f6e01/2, cffe757d-36dc-4d46-acab-9e24ae0f6e01/1, cffe757d-36dc-4d46-acab-9e24ae0f6e01/17, cffe757d-36dc-4d46-acab-9e24ae0f6e01/16], selectedHue:001788120EB2]
cffe757d-36dc-4d46-acab-9e24ae0f6e01 8:25:35 AM: debug Initializing

I think I know what the problem might be . I installed the new Strip Lights Plus and I dont think the app knows how to handle them

Hey Joseph, did you ever get this app to work with your strip lights? I’m having the same problem with the “failed to save page: itemDiscovery” error. I too have a strip light added to my Hue bridge.

So I uninstall all from apps to lights and hue connect. Installed the ReConnect and was able to see all the devices and scenes showing up. However, when I try to turn on or off any lights or scene it does not do anything (I tried to unplug and replug hub just hoping no luck either as well as reinstalling all again).

I checked the logs for all issues and it seems to be coming from the hub.
On the log I am getting the following, any idea?

e3356e26-58bd-409f-8341-55a7e3658dee 8:36:30 PM: trace Bridge response: [{“error”:{“type”:5,“address”:"/lights/8/state",“description”:“invalid/missing parameters in body”}}]
e3356e26-58bd-409f-8341-55a7e3658dee 8:36:30 PM: trace Parsing description
e3356e26-58bd-409f-8341-55a7e3658dee 8:36:30 PM: debug Parsing ‘index:0F, mac:001788145709, ip:C0A8012B, port:0050, requestId:c3f92b73-2bca-479d-b72a-080c18f29bac, headers:SFRUUC8xLjEgMjAwIE9LDQpDYWNoZS1Db250cm9sOiBuby1zdG9yZSwgbm8tY2FjaGUsIG11c3QtcmV2YWxpZGF0ZSwgcG9zdC1jaGVjaz0wLCBwcmUtY2hlY2s9MA0KUHJhZ21hOiBuby1jYWNoZQ0KRXhwaXJlczogTW9uLCAxIEF1ZyAyMDExIDA5OjAwOjAwIEdNVA0KQ29ubmVjdGlvbjogY2xvc2UNCkFjY2Vzcy1Db250cm9sLU1heC1BZ2U6IDM2MDANCkFjY2Vzcy1Db250cm9sLUFsbG93LU9yaWdpbjogKg0KQWNjZXNzLUNvbnRyb2wtQWxsb3ctQ3JlZGVudGlhbHM6IHRydWUNCkFjY2Vzcy1Db250cm9sLUFsbG93LU1ldGhvZHM6IFBPU1QsIEdFVCwgT1BUSU9OUywgUFVULCBERUxFVEUsIEhFQUQNCkFjY2Vzcy1Db250cm9sLUFsbG93LUhlYWRlcnM6IENvbnRlbnQtVHlwZQ0KQ29udGVudC10eXBlOiBhcHBsaWNhdGlvbi9qc29u, body:W3siZXJyb3IiOnsidHlwZSI6NSwiYWRkcmVzcyI6Ii9saWdodHMvOC9zdGF0ZSIsImRlc2NyaXB0aW9uIjoiaW52YWxpZC9taXNzaW5nIHBhcmFtZXRlcnMgaW4gYm9keSJ9fV0=’

I had to remove this app. It stopped working when I got the new strip lights plus. I emailed the developer and no response. Oh well.

Sorry I’m busy for now.

1 Like