diff --git a/APPSTORE.md b/APPSTORE.md index f4ffa93..c9976a3 100644 --- a/APPSTORE.md +++ b/APPSTORE.md @@ -42,8 +42,9 @@ For Homey to be able to communicate with devices over the miIO protocol a unique * [ACTIONS] Power on/off, Set speed ## Changelog -### 2017-11-11 -- v2.3.2 +### 2017-11-30 -- v2.3.2 * FIX: added a keep-alive to Yeelight connections to maintain the connection over time +* FIX: fixed pairing wizard for Humidifier and Purifier ### 2017-11-06 -- v2.3.1 * UPDATE: code rewrite for SDK2 diff --git a/app.json b/app.json index 45dcb63..4406a95 100644 --- a/app.json +++ b/app.json @@ -18,11 +18,13 @@ "contributing": { "donate": { "paypal": { - "email": "paypal@solidewebservices.com", - "currency": "EUR" + "username": "jghaanstra" } } }, + "bugs": { + "url": "https://github.com/jghaanstra/com.xiaomi-miio/issues" + }, "images": { "large": "./assets/images/large.jpg", "small": "./assets/images/small.jpg" diff --git a/drivers/mi-airpurifier/pair/start.html b/drivers/mi-airpurifier/pair/start.html index 009df7f..18b3308 100644 --- a/drivers/mi-airpurifier/pair/start.html +++ b/drivers/mi-airpurifier/pair/start.html @@ -17,7 +17,7 @@ token: inputtoken }; - Homey.emit('test-connection', device_data, function(error, result) { + Homey.emit('testConnection', device_data, function(error, result) { if(error) { $('.mi-device-error').show(); $('.mi-device-error-msg').html(error.message || error.toString()); diff --git a/drivers/mi-humidifier/pair/start.html b/drivers/mi-humidifier/pair/start.html index f557a14..d9c20b3 100644 --- a/drivers/mi-humidifier/pair/start.html +++ b/drivers/mi-humidifier/pair/start.html @@ -17,7 +17,7 @@ token: inputtoken }; - Homey.emit('test-connection', device_data, function(error, result) { + Homey.emit('testConnection', device_data, function(error, result) { if(error) { $('.mi-device-error').show(); $('.mi-device-error-msg').html( error.message || error.toString() ); diff --git a/drivers/mi-robot/pair/start.html b/drivers/mi-robot/pair/start.html deleted file mode 100644 index 15121e4..0000000 --- a/drivers/mi-robot/pair/start.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - -

Enter the details of your Mi Home device.

- -
- - -
-
- - -
-
- - -
-
- - -
- -
-

Mi Robot find message send succesfully, did you hear the robot?

-

Mi Home device added succesfully.

-

-
diff --git a/drivers/yeelights/device.js b/drivers/yeelights/device.js index 83f15cf..68fdea7 100644 --- a/drivers/yeelights/device.js +++ b/drivers/yeelights/device.js @@ -96,7 +96,7 @@ class YeelightDevice extends Homey.Device { if (yeelights[id].socket === null) { yeelights[id].socket = new net.Socket(); yeelights[id].socket.connect(yeelights[id].data.port, yeelights[id].data.address); - socket.setKeepAlive(true, 60000); + yeelights[id].socket.setKeepAlive(true, 60000); } } catch (error) { console.log("Yeelight: error creating socket " + error); diff --git a/lib/util.js b/lib/util.js index 36bac26..d629bb8 100644 --- a/lib/util.js +++ b/lib/util.js @@ -140,19 +140,10 @@ exports.sendCommand = function (command, value, address, token) { default: this.log("Not a valid command"); return reject("Not a valid command"); + } }).catch(function (error) { return reject(error); }) }) } - -exports.normalize = function (value, min, max) { - var normalized = (value - min) / (max - min); - return normalized; -} - -exports.denormalize = function (normalized, min, max) { - var denormalized = ((1 - normalized) * (max - min) + min); - return denormalized; -} diff --git a/package.json b/package.json index de5d6fa..b9e439e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "com.xiaomi-miio", - "version": "2.3.1", + "version": "2.3.2", "description": "Xiaomi Mi Home", "main": "app.js", "dependencies": {