Skip to content

Commit

Permalink
Release 2.11.7
Browse files Browse the repository at this point in the history
  • Loading branch information
jghaanstra committed May 5, 2019
1 parent 96f77fb commit 99129a6
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 26 deletions.
6 changes: 4 additions & 2 deletions APPSTORE.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,7 @@ For Homey to be able to communicate with devices over the miIO protocol a unique
Xiaomi has released an update for the vacuum cleaners that enables zone cleaning and goto function. 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
### v2.11.6 - 2019-04-16
* FIX: update night mode capability when ceiling light is controlled by external source
### v2.11.7 - 2019-05-05
* FIX: possible fix for app crashes related to connection problems with Yeelights
* FIX: possible fix for app crashes related to connection problems with miio devices
* FIX: fix for app crash when user not defines vacuum cleaner coordinates for zone cleaning correctly
15 changes: 10 additions & 5 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,12 @@ class XiaomiMiioApp extends Homey.App {
.register()
.registerRunListener((args, state) => {
if (args.device.miio) {
const zones = JSON.parse("[" + args.zones + "]");
return args.device.miio.activateZoneClean(zones);
try {
const zones = JSON.parse("[" + args.zones + "]");
return args.device.miio.activateZoneClean(zones);
} catch (error) {
return Promise.reject(new Error('Invalid JSON coordinates ...'));
}
} else {
return Promise.reject(new Error('Device unreachable, please try again ...'));
}
Expand Down Expand Up @@ -179,9 +183,10 @@ class XiaomiMiioApp extends Homey.App {
new Homey.FlowCardAction('humidifierOn')
.register()
.registerRunListener((args, state) => {
return args.device.miio.setPower(true).then(result => {
return args.device.setCapabilityValue('onoff', true);
});
return args.device.miio.setPower(true)
.then(result => {
return args.device.setCapabilityValue('onoff', true);
});
})

new Homey.FlowCardAction('humidifierOff')
Expand Down
2 changes: 1 addition & 1 deletion 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.11.6",
"version": "2.11.7",
"compatibility": ">=2.0.0",
"author": {
"name": "Jelger Haanstra",
Expand Down
14 changes: 9 additions & 5 deletions lib/yeelight.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,15 @@ exports.discover = function () {

/* listen for advertisements when devices come online and at regular interval */
exports.listenUpdates = function () {
advertisements.bind(1982, function () {
advertisements.addMembership('239.255.255.250');
advertisements.setBroadcast(true);
advertisements.setMulticastTTL(255);
});
try {
advertisements.bind(1982, function () {
advertisements.addMembership('239.255.255.250');
advertisements.setBroadcast(true);
advertisements.setMulticastTTL(255);
});
} catch(error) {
console.log(error);
}

advertisements.on('message', (message, address) => {
process.nextTick(function() {
Expand Down
28 changes: 16 additions & 12 deletions node_modules/miio/lib/network.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "com.xiaomi-miio",
"version": "2.11.6",
"version": "2.11.7",
"description": "Xiaomi Mi Home",
"main": "app.js",
"dependencies": {
Expand Down

0 comments on commit 99129a6

Please sign in to comment.