Multiple Hub Support

Posted on
Thu Dec 01, 2016 1:00 pm
alistair offline
Posts: 109
Joined: Jul 14, 2006

Multiple Hub Support

I took Nate's excellent rewrite of my original code and merged in some changes that I'd added. I can work with him to merge these more broadly into the codeline if there's interest:

1. Support for multiple hue hubs

This was a fair amount of work. Now you create a Hue Hub device for each hub on your network, then any action or device will also reference the Hue Hub that owns the bulb.

I'm testing this now with my network of ~90 bulbs over two hubs, and it seems to be working OK....

2. Support for recalling hue scenes

The Hue app sucks for configuring scenes (more correctly, it sucks for changing them - I have a custom iPad app to do it) but recalling them via Indigo is really useful.

I'll look to creative ways to edit/save scenes via Indigo too....

Posted on
Fri Dec 02, 2016 1:27 pm
marketability offline
User avatar
Posts: 157
Joined: Dec 08, 2015
Location: UK

Re: Multiple Hub Support

v interesting!

Posted on
Sun Dec 04, 2016 1:51 am
nsheldon offline
Posts: 1885
Joined: Aug 09, 2010
Location: CA

Re: Multiple Hub Support

Hey @alistair.

Thanks! Help is always welcome. I don't have much hardware to test against, so it's always helpful to have help with that too.

As for the GItHub repository, I created a separate branch for the 1.4.x versions as that version requires Indigo API version 2 which is incompatible with API 1.x. So if you contribute, it might be helpful to modify that version instead of (or separately from) the main branch.

Posted on
Fri Jan 06, 2017 3:18 am
marketability offline
User avatar
Posts: 157
Joined: Dec 08, 2015
Location: UK

Re: Multiple Hub Support

Hi
I'm reaching the limit for one hub - just wondered what the latest on supporting multiple hubs might be?
Cheers (and thanks)

Posted on
Fri Jan 06, 2017 4:34 am
nsheldon offline
Posts: 1885
Joined: Aug 09, 2010
Location: CA

Re: Multiple Hub Support

No updates on multiple hub support so far.

However, you can always duplicate the plugin and edit the Info.plist file in the duplicated version of the plugin. Here's how...

  1. On the Mac that runs the Indigo server, go to /Library/Application Support/Perceptive Automation/Indigo 7/Plugins and right-click on the "Hue Lights.indigoPlugin" then choose "Duplicate". A new "Hue Lights copy.indigoPlugin" file will appear. Drag it to your Desktop for easier editing.
  2. Right-click on the new "Hue Lights copy.indigoPlugin" file and choose "Rename". Replace the word "copy" with the number "2" and hit the Return key.
  3. Right-click on the new "Hue Lights 2.indigoPlugin" file and choose "Show Package Contents". A window will open to show the contents of the plugin bundle. Double-click the "Contents" folder in the window to open that folder.
  4. Double-click on the "Info.plist" file. If you're prompted to select an application with which to open the file, select "TextEdit" from your Applications folder. You can always use Xcode to edit the file as well in a much more user friendly interface.
  5. Find the line that reads "<string>Hue Lights</string>". If you're using Xcode, find the "Bundle Display Name" attribute which will have "Hue Lights" as the value. Change the string to "Hue Lights 2".
  6. Find the line that reads "<string>com.nathansheldon.indigoplugin.HueLights</string>". If you're using Xcode, find the "Bundle Identifier" attribute which will have "com.nathansheldon.indigoplugin.HueLights" as the value. Change "HueLights" in that string to "HueLights2" and save the file. Close the "Hue Lights 2.indigoPlugin" window.
  7. Double-click on the "Hue Lights 2.indigoPlugin" file. The Indigo 7 application will open and ask if you'd like the install and enable the Hue Lights 2 plugin. Click Okay to install and enable it. You may start to see errors in the Indigo log such as "Not paired with the Hue hub. Press the middle button on the Hue hub, then press the Pair Now button in the Hue Lights Configuration window (Plugins menu)." You'll continue to see that error repeat in the log until you configure the new Hue Lights 2 plugin.
  8. Click the "Plugins" menu in Indigo then go to the new "Hue Lights 2" item and choose "Configure" from the sub-menu. Perform the normal pairing procedure with your 2nd Hue hub (i.e. press the center button on the Hue hub then come back to the computer and click "Pair Now" then "Save").

You can follow this process as many times as needed for as many hubs as you may have. Note, though, that you'll have to repeat the entire procedure (except for pairing) every time you update the original Hue Lights plugin.

Posted on
Fri Jan 06, 2017 5:35 am
marketability offline
User avatar
Posts: 157
Joined: Dec 08, 2015
Location: UK

Re: Multiple Hub Support

Thanks Nathan - will give that a go

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests