|
1 | 1 | # Change Log |
2 | 2 |
|
| 3 | +## 4.0.0 |
| 4 | +- Deprecated v2 API and shim and modules removed from library |
| 5 | + |
| 6 | +- Introduced rate limiting in the Light and Group set States to be compliant with the Hue API documentation best practices. |
| 7 | + This only has an impact on this library, so it may be possible if you are running other software on your network |
| 8 | + accessing the Bridge, you will still able to overload it. |
| 9 | + * The whole API is currently limited to 12 requests per second by default (currently not configurable) |
| 10 | + * `lights.setLightState()` is limited to 10 requests per second |
| 11 | + * `groups.setState()` is limited to 1 request per second |
| 12 | + |
| 13 | +- `v3.discovery.nupnp()` Now returns a different payload as it no longer accesses the XML Discovery endpoint to return |
| 14 | + the bridge data as this can become unreliable when the bridge is overloaded. See the [documentation](./docs/discovery.md#n-upnpsearch) |
| 15 | + for specifics. |
| 16 | + |
| 17 | +- `v3.api` removed the `create` function as it was deprecated, use `createRemote()` fro the remote API, `createLocal()` |
| 18 | + for the local API or `createInsecureLocal()` for non-hue bridges that do not support https connections |
| 19 | + |
| 20 | +- `v3.Scene` has been removed, use the following functions to create a new Scene instance: |
| 21 | + * `v3.model.createLightScene()` |
| 22 | + * `v3.model.createGroupScene()` |
| 23 | + |
| 24 | + This change has also allowed for the separation of the attributes and getter/setters locked down properly based on |
| 25 | + the type of Scene, i.e. Cannot change the lights in a GroupScene (as they are controlled by the Group). |
| 26 | + |
| 27 | +- `v3.sensors` has been removed, use `v3.model.createCLIPxxx()` functions instead |
| 28 | + |
| 29 | +- `v3.rules` has been moved into `v3.model` |
| 30 | + * To create a `Rule` use `v3.model.createRule()` |
| 31 | + * To create a `RuleCondition` use `v3.model.ruleConditions.[group|sensor]` |
| 32 | + * To create a `RuleAction` use `v3.model.ruleActions.[light|group|sensor|scene]` |
| 33 | + |
| 34 | +- `v3.model` added to support exposing the underlying model objects that represent bridge objects. This module will allow |
| 35 | + you to create all of the necessary objects, e.g. `createGroupScene()` |
| 36 | + |
| 37 | +- Capabilities API: |
| 38 | + * `capabilities.getAll()` now returns a [`Capabilities` object](./docs/capabilities.md#capabilities-object) |
| 39 | + |
| 40 | +- Groups API: |
| 41 | + * The following API functions will accept a Light Object as the `id` parameter as well as an integer value: |
| 42 | + * `groups.get(id)` |
| 43 | + * `groups.getGroup(id)` |
| 44 | + * `deleteGroup(id)` |
| 45 | + * `enableStreaming(id)` |
| 46 | + * `disableStreaming(id)` |
| 47 | + * `groups.createGroup(group)` introduced, it expects a pre-configured Group instance created using the model functions: |
| 48 | + * `model.createLightGroup()` |
| 49 | + * `model.createEntertainment()` |
| 50 | + * `model.createRoom()` |
| 51 | + * `model.createZone()` |
| 52 | + * `groups.get(id)` has been deprecated, use `groups.getGroup(id)` instead. |
| 53 | + * `groups.createGroup(name, lights)` has been deprecated, use `groups.createGroup(group)` instead. |
| 54 | + * `groups.createRoom(name, lights, roomClass)` has been deprecated, use `groups.createGroup(group)` instead. |
| 55 | + * `groups.createZone(name, lights, roomClass)` has been deprecated, use `groups.createGroup(group)` instead. |
| 56 | + * `groups.updateAttributes(id, data)` has been deprecated, Use `groups.updateGroupAttributes(group)` instead. |
| 57 | + |
| 58 | +- Lights API: |
| 59 | + * `getLightById(id)` is deprecated use `getLight(id)` instead |
| 60 | + * `rename(id, name)` is deprecated, use `renameLight(light)` instead |
| 61 | + * The following API functions will accept a Light Object as the `id` parameter as well as an integer value: |
| 62 | + * `getLight(id)` |
| 63 | + * `getLightById(id)` |
| 64 | + * `getLightAttributesAndState(id)` |
| 65 | + * `getLightState(id)` |
| 66 | + * `setLightState(id, state)` |
| 67 | + * `deleteLight(id)` |
| 68 | + |
| 69 | +- Scenes API: |
| 70 | + * `getScene(id)` introduced, can take a scene id or `Scene` instance as the id value |
| 71 | + * `get(id)` has been deprecated, use `getScene(id)` instead |
| 72 | + * `getByName(name)` has been depricated use `getSceneByName(name)` instead |
| 73 | + * `updateScene(scene)` introduced to replace `update(id, scene)` for updating Scenes |
| 74 | + * `update(id, scene)` has been deprecated, will be removed in `5.x`, use `updateScene(scene)` instead |
| 75 | + * `deleteScene(id)` can accept a scene id or a `Scene` object as the `id` parameter |
| 76 | + * `activateScene(id)` can accept a scene id value or a `Scene` object |
| 77 | + * `updateLightState(id, lightId, sceneLightState)` can take an id value or `Scene`/`Light` for the `id` and `lightId` values respectively |
| 78 | + |
| 79 | +- Sensors API: |
| 80 | + * `get(id)` has been depreciated use `getSensor(id)` instead |
| 81 | + * `getSensor(id)` will accept a `Sensor` Object as the `id` or the integer `id` value as parameter. |
| 82 | + * `updateName(id, name)` has been deprecated, will be removed in `5.x`, use `reanmeSensor(sensor)` instead |
| 83 | + * `renameSensor(sensor)` has been added to allow updating of the name only for a sensor (makes API consistent with `lights` and `sensors`) |
| 84 | + * `getSensorByName(name)` added to get sensors by `name` |
| 85 | + |
| 86 | +- Rules API: |
| 87 | + * The following API functions will accept a Rule Object as the `id` parameter as well as an integer value: |
| 88 | + * `get(id)` |
| 89 | + * `deleteRule(id)` |
| 90 | + * Added `getRuleByName(name)` function to get rules by `name` |
| 91 | + * Rule Actions were common to the new `Schedules`, so have been moved from `v3.model.ruleActions` to `v3.model.actions`. |
| 92 | + Use of `v3.model.ruleActions` is considered deprecated. |
| 93 | + |
| 94 | +- Schedules API: |
| 95 | + * The schedules API is finally properly implemented, along with all the various Hue Bridge TimePatterns |
| 96 | + * `model.timePatterns` provides an interface with creating the various timePatterns, consult the [documentation](./docs/timePatterns.mc) for details |
| 97 | + |
| 98 | + * The previous `schedules.update(id, schedule)` function has been removed and replaced with `schedules.update(schedule)`. |
| 99 | + |
| 100 | + _I am fairly sure that the previous version was most likely never used (base on the implmenetation as it would |
| 101 | + have likely errored). With this knowledge, it was not deprecated and just removed. If you are impacted by this change, please raise an Issue._ |
| 102 | + |
| 103 | +- ResourceLinks API: |
| 104 | + * New API interacting with `ResourceLinks` via, `api.resourceLinks`, see [documentation](./docs/resourcelinks.md) for more details. |
| 105 | + |
| 106 | +- Configuration API: |
| 107 | + * `get()` has been deprecated, use `getConfiguration()` instead |
| 108 | + * `update()` has bee depricated, use `updateConfiguration()` instead |
| 109 | + |
| 110 | +- All creation function calls to the bridge will now return the created model object. This change makes it consistent as |
| 111 | + some calls would return the object, others would return the id but no other data. |
| 112 | + |
| 113 | + This changes return object from the promise on the following calls: |
| 114 | + * `api.rules.createRule()` |
| 115 | + * `api.scenes.createScene()` |
| 116 | + * `api.sensors.createSensor()` |
| 117 | + |
| 118 | +- Type system from the `LightState` definitions is now used in all Bridge Object Models to define the attributes/properties |
| 119 | + obtained from the Bridge. |
| 120 | + |
| 121 | + This provides a consistent validation mechanism to all bridge related attributes data. As part of this being used in |
| 122 | + the models, some validation is performed at the time of setting a value instead of waiting on when sending it to the |
| 123 | + hue bridge (some things still have to wait be sent to the bridge) so the validation is closer to the point of call. |
| 124 | + |
| 125 | +- Added ability to serialize a model object into JSON and then restore it to a corresponding object from the JSON |
| 126 | + payload. This was requested to aid in server/client side code situations, as the creation of the model objects are |
| 127 | + not directly exposed in the library by design. Related to issue #132 |
| 128 | + |
| 129 | +- Creating Sensors (CLIP variety) has changed as the classes for the sensor objects are no longer directly accessible. |
| 130 | + All `CLIPxxx` sensors need to be built from the `v3.model.createCLIP[xxx]Sensor()` function for the desired type, |
| 131 | + e.g. `v3.model.createCLIPGenericStatusSensor()` for a `CLIPGenericStatus` sensor. |
| 132 | + |
| 133 | + The function call to instantiate the sensors also no longer take an object to set various attributes of the sensor, |
| 134 | + you need to call the approriate setter on the class now to set the attribute, e.g. `sensor.manufacturername = 'node-hue-api-sensor';` |
| 135 | + |
| 136 | +- TypeScript definitions added to the library |
| 137 | + |
| 138 | +- Adding more in-depth tests to further increase coverage around types and models, and adding more edge case API level tests |
| 139 | + |
3 | 140 | ## 3.4.3 |
4 | 141 | - Long term fix for supporting older bridge types and creating new users. Issue #147 |
5 | 142 |
|
|
0 commit comments