Associate Hue scenes with Lights

  1. Brief description of the device or service.
    Hue service

  2. Link to the provider or manufacturer’s product or service page.
    https://www.developers.meethue.com/

  3. Link to the service or device’s API, along with information as to whether it is public or requires an account or key
    https://www.developers.meethue.com/philips-hue-api
    must create account (free) to access API documentation

  4. Any other relevant information including examples or GitHub repositories related to the device or service.
    According to API documentation, Hue scenes can get acquired through querying the Hub directly:

curl http://hub-fqdn/api/KEY/scenes/

This will dump out a listing of scenes on the hub. There are two formats, API<1.11 or API=>1.11 which will dump output such as:

{
	"4e1c6b20e-on-0": {
		"name": "Kathy on 1449133269486",
		"lights": ["2", "3"],
		"owner": "ffffffffe0341b1b376a2389376a2389",
		"recycle": true,
		"locked": false,
		"appdata": {},
		"picture": "",
		"lastupdated": "2015-12-03T08:57:13",
		"version": 1
	},
	"3T2SvsxvwteNNys": {
		"name": "Cozy dinner",
		"lights": ["1", "2"],
		"owner": "ffffffffe0341b1b376a2389376a2389",
		"recycle": true,
		"locked": false,
		"appdata": {
			"version": 1,
			"data": "myAppData"
		},
		"picture": "",
		"lastupdated": "2015-12-03T10:09:22",
		"version": 2
	}
}

or for API < 1.11

{

    "s661001": {
        "name": "My Scene 1",
        "lights": [
            "1",
            "2",
            "3"
        ],
        "active": true
    },
    "s1234": {
        "name": "My Scene 2",
        "lights": [
            "1",
            "2",
            "3"
        ],
        "active": true
    }

}

In the output you can see which lights are associated with each scene. Feature request would be to associate (somehow) lights with current scene so that I can synchronize the UI with changes made on the Hue app:

image

Reason being is if I change the scene via the UI (which works fine) but my wife changes the scene on her phone with the Hue app, the UI is not synchronized to that change (whereas Brightness is.) In the screenshot above, Concentrate was the last scene I selected via the UI (bright-white-yellowish color) but my Wife changed it to “Relax” scene via the phone (reflected in the bulb color in the same card.)

I had looked into the RESTful sensor thinking I could parse the output and try to associate lights to scene that way but it’s somewhat beyond my current level of understanding in making that association.

Hope this makes sense. It’s my first feature request :slight_smile:

understand your desire, had it myself :wink:
at this time in development of the Hue api, i believe it is not possible though. The set scene 's aren’t available as an attribute of the individual lights. It is the other way around , the lights are available as possible options for each scene… At least thats how i understand the api.
On the Hue forum, i have asked about this, but no response yet. That forum would be the place for your feature request, please do.
cheers,
Marius

Ah. Now that you’ve explained it that way, I checked the lights associated with my scenes. Sure enough, the lights listed are ambient lights except for scenes which are compatible with ambient/non-ambient bulbs. Ah well, was worth a shot :slight_smile:

Thanks!