Skip to content

Commit

Permalink
Release 2.9.2
Browse files Browse the repository at this point in the history
  • Loading branch information
jghaanstra committed Nov 28, 2018
1 parent c978cf3 commit 9baec25
Show file tree
Hide file tree
Showing 15 changed files with 149 additions and 132 deletions.
9 changes: 3 additions & 6 deletions APPSTORE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This app uses an unofficial library called the [miIO Device Library](https://git
## Supported devices
Below is a list of supported devices and devices. Post a comment in the [support topic](https://forum.athom.com/discussion/3295/) if you would like to see support for a specific device, some devices might already be supported by the miio library but just need to be implemented. For devices not yet support by the miio library you need technical knowledge to discover the device properties yourself as described [here](https://github.com/aholstenson/miio/blob/master/docs/missing-devices.md).
* Yeelights: Bulbs Wi-Fi (tested), LED strips (tested), Bedside Lamp II (tested), Ceiling Lights (tested), Desk Lamp (tested)
* Xiaomi Philips: Light Bulbs (tested)
* Xiaomi Philips Lights (tested)
* Xiaomi Robot Vacuum Cleaner V1 (tested) and Xiaomi Robot Vacuum Cleaner V2 (untested)
* Xiaomi Air Purifiers 2, 2S and Pro (tested)
* Xiamomi Humidifier (tested)
Expand All @@ -27,8 +27,5 @@ For Homey to be able to communicate with devices over the miIO protocol a unique
Xiaomi has recently released an update for its v1 vacuum that enabled it for the zoned cleaning and goto function that was previously only available to the v2 vacuum. Using the action cards that utilize these functions are a bit challenging. If you want to use these cards please read the instructions [here](https://github.com/jghaanstra/com.xiaomi-miio/blob/master/docs/mirobot_zonecleanup.md).

## Changelog
### 2018-11-17 - v2.9.1
* NEW: added meter_power capability for Mi Power Strip (PR by fantomnotabene)
* UPDATE: support for the latest model AirPurifier 2S
* POSSIBLE FIX: possible fix for Yeelight discovery on different subnets
* FIX: code refactoring (PR by fantomnotabene)
### 2018-11-28 - v2.9.2
* NEW: added support for Xiaomi Philips Zhirui Candle Lights (PR from rdvanbuuren) and Xiaomi Philips Zhirui Downlights
18 changes: 9 additions & 9 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"en": [ "Xiaomi", "Mi", "Mi Home", "miio", "vacuumcleaner", "robot", "yeelight", "yeelights", "purifier", "humidifier", "philips", "eyecare", "powerplug", "gateway" ],
"nl": [ "Xiaomi", "Mi", "Mi home", "miio", "stofzuiger", "robot", "yeelight", "yeelights", "luchtreiniger", "luchtbevochtiger", "philips", "eyecare", "powerplug", "gateway" ]
},
"version": "2.9.1",
"version": "2.9.2",
"compatibility": ">=1.5.12",
"author": {
"name": "Jelger Haanstra",
Expand Down Expand Up @@ -95,8 +95,8 @@
{
"id": "philips-bulb",
"name": {
"en": "Philips Light Bulb",
"nl": "Philips Light Bulb"
"en": "Philips Lights",
"nl": "Philips Lights"
},
"images": {
"large": "drivers/philips-bulb/assets/images/large.jpg",
Expand All @@ -117,8 +117,8 @@
{
"type": "group",
"label": {
"en": "Philips Light Bulb Settings",
"nl": "Philips Light Bulb Instellingen"
"en": "Philips Lights Settings",
"nl": "Philips Lights Instellingen"
},
"children": [
{
Expand All @@ -135,8 +135,8 @@
"type": "text",
"value": "",
"label": {
"en": "Philips Light Bulb Token",
"nl": "Philips Light Bulb Token"
"en": "Philips Lights Token",
"nl": "Philips Lights Token"
}
},
{
Expand All @@ -148,8 +148,8 @@
"max": 3600
},
"label": {
"en": "Philips Light Bulb Polling",
"nl": "Philips Light Bulb Polling"
"en": "Philips Lights Polling",
"nl": "Philips Lights Polling"
}
}
]
Expand Down
6 changes: 4 additions & 2 deletions drivers/air-monitor/device.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
'use strict';
"use strict";

const Homey = require('homey');
const miio = require('miio');
Expand All @@ -13,7 +13,9 @@ class MiAirMonitorDevice extends Homey.Device {

onDeleted() {
clearInterval(this.pollingInterval);
this.miio.destroy();
if (typeof this.miio !== "undefined") {
this.miio.destroy();
}
}

// LISTENERS FOR UPDATING CAPABILITIES
Expand Down
8 changes: 5 additions & 3 deletions drivers/gateway/device.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
'use strict';
"use strict";

const Homey = require('homey');
const util = require('/lib/util.js');
Expand All @@ -20,7 +20,9 @@ class GatewayDevice extends Homey.Device {

onDeleted() {
clearInterval(this.pollingInterval);
this.miio.destroy();
if (typeof this.miio !== "undefined") {
this.miio.destroy();
}
}

// LISTENERS FOR UPDATING CAPABILITIES
Expand Down Expand Up @@ -50,7 +52,7 @@ class GatewayDevice extends Homey.Device {
const saturation = saturation_value * 100;
const dim = this.getCapabilityValue('dim') * 100
const colorUpdate = tinycolor({ h: Math.round(hue), s: Math.round(saturation), v: dim });

return this.miio.light.color(colorUpdate.toRgbString());
}

Expand Down
6 changes: 4 additions & 2 deletions drivers/mi-airpurifier/device.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
'use strict';
"use strict";

const Homey = require('homey');
const miio = require('miio');
Expand All @@ -13,7 +13,9 @@ class MiAirPurifierDevice extends Homey.Device {

onDeleted() {
clearInterval(this.pollingInterval);
this.miio.destroy();
if (typeof this.miio !== "undefined") {
this.miio.destroy();
}
}

// LISTENERS FOR UPDATING CAPABILITIES
Expand Down
6 changes: 4 additions & 2 deletions drivers/mi-humidifier/device.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
'use strict';
"use strict";

const Homey = require('homey');
const miio = require('miio');
Expand All @@ -13,7 +13,9 @@ class MiHumidifierDevice extends Homey.Device {

onDeleted() {
clearInterval(this.pollingInterval);
this.miio.destroy();
if (typeof this.miio !== "undefined") {
this.miio.destroy();
}
}

// LISTENERS FOR UPDATING CAPABILITIES
Expand Down
5 changes: 4 additions & 1 deletion drivers/mi-power-plug/device.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
'use strict';
"use strict";

const Homey = require('homey');
const miio = require('miio');
Expand All @@ -13,6 +13,9 @@ class PowerPlugDevice extends Homey.Device {

onDeleted() {
clearInterval(this.pollingInterval);
if (typeof this.miio !== "undefined") {
this.miio.destroy();
}
}

// LISTENERS FOR UPDATING CAPABILITIES
Expand Down
7 changes: 5 additions & 2 deletions drivers/mi-power-strip/device.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
'use strict';
"use strict";

const Homey = require('homey');
const miio = require('miio');
Expand All @@ -13,6 +13,9 @@ class PowerStripDevice extends Homey.Device {

onDeleted() {
clearInterval(this.pollingInterval);
if (typeof this.miio !== "undefined") {
this.miio.destroy();
}
}

// LISTENERS FOR UPDATING CAPABILITIES
Expand Down Expand Up @@ -53,7 +56,7 @@ class PowerStripDevice extends Homey.Device {
// TODO: implement measure_power and meter_power capability
const powerData = await this.miio.call('get_prop', ['power']);
const powerloadData = await this.miio.call('get_prop', ['power_consume_rate']);

const powerState = powerData[0] === 'on';
const powerLoad = powerloadData ? powerloadData[0] : 0;

Expand Down
6 changes: 4 additions & 2 deletions drivers/mi-robot/device.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
'use strict';
"use strict";

const Homey = require('homey');
const miio = require('miio');
Expand All @@ -16,7 +16,9 @@ class MiRobotDevice extends Homey.Device {

onDeleted() {
clearInterval(this.pollingInterval);
this.miio.destroy();
if (typeof this.miio !== "undefined") {
this.miio.destroy();
}
}

// LISTENERS FOR UPDATING CAPABILITIES
Expand Down
6 changes: 4 additions & 2 deletions drivers/philips-bulb/device.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
'use strict';
"use strict";

const Homey = require('homey');
const util = require('/lib/util.js');
Expand All @@ -16,7 +16,9 @@ class PhilipsBulbDevice extends Homey.Device {

onDeleted() {
clearInterval(this.pollingInterval);
this.miio.destroy();
if (typeof this.miio !== "undefined") {
this.miio.destroy();
}
}

// LISTENERS FOR UPDATING CAPABILITIES
Expand Down
2 changes: 1 addition & 1 deletion drivers/philips-bulb/pair/start.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
};

Homey.addDevice({
name : 'Philips Light Bulb',
name : 'Philips Light',
data : device_data,
settings : settings
}, function(error, result) {
Expand Down
Loading

0 comments on commit 9baec25

Please sign in to comment.