Skip to content

Commit

Permalink
Remove mention of deCONZ from documentation.
Browse files Browse the repository at this point in the history
See #1070.
  • Loading branch information
ebaauw committed Dec 11, 2023
1 parent 02e484b commit d59d454
Show file tree
Hide file tree
Showing 10 changed files with 45 additions and 136 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// homebridge-hue/index.js
// Copyright © 2016-2023 Erik Baauw. All rights reserved.
//
// Homebridge plug-in for Philips Hue and/or deCONZ.
// Homebridge plug-in for Philips Hue.

'use strict'

Expand Down
23 changes: 18 additions & 5 deletions lib/EventStreamClient.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// homebridge-hue/lib/EventStreamClient.js
//
// Homebridge plug-in for Philips Hue and/or deCONZ.
// Homebridge plug-in for Philips Hue.
// Copyright © 2021-2023 Erik Baauw. All rights reserved.

'use strict'
Expand Down Expand Up @@ -28,10 +28,8 @@ class EventStreamClient extends events.EventEmitter {
* reconnect when the server connection has been closed.
* @param {boolean} [params.raw=false] - Issue raw events instead of parsing
* them.<br>
* When specified, {@link WsMonitor#event:notification notification}
* events are emitted, in lieu of {@link WsMonitor#event:changed changed},
* {@link WsMonitor#event:added added}, and
* {@link WsMonitor#event:sceneRecall sceneRecall} events.
* When specified, {@link EventStreamClient#event:notification notification}
* events are emitted, in lieu of {@link EventStreamClient#event:changed changed}.
*/
constructor (client, params = {}) {
super()
Expand Down Expand Up @@ -280,6 +278,15 @@ class EventStreamClient extends events.EventEmitter {
}
}
if (Object.keys(attr).length > 0) {
/** Emitted when a `changed` notification has been received.
* @event EventStreamClient#changed
* @param {string} resource - The changed resource.<br>
* This can be a `/lights`, `/groups`, or `/sensors`
* resource for top-level attributes, or a `state` or
* `config` sub-resource.
* @param {object} attributes - The top-level, `state`,
* `config`, or `capabilities` attributes.
*/
this.emit('changed', resource, attr)
emitted = true
}
Expand All @@ -293,6 +300,12 @@ class EventStreamClient extends events.EventEmitter {
}
}
if (!emitted) {
/** Emitted when an unknown notification has been received, or when
* `params.raw` was specified to the
* {@link EventStreamClient constructor}.
* @event EventStreamClient#notification
* @param {object} notification - The raw notification.
*/
this.emit('notification', obj)
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/HueAccessory.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// homebridge-hue/lib/HueAccessory.js
// Copyright © 2016-2023 Erik Baauw. All rights reserved.
//
// Homebridge plugin for Philips Hue and/or deCONZ.
// Homebridge plug-in for Philips Hue.

'use strict'

Expand Down
4 changes: 2 additions & 2 deletions lib/HueBridge.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// homebridge-hue/lib/HueBridge.js
// Copyright © 2016-2023 Erik Baauw. All rights reserved.
//
// Homebridge plugin for Philips Hue and/or deCONZ.
// Homebridge plugin for Philips Hue.

'use strict'

Expand Down Expand Up @@ -205,7 +205,7 @@ HueBridge.prototype.exposeBridge = async function () {
)
this.log.info(this.idString)
if (this.platform.config.homebridgeDeconz === '') {
this.log.warn(
this.log.error(
'%s: warning: support for deCONZ has been deprecated in favour of Homebridge deCONZ',
this.name
)
Expand Down
76 changes: 18 additions & 58 deletions lib/HueClient.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// homebridge-hue/lib/HueClient.js
//
// Homebridge plug-in for Philips Hue and/or deCONZ.
// Homebridge plug-in for Philips Hue.
// Copyright © 2018-2023 Erik Baauw. All rights reserved.

'use strict'
Expand Down Expand Up @@ -89,21 +89,16 @@ class HueResponse extends HttpClient.HttpResponse {
get errors () {}
}

/** REST API client for Hue bridge, deCONZ gateway, and compatible servers.
/** REST API client for Hue bridge and compatible servers.
*
* See the [Hue API](https://developers.meethue.com/develop/get-started-2/)
* and [deCONZ API](https://dresden-elektronik.github.io/deconz-rest-doc/)
* documentation for a better understanding of the APIs.
* documentation for a better understanding of the API.
* @extends HttpClient
*/
class HueClient extends HttpClient {
static get HueError () { return HueError }
static get HueResponse () { return HueResponse }

/** Check if bridgeid is for a deCONZ gateway.
* @param {string} bridgeid - The bridge ID.
* @returns {boolean}
*/
static isDeconzBridgeId (bridgeid) {
return deconzMacPrefixes.includes(bridgeid.slice(0, 6))
}
Expand All @@ -119,7 +114,7 @@ class HueClient extends HttpClient {
/** Create a new instance of a HueClient.
*
* The caller is expected to verify that the given host is a reachable Hue
* bridge or deCONZ gateway, by calling
* bridge, by calling
* {@link HueDiscovery#config HueDiscovery#config()} and passing the
* response as `params.config`.<br>
* The caller is expected to persist the username (API key),
Expand All @@ -142,17 +137,13 @@ class HueClient extends HttpClient {
* with firmware v1.24.0 or greater.
* @param {boolean} [params.forceHttp=false] - Force HTTP instead of HTTPS
* for Hue bridge with firmware v1.24.0 and greater.
* @param {!string} params.host - Hostname/IP address and port of the Hue
* bridge or deCONZ gateway.
* @param {!string} params.host - Hostname/IP address of the Hue bridge.
* @param {boolean} [params.keepAlive=false] - Keep server connection(s)
* open.
* @param {integer} [params.maxSockets=20] - Throttle requests to maximum
* number of parallel connections.
* @param {boolean} [params.phoscon=false] - Mimic Phoscon web app to use
* deCONZ gateway API extensions.
* @param {integer} [params.timeout=5] - Request timeout (in seconds).
* @param {?string} params.username - The API key of the Hue bridge or
* deCONZ gateway.
* @param {?string} params.username - The API key of the Hue bridge.
* @param {integer} [params.waitTimePut=50] - The time (in milliseconds),
* after sending a PUT request, to wait before sending another PUT request.
* @param {integer} [params.waitTimePutGroup=1000] - The time (in
Expand Down Expand Up @@ -231,7 +222,7 @@ class HueClient extends HttpClient {
this.setMaxListeners(30)
}

/** The ID (Zigbee mac address) of the Hue bridge or deCONZ gateway.
/** The ID (mac address) of the Hue bridge.
* @type {string}
* @readonly
*/
Expand All @@ -245,10 +236,6 @@ class HueClient extends HttpClient {
get fingerprint () { return this._options.fingerprint }
set fingerprint (value) { this._options.fingerprint = value }

/** True when connected to a deCONZ gateway.
* @type {boolean}
* @readonly
*/
get isDeconz () { return this._options.isDeconz }

/** True when connected to a Hue bridge.
Expand Down Expand Up @@ -411,7 +398,7 @@ class HueClient extends HttpClient {
* Calls {@link HueClient#post post()} to issue a POST request to `/api`.
*
* Before calling `createuser`, the link button on the Hue bridge must be
* pressed, or the deCONZ gateway must be unlocked.
* pressed.
* @return {string} username - The newly created API key.
* @throws {HueError} In case of error.
*/
Expand All @@ -436,7 +423,7 @@ class HueClient extends HttpClient {
*
* Calls {@link HueClient#put put()} to issue a PUT request to
* `/api/`_username_`/config`.
* On a Hue bridge, this is the API equivalent of pressing the link button.
* This is the API equivalent of pressing the link button on the Hue bridge.
*
* Note that as of firmware v1.31.0, the gen-2 Hue bridge no longer allows
* unlocking the bridge through the API.
Expand All @@ -450,28 +437,12 @@ class HueClient extends HttpClient {
return this.put('/config', { linkbutton: true })
}

/** Initiate a touchlink pairing (Hue bridge)
* or touchlink scan (deCONZ gateway).
/** Initiate a touchlink pairing.
*
* When connected to a Hue bridge, calls {@link HueClient#put put()} to issue
* Calls {@link HueClient#put put()} to issue
* a PUT request to `/api/`_username_`/config` to initiate touchlink pairing.
* This is the API equivalent of holding the link button on the Hue bridge.
*
* Note that deCONZ doesn't support touchlink pairing, only touchlink scan,
* identify, and reset.
* When connected to a deCONZ gateway, calls {@link HueClient#post post()}
* to issue a POST request to `/api/`_username_`/touchlink/scan`,
* to initiate a touchlink scan.
* As the ConBee II and RaspBee II firmware lack support for touchlink,
* this will only work for the original ConBee and RaspBee.
* To see the results of the scan, issue a GET request of
* `/api/`_username_`/touchlink/scan`.
* The ID returned in the scan results is needed to touchlink identify or
* reset the device.
* To issue a touchlink identify, issue a POST request of
* `/api/`_username_`/touchlink/`_ID_`/identify`.
* To issue a touchlink reset, issue a POST request to
* `/api/`_username_`/touchlink/`_ID_`/reset`.
* @return {HueResponse} response - The response.
* @throws {HueError} In case of error.
*/
Expand All @@ -484,13 +455,8 @@ class HueClient extends HttpClient {

/** Search for new devices.
*
* When connected to a Hue bridge, calls {@link HueClient#post post()} to
* issue a POST request to `/api/`_username_`/lights`, to enable pairing of
* new Zigbee devices.
*
* When connected to a deCONZ gateway, calls {@link HueClient#put put()} to
* issue a PUT request to `/api/`_username_`/config`, to enable pairing of
* new Zigbee devices.
* Calls {@link HueClient#post post()} to issue a POST request to
* `/api/`_username_`/lights`, to enable pairing of new Zigbee devices.
*
* To see the newly paired devices, issue a GET request of
* `/api/`_username_`/lights/new` and/or `/api/`_username_`/sensor/new`
Expand All @@ -504,14 +470,9 @@ class HueClient extends HttpClient {
return this.post('/lights')
}

/** Restart the bridge or gateway.
* When connected to a Hue bridge, calls {@link HueClient#put put()} to
* issue a PUT request to `/api/`_username_`/config`, to reboot the Hue
* bridge.
*
* When connected to a deCONZ gateway, calls {@link HueClient#post post()}
* to issue a POST request to `/api/`_username_`/config/restartapp`, to
* restart the deCONZ gateway.
/** Restart the bridge.
* Calls {@link HueClient#put put()} to issue a PUT request to
* `/api/`_username_`/config`, to reboot the Hue bridge.
*
* @return {HueResponse} response - The response.
* @throws {HueError} In case of error.
Expand Down Expand Up @@ -557,7 +518,7 @@ class HueClient extends HttpClient {
}
}

/** Issue an HTTP request to the Hue bridge or deCONZ gateway.
/** Issue an HTTP request to the Hue bridge.
*
* This method does the heavy lifting for {@link HueClient#get get()},
* {@link HueClient#put put()}, {@link HueClient#post post()}, and
Expand Down Expand Up @@ -588,8 +549,7 @@ class HueClient extends HttpClient {
error.type = e.type
error.description = e.description
error.nonCritical = nonCriticalApiErrorTypes.includes(error.type)
/** Emitted for each API error returned by the Hue bridge
* or deCONZ gateway.
/** Emitted for each API error returned by the Hue bridge.
*
* @event HueClient#error
* @param {HueError} error - The error.
Expand Down
2 changes: 1 addition & 1 deletion lib/HueLight.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// homebridge-hue/lib/HueLight.js
// Copyright © 2016-2023 Erik Baauw. All rights reserved.
//
// Homebridge plugin for Philips Hue and/or deCONZ.
// Homebridge plug-in for Philips Hue.

'use strict'

Expand Down
5 changes: 1 addition & 4 deletions lib/HuePlatform.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// homebridge-hue/lib/HuePlatform.js
// Copyright © 2016-2023 Erik Baauw. All rights reserved.
//
// Homebridge plugin for Philips Hue and/or deCONZ.
// Homebridge plugin for Philips Hue.

'use strict'

Expand Down Expand Up @@ -339,9 +339,6 @@ HuePlatform.prototype.identify = function () {
'%s v%s, node %s, homebridge v%s', packageJson.name,
packageJson.version, process.version, this.api.serverVersion
)
this.log.warn(
'warning: planned changes, see https://github.com/ebaauw/homebridge-hue/issues/1070'
)
if (semver.clean(process.version) !== recommendedNodeVersion(packageJson)) {
this.log.warn(
'warning: recommended version: node v%s LTS',
Expand Down
2 changes: 1 addition & 1 deletion lib/HueSchedule.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// homebridge-hue/lib/HueSchedule.js
// Copyright © 2016-2023 Erik Baauw. All rights reserved.
//
// Homebridge plugin for Philips Hue and/or deCONZ.
// Homebridge plug-in for Philips Hue.

'use strict'

Expand Down
2 changes: 1 addition & 1 deletion lib/HueSensor.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// homebridge-hue/lib/HueSensor.js
// Copyright © 2016-2023 Erik Baauw. All rights reserved.
//
// Homebridge plugin for Philips Hue and/or deCONZ.
// Homebridge plug-in for Philips Hue.

'use strict'

Expand Down
Loading

0 comments on commit d59d454

Please sign in to comment.