diff --git a/app.json b/app.json index e28584f..d2664cb 100644 --- a/app.json +++ b/app.json @@ -1479,37 +1479,6 @@ "hint": { "en": "Enable debug in case the application is crashing. It allows developer to investigate the issue" } - }, - { - "id": "encryption_mode", - "type": "dropdown", - "value": "auto", - "label": { - "en": "Encryption mode" - }, - "hint": { - "en": "Encryption mode used by the HVAC. Most recent firmwares use V2" - }, - "values": [ - { - "id": "auto", - "label": { - "en": "Autodetect (not implemented yet, V1 used instead)" - } - }, - { - "id": "v1", - "label": { - "en": "V1 (HVAC Firmware versions <1.21)" - } - }, - { - "id": "v2", - "label": { - "en": "V2 (HVAC Firmware versions >=1.21)" - } - } - ] } ], "images": { diff --git a/drivers/gree_cooper_hunter_hvac/device.js b/drivers/gree_cooper_hunter_hvac/device.js index f4a0b0b..1cbfc88 100644 --- a/drivers/gree_cooper_hunter_hvac/device.js +++ b/drivers/gree_cooper_hunter_hvac/device.js @@ -82,7 +82,6 @@ class GreeHVACDevice extends Homey.Device { const deviceData = this.getData(); const settings = this.getSettings(); - const encryptionVersion = this.mapEncryptionModeSetting(settings.encryption_mode); this.log('[find devices]', 'Finding device with mac:', deviceData.mac); @@ -104,7 +103,6 @@ class GreeHVACDevice extends Homey.Device { pollingInterval: POLLING_INTERVAL, pollingTimeout: POLLING_TIMEOUT, connectTimeout: CONNECT_TIMEOUT, - encryptionVersion, }); this._registerClientListeners(); @@ -676,28 +674,9 @@ class GreeHVACDevice extends Homey.Device { } } - if (changedKeys.indexOf('encryption_mode') > -1) { - this.log('Changing the encryption mode setting from', oldSettings.encryption_mode, 'to', newSettings.encryption_mode); - this.homey.setTimeout(this.reconnect.bind(this), 1000); - } - return Promise.resolve(); } - mapEncryptionModeSetting(encryptionMode) { - switch (encryptionMode) { - // not implemented yet - case 'auto': - case 'v1': - default: - // AES-ECB - return 1; - case 'v2': - // AES-GCM - return 2; - } - } - reconnect() { this.log('Reconnecting to the HVAC'); this._markOffline(); diff --git a/drivers/gree_cooper_hunter_hvac/driver.compose.json b/drivers/gree_cooper_hunter_hvac/driver.compose.json index 0f02fee..a73f2d6 100644 --- a/drivers/gree_cooper_hunter_hvac/driver.compose.json +++ b/drivers/gree_cooper_hunter_hvac/driver.compose.json @@ -106,37 +106,6 @@ "hint": { "en": "Enable debug in case the application is crashing. It allows developer to investigate the issue" } - }, - { - "id": "encryption_mode", - "type": "dropdown", - "value": "auto", - "label": { - "en": "Encryption mode" - }, - "hint": { - "en": "Encryption mode used by the HVAC. Most recent firmwares use V2" - }, - "values": [ - { - "id": "auto", - "label": { - "en": "Autodetect (not implemented yet, V1 used instead)" - } - }, - { - "id": "v1", - "label": { - "en": "V1 (HVAC Firmware versions <1.21)" - } - }, - { - "id": "v2", - "label": { - "en": "V2 (HVAC Firmware versions >=1.21)" - } - } - ] } ], "images": { diff --git a/package-lock.json b/package-lock.json index 7166bc6..790c29e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6,7 +6,7 @@ "": { "license": "GPL-3.0-or-later", "dependencies": { - "gree-hvac-client": "github:aivus/gree-hvac-client#com.gree/encryption", + "gree-hvac-client": "github:aivus/gree-hvac-client#com.gree/gcm", "homey-log": "^2.1.0" }, "devDependencies": { @@ -3627,7 +3627,7 @@ }, "node_modules/gree-hvac-client": { "version": "0.0.0-development", - "resolved": "git+ssh://git@github.com/aivus/gree-hvac-client.git#7d51627adb76ba50b48fa4f9cd494741c3f2e409", + "resolved": "git+ssh://git@github.com/aivus/gree-hvac-client.git#4fd7331f41f518e869534249aa6ac800aea842a2", "license": "GPL-3.0", "dependencies": { "clone": "^2.1.2", @@ -10534,8 +10534,8 @@ "dev": true }, "gree-hvac-client": { - "version": "git+ssh://git@github.com/aivus/gree-hvac-client.git#7d51627adb76ba50b48fa4f9cd494741c3f2e409", - "from": "gree-hvac-client@github:aivus/gree-hvac-client#com.gree/encryption", + "version": "git+ssh://git@github.com/aivus/gree-hvac-client.git#4fd7331f41f518e869534249aa6ac800aea842a2", + "from": "gree-hvac-client@github:aivus/gree-hvac-client#com.gree/gcm", "requires": { "clone": "^2.1.2", "object-diff": "^0.0.4" diff --git a/package.json b/package.json index 9f115a0..ad8b2ae 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ }, "homepage": "https://github.com/aivus/com.gree#readme", "dependencies": { - "gree-hvac-client": "github:aivus/gree-hvac-client#com.gree/encryption", + "gree-hvac-client": "github:aivus/gree-hvac-client#com.gree/gcm", "homey-log": "^2.1.0" }, "devDependencies": {