Skip to content

Commit

Permalink
Release 2.13.3
Browse files Browse the repository at this point in the history
  • Loading branch information
jghaanstra committed Nov 15, 2019
1 parent 070fd0e commit 0aea7da
Show file tree
Hide file tree
Showing 18 changed files with 191 additions and 48 deletions.
5 changes: 5 additions & 0 deletions .homeychangelog.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"2.13.3": {
"en": "Added a mechanism to refresh the device connection to prevent devices from not responding on the first try. Also moved installation instructions from app store to community support topic."
}
}
34 changes: 0 additions & 34 deletions APPSTORE.md

This file was deleted.

3 changes: 3 additions & 0 deletions README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Use Homey to control Xiaomi Mi Home and Yeelight devices (the Mi Home Ecosystem is also branded as MiJia). Xiaomi does not officialy support controlling most of it's devices from outside the Mi Home app with the exception of Yeelights. Yeelights can be added to Homey quite easy but for all other devices additional steps are needed that require some technical knowledge setting it up. Beware that Xiaomi can make changes to it's eco system at any time resulting in Homey not being able to control these devices anymore.

Please visit the support topic for supported devices, installation instructions and further details.
9 changes: 5 additions & 4 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.13.2",
"version": "2.13.3",
"compatibility": ">=3.0.0",
"author": {
"name": "Jelger Haanstra",
Expand All @@ -26,16 +26,17 @@
"bugs": {
"url": "https://github.com/jghaanstra/com.xiaomi-miio/issues"
},
"athomForumDiscussionId": 3295,
"homeyCommunityTopicId": 118,
"source": "https://github.com/jghaanstra/com.xiaomi-miio",
"homepage": "https://community.athom.com/t/118",
"images": {
"large": "./assets/images/large.jpg",
"small": "./assets/images/small.jpg"
},
"category": "appliances",
"description": {
"en": "Control Xiaomi Mi Home devices",
"nl": "Bestuur Xiaomi Mi Home apparaten"
"en": "Control Yeelight and Xiaomi Mi Home devices using Homey",
"nl": "Bedien Yeelight en Xiaomi Mi Home apparaten via Homey"
},
"dependencies": {
"net": "*"
Expand Down
15 changes: 15 additions & 0 deletions drivers/air-monitor/device.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ class MiAirMonitorDevice extends Homey.Device {

onInit() {
this.createDevice();
setTimeout(() => { this.refreshDevice(); }, 600000);

this.setUnavailable(Homey.__('unreachable'));

// LISTENERS FOR UPDATING CAPABILITIES
Expand All @@ -24,6 +26,7 @@ class MiAirMonitorDevice extends Homey.Device {

onDeleted() {
clearInterval(this.pollingInterval);
clearInterval(this.refreshInterval);
if (this.miio) {
this.miio.destroy();
}
Expand Down Expand Up @@ -85,6 +88,18 @@ class MiAirMonitorDevice extends Homey.Device {
getData();
}, 1000 * interval);
}

refreshDevice(interval) {
clearInterval(this.refreshInterval);

this.refreshInterval = setInterval(() => {
this.miio.destroy();

setTimeout(() => {
this.createDevice();
}, 2000);
}, 300000);
}
}

module.exports = MiAirMonitorDevice;
16 changes: 15 additions & 1 deletion drivers/dmaker-fan/device.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ class DmakerFanDevice extends Homey.Device {

onInit() {
this.createDevice();
setTimeout(() => { this.refreshDevice(); }, 600000);

this.setUnavailable(Homey.__('unreachable'));

// LISTENERS FOR UPDATING CAPABILITIES
Expand All @@ -19,11 +21,11 @@ class DmakerFanDevice extends Homey.Device {
return Promise.reject('Device unreachable, please try again ...');
}
});

}

onDeleted() {
clearInterval(this.pollingInterval);
clearInterval(this.refreshInterval);
if (this.miio) {
this.miio.destroy();
}
Expand Down Expand Up @@ -104,6 +106,18 @@ class DmakerFanDevice extends Homey.Device {
});
}, 1000 * interval);
}

refreshDevice(interval) {
clearInterval(this.refreshInterval);

this.refreshInterval = setInterval(() => {
this.miio.destroy();

setTimeout(() => {
this.createDevice();
}, 2000);
}, 300000);
}
}

module.exports = DmakerFanDevice;
16 changes: 15 additions & 1 deletion drivers/gateway/device.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ class GatewayDevice extends Homey.Device {
this.gatewayLuminanceTrigger = new Homey.FlowCardTriggerDevice('gatewayLuminance').register();

this.createDevice();
setTimeout(() => { this.refreshDevice(); }, 600000);

this.setUnavailable(Homey.__('unreachable'));

// LISTENERS FOR UPDATING CAPABILITIES
Expand Down Expand Up @@ -72,11 +74,11 @@ class GatewayDevice extends Homey.Device {
return Promise.reject('Device unreachable, please try again ...');
}
});

}

onDeleted() {
clearInterval(this.pollingInterval);
clearInterval(this.refreshInterval);
if (this.miio) {
this.miio.destroy();
}
Expand Down Expand Up @@ -158,6 +160,18 @@ class GatewayDevice extends Homey.Device {
getData();
}, 1000 * interval);
}

refreshDevice(interval) {
clearInterval(this.refreshInterval);

this.refreshInterval = setInterval(() => {
this.miio.destroy();

setTimeout(() => {
this.createDevice();
}, 2000);
}, 300000);
}
}

module.exports = GatewayDevice;
16 changes: 15 additions & 1 deletion drivers/mi-airpurifier/device.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ class MiAirPurifierDevice extends Homey.Device {

onInit() {
this.createDevice();
setTimeout(() => { this.refreshDevice(); }, 600000);

this.setUnavailable(Homey.__('unreachable'));

// LISTENERS FOR UPDATING CAPABILITIES
Expand All @@ -19,11 +21,11 @@ class MiAirPurifierDevice extends Homey.Device {
return Promise.reject('Device unreachable, please try again ...');
}
});

}

onDeleted() {
clearInterval(this.pollingInterval);
clearInterval(this.refreshInterval);
if (this.miio) {
this.miio.destroy();
}
Expand Down Expand Up @@ -93,6 +95,18 @@ class MiAirPurifierDevice extends Homey.Device {
getData();
}, 1000 * interval);
}

refreshDevice(interval) {
clearInterval(this.refreshInterval);

this.refreshInterval = setInterval(() => {
this.miio.destroy();

setTimeout(() => {
this.createDevice();
}, 2000);
}, 300000);
}
}

module.exports = MiAirPurifierDevice;
16 changes: 15 additions & 1 deletion drivers/mi-humidifier/device.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ class MiHumidifierDevice extends Homey.Device {

onInit() {
this.createDevice();
setTimeout(() => { this.refreshDevice(); }, 600000);

this.setUnavailable(Homey.__('unreachable'));

// LISTENERS FOR UPDATING CAPABILITIES
Expand All @@ -19,11 +21,11 @@ class MiHumidifierDevice extends Homey.Device {
return Promise.reject('Device unreachable, please try again ...');
}
});

}

onDeleted() {
clearInterval(this.pollingInterval);
clearInterval(this.refreshInterval);
if (this.miio) {
this.miio.destroy();
}
Expand Down Expand Up @@ -89,6 +91,18 @@ class MiHumidifierDevice extends Homey.Device {
getData();
}, 1000 * interval);
}

refreshDevice(interval) {
clearInterval(this.refreshInterval);

this.refreshInterval = setInterval(() => {
this.miio.destroy();

setTimeout(() => {
this.createDevice();
}, 2000);
}, 300000);
}
}

module.exports = MiHumidifierDevice;
16 changes: 15 additions & 1 deletion drivers/mi-humidifier2/device.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ class MiHumidifier2Device extends Homey.Device {
this.humidifier2WaterlevelTrigger = new Homey.FlowCardTriggerDevice('humidifier2Waterlevel').register();

this.createDevice();
setTimeout(() => { this.refreshDevice(); }, 600000);

this.setUnavailable(Homey.__('unreachable'));

// LISTENERS FOR UPDATING CAPABILITIES
Expand All @@ -21,11 +23,11 @@ class MiHumidifier2Device extends Homey.Device {
return Promise.reject('Device unreachable, please try again ...');
}
});

}

onDeleted() {
clearInterval(this.pollingInterval);
clearInterval(this.refreshInterval);
if (this.miio) {
this.miio.destroy();
}
Expand Down Expand Up @@ -98,6 +100,18 @@ class MiHumidifier2Device extends Homey.Device {
getData();
}, 1000 * interval);
}

refreshDevice(interval) {
clearInterval(this.refreshInterval);

this.refreshInterval = setInterval(() => {
this.miio.destroy();

setTimeout(() => {
this.createDevice();
}, 2000);
}, 300000);
}
}

module.exports = MiHumidifier2Device;
14 changes: 14 additions & 0 deletions drivers/mi-power-plug/device.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ class PowerPlugDevice extends Homey.Device {

onInit() {
this.createDevice();
setTimeout(() => { this.refreshDevice(); }, 600000);

this.setUnavailable(Homey.__('unreachable'));

// LISTENERS FOR UPDATING CAPABILITIES
Expand All @@ -24,6 +26,7 @@ class PowerPlugDevice extends Homey.Device {

onDeleted() {
clearInterval(this.pollingInterval);
clearInterval(this.refreshInterval);
if (this.miio) {
this.miio.destroy();
}
Expand Down Expand Up @@ -78,6 +81,17 @@ class PowerPlugDevice extends Homey.Device {
}, 1000 * interval);
}

refreshDevice(interval) {
clearInterval(this.refreshInterval);

this.refreshInterval = setInterval(() => {
this.miio.destroy();

setTimeout(() => {
this.createDevice();
}, 2000);
}, 300000);
}
}

module.exports = PowerPlugDevice;
15 changes: 14 additions & 1 deletion drivers/mi-power-strip/device.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ class PowerStripDevice extends Homey.Device {

onInit() {
this.createDevice();
setTimeout(() => { this.refreshDevice(); }, 600000);

this.setUnavailable(Homey.__('unreachable'));

// LISTENERS FOR UPDATING CAPABILITIES
Expand All @@ -19,11 +21,11 @@ class PowerStripDevice extends Homey.Device {
return Promise.reject('Device unreachable, please try again ...');
}
});

}

onDeleted() {
clearInterval(this.pollingInterval);
clearInterval(this.refreshInterval);
if (this.miio) {
this.miio.destroy();
}
Expand Down Expand Up @@ -87,6 +89,17 @@ class PowerStripDevice extends Homey.Device {
}, 1000 * interval);
}

refreshDevice(interval) {
clearInterval(this.refreshInterval);

this.refreshInterval = setInterval(() => {
this.miio.destroy();

setTimeout(() => {
this.createDevice();
}, 2000);
}, 300000);
}
}

module.exports = PowerStripDevice;
Loading

0 comments on commit 0aea7da

Please sign in to comment.