Updated HUE REst descriptions.

This commit is contained in:
Admin
2015-11-10 16:48:30 -06:00
parent c85b67fb9f
commit d344b764da

View File

@@ -169,33 +169,30 @@ GET http://host:port/api/<username>/lights
Gets a list of all lights that have been discovered by the bridge. Gets a list of all lights that have been discovered by the bridge.
#### Response #### Response
Returns a list of all lights in the system. As of 1.3 the full light resource is returned from the bridge. As of 1.4 the uniqueid is returned and from 1.7 the manufacturername also. Returns a list of all lights in the system.
Note: For bridge versions < 1.3 only the name and light identifier are returned. As from version 1.9 luminaireuniqueid is returned.
If there are no lights in the system then the bridge will return an empty object, {}. If there are no lights in the system then the bridge will return an empty object, {}.
#### Response example #### Response example
``` ```
{ {
"1": { "1": {
"state": { "state": {
"on": true, "on": true,
"bri": 144, "bri": 144,
"hue": 13088, "hue": 0,
"sat": 212, "sat": 254,
"xy": [0.5128,0.4147], "xy": [0,0],
"ct": 467, "ct": 0,
"alert": "none", "alert": "none",
"effect": "none", "effect": "none",
"colormode": "xy", "colormode": "",
"reachable": true "reachable": true
}, },
"type": "Extended color light", "type": "Dimmable light",
"name": "Hue Lamp 1", "name": "Table Lamp 1",
"modelid": "LCT001", "modelid": "LWB004",
"swversion": "66009461", "swversion": "65003148",
"pointsymbol": { "pointsymbol": {
"1": "none", "1": "none",
"2": "none", "2": "none",
@@ -217,13 +214,13 @@ If there are no lights in the system then the bridge will return an empty object
"ct": 0, "ct": 0,
"alert": "none", "alert": "none",
"effect": "none", "effect": "none",
"colormode": "hs", "colormode": "",
"reachable": true "reachable": true
}, },
"type": "Extended color light", "type": "Dimmable light",
"name": "Hue Lamp 2", "name": "Table Lamp 2",
"modelid": "LCT001", "modelid": "LWB004",
"swversion": "66009461", "swversion": "65003148",
"pointsymbol": { "pointsymbol": {
"1": "none", "1": "none",
"2": "none", "2": "none",
@@ -247,56 +244,48 @@ Gets the attributes and state of a given light.
Name | Type | Description Name | Type | Description
-----|-------|------------- -----|-------|-------------
state | state object | Details the state of the light, see the state table below for more details. state | state object | Details the state of the light, see the state table below for more details.
type | string | A fixed name describing the type of light e.g. <20>Extended color light<EFBFBD>. type | string | A fixed name describing the type of light which will be "Dimmable light".
name | string 0, 32 | A unique, editable name given to the light. name | string 0, 32 | A unique, editable name given to the light.
modelid | string 6, 6 | The hardware model of the light. modelid | string 6, 6 | The hardware model of the light which will be "LWB004".
uniqueid | string 6, 32 | As of 1.4. Unique id of the device. The MAC address of the device with a unique endpoint id in the form: AA:BB:CC:DD:EE:FF:00:11-XX uniqueid | string 6, 32 | Unique id of the device.
manufacturername | string 6, 32 | As of 1.7. The manufacturer name. manufacturername | string 6, 32 | The manufacturer name will be "Philips".
luminaireuniqueid | string 6, 32 | As of 1.9. Unique ID of the luminaire the light is a part of in the format: AA:BB:CC:DD-XX-YY. AA:BB:, ... represents the hex of the luminaireid, XX the lightsource position (incremental but may contain gaps) and YY the lightpoint position (index of light in luminaire group). A gap in the lightpoint position indicates an incomplete luminaire (light search required to discover missing light points in this case). luminaireuniqueid | string 6, 32 | This will be empty.
swversion | string 8, 8 | An identifier for the software version running on the light. swversion | string 8, 8 | An identifier for the software version running on the light which will be "65003148".
Pointsymbol | object | This parameter is reserved for future functionality. Pointsymbol | object | This parameter is reserved for future functionality and returns a preset hashmap.
The state object contains the following fields The state object contains the following fields
Name | Type | Description Name | Type | Description
-----|-------|------------- -----|-------|-------------
on | bool | On/Off state of the light. On=true, Off=false on | bool | On/Off state of the light. On=true, Off=false
bri | uint8 | Brightness of the light. This is a scale from the minimum brightness the light is capable of, 1, to the maximum capable brightness, 254. bri | uint8 | Brightness of the light. This will be set to 254 as a default.
hue | uint16 | Hue of the light. This is a wrapping value between 0 and 65535. Both 0 and 65535 are red, 25500 is green and 46920 is blue. hue | uint16 | This will be empty.
sat | uint8 | Saturation of the light. 254 is the most saturated (colored) and 0 is the least saturated (white). sat | uint8 | This will be set to 254.
xy | list 2..2 of float 4 | The x and y coordinates of a color in CIE color space. xy | list 2..2 of float 4 | This will be empty.
The first entry is the x coordinate and the second entry is the y coordinate. Both x and y are between 0 and 1. ct | uint16 | This will be empty.
alert | string | This will be set to "none".
ct | uint16 | The Mired Color temperature of the light. 2012 connected lights are capable of 153 (6500K) to 500 (2000K). effect | string | This will be set to "none".
alert | string | The alert effect, which is a temporary change to the bulb<6C>s state. This can take one of the following values: colormode | string 2, 2 | This will be empty.
<EFBFBD>none<EFBFBD> <20> The light is not performing an alert effect. reachable | bool | Indicates if a light can be reached by the bridge and will be set to true.
<EFBFBD>select<EFBFBD> <20> The light is performing one breathe cycle.
<EFBFBD>lselect<EFBFBD> <20> The light is performing breathe cycles for 15 seconds or until an "alert": "none" command is received.
Note that this contains the last alert sent to the light and not its current state. i.e. After the breathe cycle has finished the bridge does not reset the alert to "none".
effect | string | The dynamic effect of the light, can either be <20>none<6E> or <20>colorloop<6F>.
If set to colorloop, the light will cycle through all hues using the current brightness and saturation settings.
colormode | string 2, 2 | Indicates the color mode in which the light is working, this is the last command type it received. Values are <20>hs<68> for Hue and Saturation, <20>xy<78> for XY and <20>ct<63> for Color Temperature. This parameter is only present when the light supports at least one of the values.
reachable | bool | Indicates if a light can be reached by the bridge.
#### Response example #### Response example
``` ```
{ {
"state": { "state": {
"hue": 50000, "hue": 0,
"on": true, "on": true,
"effect": "none", "effect": "none",
"alert": "none", "alert": "none",
"bri": 200, "bri": 254,
"sat": 200, "sat": 254,
"ct": 500, "ct": 0,
"xy": [0.5, 0.5], "xy": [0, 0],
"reachable": true, "reachable": true,
"colormode": "hs" "colormode": ""
}, },
"type": "Living Colors", "type": "Dimmable light",
"name": "LC 1", "name": "Kitchen Ceiling",
"modelid": "LC0015", "modelid": "LWB004",
"swversion": "1.0.3", "swversion": "65003148",
"pointsymbol": { "pointsymbol": {
"1": "none", "1": "none",
"2": "none", "2": "none",
@@ -316,6 +305,7 @@ Allows the user to turn the light on and off, modify the hue and effects. Please
#### Body arguments #### Body arguments
Name | Type | Description Name | Type | Description
-----|-------|-------------
on | bool | On/Off state of the light. On=true, Off=false. Optional on | bool | On/Off state of the light. On=true, Off=false. Optional
bri | uint8 | The brightness value to set the light to. Brightness is a scale from 1 (the minimum the light is capable of) to 254 (the maximum). Note: a brightness of 1 is not off. e.g. <20>brightness<73>: 60 will set the light to a specific brightness. Optional bri | uint8 | The brightness value to set the light to. Brightness is a scale from 1 (the minimum the light is capable of) to 254 (the maximum). Note: a brightness of 1 is not off. e.g. <20>brightness<73>: 60 will set the light to a specific brightness. Optional
#### Body example #### Body example
@@ -326,7 +316,7 @@ bri | uint8 | The brightness value to set the light to. Brightness is a scale fr
} }
``` ```
#### Response #### Response
A response to a successful PUT request contains confirmation of the arguments passed in. Note: If the new value is too large to return in the response due to internal memory constraints then a value of <20>Updated.<2E> is returned. A response to a successful PUT request contains confirmation of the arguments passed in. Note: If the new value is too large to return in the response due to internal memory constraints then a value of `<EFBFBD>Updated.<2E>` is returned.
#### Response example #### Response example
``` ```