Start Scenes stored om Hue Bridge

Posted on
Sat Dec 31, 2016 7:28 am
Albatros offline
Posts: 131
Joined: Feb 07, 2015

Start Scenes stored om Hue Bridge

Is it possible with the hue plugin for indigo to start a scene stored on the Hue Bridge?


Domoticz can do the follwoing:
"You can create scenes with a third party application like Hue Pro that is able to store the scene on the bridge.
For example you could create a scene 'Romantic' with a nice color and with all the lights you want in this scene.
Domoticz will detect all scenes from the hue bridge, and add them as push-on switches in the system
After this, it is very easy to activate the scene or use the scene in timers."


See the reference on domoticz:

https://www.domoticz.com/wiki/Philips_Hue_Lights

Posted on
Sat Dec 31, 2016 12:16 pm
nsheldon offline
Posts: 1930
Joined: Aug 09, 2010
Location: CA

Re: Start Scenes stored om Hue Bridge

Hi. Thanks for the question.

No. Not yet. I do plan on adding this feature, though. I'm not sure about a timeline, but the underlying code needed to implement this was included in a patch release of the plugin a few patch versions ago.

Posted on
Mon Jan 16, 2017 6:08 pm
nsheldon offline
Posts: 1930
Joined: Aug 09, 2010
Location: CA

Re: Start Scenes stored om Hue Bridge

Version 1.5.0 Posted

  • Added limited Hue Scene support with a Recall Hue Scene action which can activate any scene stored on the Hue hub.
  • Added tool tips to all Hue Lights controlled Indigo UI windows.
  • Fixed automated plugin version checking that wasn’t comparing current and latest versions correctly.
  • Improved Hue Groups device setup dialog so you can see a list of all the lights in the selected group from within the device setup window.

Posted on
Thu Jan 26, 2017 4:33 am
nsheldon offline
Posts: 1930
Joined: Aug 09, 2010
Location: CA

Re: Start Scenes stored om Hue Bridge

Version 1.5.1 Posted

  • Added a Recall Hue Scene menu item to Plugins -> Hue Lights menu to easily recall a Hue scene from the Indigo GUI without having to create an Action Group or trigger action.
  • Fixed a UI bug in the Recall Hue Scene action settings window that prevented the Lights Affected list from being populated on initial action creation.

Posted on
Wed Mar 29, 2017 11:29 am
Grevling offline
Posts: 27
Joined: Feb 06, 2017
Location: Norway

Re: Start Scenes stored om Hue Bridge

Hi,

Trying the Scene recall function for the first time. Total newb.

I have multiple scenes created in Lightbow, and am allowed to choose Lightbow in the Scene creator dropdown menu. However there are no scenes to choose from in the Scene dropdown menu. Oddly enough the only choice that brings up scenes to choose from, is the native Hue scenes that ship with the app, and they are only available when selecting "Hue 2 app" on an old iPhone that is no longer in use.

The log reads as follows:
29 Mar 2017, 19:18:34
Hue Lights Error Error in plugin execution GetUiDynamicList:

Traceback (most recent call last):
File "plugin.py", line 2410, in scenesListGenerator
KeyError: (u'none',)

It seems like the scenes created on any other device than my old iPhone is not stored in the hub?
Is there any way to update the hub with scenes created on Lightbow or in any other app?

Posted on
Thu Mar 30, 2017 2:51 am
nsheldon offline
Posts: 1930
Joined: Aug 09, 2010
Location: CA

Re: Start Scenes stored om Hue Bridge

Hi @Grevling.

The Hue scenes thing is actually pretty confusing and I almost didn't add the feature just because of that. So, here are some things to consider.

Lightbow doesn't save it's "Presets" to the Hue hub/bridge. This is similar to how the Hue Lights plugin has a separate "Preset" feature which is only stored in the plugin preferences, not the Hue bridge. Unfortunately, I don't know of any way to get Lightbow settings saved into the Hue bridge. You might ask the developer that question.

The original Hue app created "Scenes" that it saved on the Hue bridge. Each iOS or Android device with the Hue app on it could create Scenes on the bridge. Those Scenes could easily be recalled from the app. But in order to add HomeKit support for iOS devices, Philips needed to completely rewrite the Scenes feature. So now there are 2 kinds of Scenes (both still confusingly called "Scenes"). The first and easiest to access "Scene" is in the Settings on the Hue app under "HomeKit & Siri". Those are actually HomeKit Scenes, not Hue scenes. So anything you see in there won't appear in the list of scenes stored on the Hue bridge. The original Hue "Scenes" are now hidden away as a lighting option for each room in "Home" area of the Hue app. Touch any room in the list then touch "Scenes" at the top. These are not HomeKit Scenes but Hue Scenes. You can add new Scenes (which will show up in the Hue Lights plugin) by touching the "+" at the bottom right of the Scenes list then creating your own Hue Scene which will apply to just the lights in that room.

The reasons your new iOS device doesn't appear in the list of Scene Creators in the Hue Lights plugin is because you probably restored all of your apps (including the Hue app) that were on your old iOS device onto your new one. The way the Hue bridge identifies "Scene Creators" is by a unique string of random characters it assigns to your Hue app the first time you pair the app with the Hue bridge (by tapping the center button on the Hue bridge when the app tells you to). The app caries this unique ID with it when it's backed up and restored, so even if you have to pair the app to the bridge again after an iPhone upgrade, the app tells the Hue bridge to identify it by the same old unique ID it originally had. Thus, the "Scene Creator" still shows up on the Hue bridge as the original app and iOS device.

By the way, if you make changes to a Hue Scene in the Hue app (which get saved to the Hue bridge), be sure to choose the "Reload Hue Hub Config" from the Plugins -> Hue Lights menu, otherwise the Hue Lights plugin won't recognize the changes.

I hope that helps clear some of it up.

Posted on
Thu Mar 30, 2017 5:25 am
Grevling offline
Posts: 27
Joined: Feb 06, 2017
Location: Norway

Re: Start Scenes stored om Hue Bridge

Hi,

Thanks for the thourough explanation. That makes sence. Since Lightbow came up as a choise in the plugin i thought the scenes were saved.

So I guess the best way to get the lightbow scenes into Indigo would be to save them as presets in the hue app then.

I'll give that a try.

G

Posted on
Sun Apr 02, 2017 5:00 pm
nsheldon offline
Posts: 1930
Joined: Aug 09, 2010
Location: CA

Re: Start Scenes stored om Hue Bridge

Hi Grevling.

Presets in the Hue Lights plugin are individual light setting presets and can't be used to remember multiple sets of light settings in one Preset. You could create a Hue group (using the Lightbow app) and then apply a Preset to the entire group, but if you wanted different lights in the group to be a different settings, that wouldn't work. If setting up Scenes in the Hue app for an individual room doesn't fulfill your needs, you could create an Action Group in Indigo with multiple actions that set up each Hue light or group when the Action Group is executed.

Posted on
Wed Nov 15, 2017 8:07 am
bbruck offline
Posts: 314
Joined: Oct 05, 2008

Re: Start Scenes stored om Hue Bridge

What a great plugin!

I'm just starting to explore recalling Hue scenes. We have three iPhones and two tablets; the iPhones have each gone through several upgrades in both software and hardware. I have two Hue apps on my phone: OnSwitch and Hue (official app). I see 19 scene creators and about 60 scenes, many of which are repeated. (I hate this, but think I understand why it is - sounds like the Hue Bridge just keeps saving stuff forever.)

Anyway, my problem is that while I can execute a scene from the plugins > Hue Lights > Recall Scenes menu, I get errors trying to save the same scene as an action group.

Log file for executing a scene:
Hue Lights "Spring blossom" scene from "hue_ios_app app on BILL’s iPhone" recalled for "Rec room"

When I try and save my recalled scene, I see "Error validating fields. Hover over the red field labels above to see the error reason." There is nothing in red, however. The log file shows:
Nov 15, 2017 at 9:05:30 AM
Hue Lights Error Error in plugin execution UiAction:

Traceback (most recent call last):
File "plugin.py", line 4141, in scenesListItemSelected
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2019' in position 104: ordinal not in range(128)

Hue Lights Error Error in plugin execution UiAction:

Traceback (most recent call last):
File "plugin.py", line 4150, in groupsListItemSelected
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2019' in position 104: ordinal not in range(128)

Hue Lights Error Error in plugin execution UiAction:

Traceback (most recent call last):
File "plugin.py", line 4150, in groupsListItemSelected
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2019' in position 104: ordinal not in range(128)


Nov 15, 2017 at 9:05:56 AM
Hue Lights Error Error in plugin execution UiAction:

Traceback (most recent call last):
File "plugin.py", line 4141, in scenesListItemSelected
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2019' in position 104: ordinal not in range(128)


Nov 15, 2017 at 9:06:13 AM
Hue Lights Error Error in plugin execution UiValidate:

Traceback (most recent call last):
File "plugin.py", line 1373, in validateActionConfigUi
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2019' in position 104: ordinal not in range(128)

Thoughts?

Posted on
Wed Nov 15, 2017 8:57 am
autolog offline
Posts: 2384
Joined: Sep 10, 2013
Location: West Sussex

Re: Start Scenes stored om Hue Bridge

Looks like the plugin isn't handling unicode special characters?
The character unicode 2019 is a 'Right Single Quotation Mark'.
The name "hue_ios_app app on BILL’s iPhone" contains that character.
It may be a quick fix to temporarily rename it just to use standard characters (i.e remove the 'Right Single Quotation Mark' or change it to a standard quotation mark). :)

Posted on
Wed Nov 15, 2017 10:05 am
bbruck offline
Posts: 314
Joined: Oct 05, 2008

Re: Start Scenes stored om Hue Bridge

That's clearly the problem - thank you!

I have renamed my iPhone, turned it off then on again, exited and opened the Hue app - but I still don't see the new name Bill iPhone 6 in the list of scene creators. There must be some way to get my phone to talk to the Hue bridge with its new name, but I can't figure it out for the life of me!

Posted on
Thu Nov 16, 2017 12:54 am
nsheldon offline
Posts: 1930
Joined: Aug 09, 2010
Location: CA

Re: Start Scenes stored om Hue Bridge

Version 1.6.9 Posted

  • Fixed various Unicode decoding issues that could cause the plugin to crash if Hue hub scenes or other objects contained non-ASCII characters.
  • Added support for the Innr RS-128T GU10 color temperature lights.

Posted on
Thu Nov 16, 2017 6:53 am
bbruck offline
Posts: 314
Joined: Oct 05, 2008

Re: Start Scenes stored om Hue Bridge

hanks for that fix! It works perfectly.

To get rid of the extraneous info on the bridge, I did a reset and then had to reinstall every one of my Hue devices. Not fun. However, it seems like this was the only way.

Anyway, I DO have another question. I now see only two scene creators:

OnSwitch app on Bill iPhone 6
hue_ios_app app on Bill iPhone 6

The Scene dropdown displays all the Hue app scenes correctly.
However, the dropdown displays NO scenes for the OnSwitch app.
(before the reset, I could see scenes associated with one or two of the five OnSwitch App scene creators I had)

I'm guessing that this means that OnSwitch is not loading its scenes into the bridge. Any thoughts on how to force it to do so? I'm using the OnSwitch app successfully to start scenes

Posted on
Thu Nov 16, 2017 10:18 am
nsheldon offline
Posts: 1930
Joined: Aug 09, 2010
Location: CA

Re: Start Scenes stored om Hue Bridge

Hi.

Sorry for the trouble. That’s a lot of work. Resetting the Hue hub would have fixed the issue withiut the plugin update because your old iPhone name was causing the bug to be triggered (as you already knew) and the iPhone name was stored on the hub itself. So changing your iPhone name in the iPhone itself would have no effect (as you discovered).

As for why the OnSwitch app hasn’t re-uploaded the scenes, I’m not sure why. I don’t know how to force it either. The only guess I have to fix it is to try deleting a scene and recreating it on the OnSwitch app again to see if that causes it to recreate the scene on the hub. You might try just editing a scene in the app too, to see if that forces a re-sync.

Posted on
Thu Nov 16, 2017 11:14 am
bbruck offline
Posts: 314
Joined: Oct 05, 2008

Re: Start Scenes stored om Hue Bridge

thanks!

Who is online

Users browsing this forum: No registered users and 1 guest