diff --git a/lib/HueBridge.js b/lib/HueBridge.js index 758a3f1f..35c5528c 100644 --- a/lib/HueBridge.js +++ b/lib/HueBridge.js @@ -72,8 +72,7 @@ HueBridge.prototype.accessories = function() { // jshint -W106 this.accessoryMap = {}; this.accessoryList = []; - return this._request('get', 'philipshue/config').then(function(obj) { - // return this._request('get', '/config').then(function(obj) { + return this._request('get', '/config').then(function(obj) { this.name = obj.name; this.uuid_base = obj.bridgeid; this.username = this.platform.config.users[this.uuid_base] || ''; @@ -96,15 +95,18 @@ HueBridge.prototype.accessories = function() { ); } break; - case undefined: // deCONZ rest api + case undefined: // deCONZ rest api v2_04_40 obj.modelid = 'deCONZ'; // HACK - obj.manufacturername = 'dresden elektronik'; this.uuid_base = obj.mac; // HACK + /* falls through */ + case 'deCONZ': // deCONZ rest api + obj.manufacturername = 'dresden elektronik'; this.config.linkbutton = false; break; default: this.log.error( - '%s: warning: %s: unknown bridge', this.name, obj.modelid + '%s: warning: %s: warning: ignoring unknown bridge type %j', + this.name, obj ); break; } diff --git a/lib/HueSensor.js b/lib/HueSensor.js index 28c13361..0c68a58d 100644 --- a/lib/HueSensor.js +++ b/lib/HueSensor.js @@ -120,11 +120,13 @@ function HueSensor(bridge, id, obj) { let buttons; if ( this.obj.manufacturername === 'Philips' && - this.obj.modelid === 'RWL021') { + (this.obj.modelid === 'RWL021' || this.obj.modelid === 'RWL020') + ) { buttons = ['On', 'Dim Up', 'Dim Down', 'Off']; } else if ( this.obj.manufacturername === 'IKEA of Sweden' && - this.obj.modelid === 'TRADFRI remote control') { + this.obj.modelid === 'TRADFRI remote control' + ) { buttons = ['On/Off', 'Dim Up', 'Dim Down', 'Previous', 'Next']; } else { this.log.error( @@ -302,13 +304,13 @@ function HueSensor(bridge, id, obj) { break; case 'CLIPSwitch': // 2.1 this.log.error( - '%s: %s: unsupported sensor type %s', + '%s: %s: warning: ignoring unsupported sensor type %s', this.bridge.name, this.resource, this.obj.type ); break; default: this.log.error( - '%s: %s: unknown sensor type %j', + '%s: %s: warning: ignoring unknown sensor type %j', this.bridge.name, this.resource, this.obj ); break;