From 3d0b700bc203b921bf09f397a49d9c7da86a05fe Mon Sep 17 00:00:00 2001 From: jghaanstra Date: Fri, 22 Nov 2019 23:21:33 +0100 Subject: [PATCH] Release 2.13.8 --- api.js | 14 ------- drivers/gateway/driver.js | 2 +- drivers/yeelights/driver.js | 7 ++-- lib/yeelight.js | 13 ------- locales/en.json | 9 ----- locales/nl.json | 9 ----- settings/index.html | 77 ------------------------------------- 7 files changed, 5 insertions(+), 126 deletions(-) delete mode 100644 api.js delete mode 100644 settings/index.html diff --git a/api.js b/api.js deleted file mode 100644 index a28ee62..0000000 --- a/api.js +++ /dev/null @@ -1,14 +0,0 @@ -const Homey = require('homey'); -const yeelight = require('/lib/yeelight.js'); - -module.exports = [ - { - description: 'Toggle Yeelight Listener', - method : 'PUT', - path : '/yeelight/', - public : false, - fn: function(args, callback) { - yeelight.toggleListener(args, callback); - } - } -] diff --git a/drivers/gateway/driver.js b/drivers/gateway/driver.js index db2aa47..5e98979 100644 --- a/drivers/gateway/driver.js +++ b/drivers/gateway/driver.js @@ -21,7 +21,7 @@ class GatewayDriver extends Homey.Driver { dim: dim } - callback(null, 'OK'); + callback(null, result); } catch (error) { callback(error, null); } diff --git a/drivers/yeelights/driver.js b/drivers/yeelights/driver.js index 9806b7d..6fdc5ae 100644 --- a/drivers/yeelights/driver.js +++ b/drivers/yeelights/driver.js @@ -47,9 +47,10 @@ const typeIconMap = { class YeelightDriver extends Homey.Driver { onInit() { - if (!ManagerSettings.get('compatibility')) { - yeelight.listenUpdates(); - } + + // disabled listener for updates when devices come online and on regular interval to pick up IP address changes. Or for sending and receiving discovery messages + // this ports needs to be available for the new Yeelights app com.yeelight + // yeelight.listenUpdates(); } onPairListDevices (data, callback) { diff --git a/lib/yeelight.js b/lib/yeelight.js index a913933..05709ff 100644 --- a/lib/yeelight.js +++ b/lib/yeelight.js @@ -82,19 +82,6 @@ exports.listenUpdates = function () { }); } -exports.toggleListener = function (args, callback) { - try { - if (args.body.toggle) { - advertisements.close(); - } else { - this.listenUpdates(); - } - callback(null, 'OK'); - } catch (error) { - callback(error, false); - } -} - /* parse incoming broadcast messages, match them with registered devices and update their state */ function parseMessage(message) { return new Promise(function (resolve, reject) { diff --git a/locales/en.json b/locales/en.json index 60fa7a5..75da128 100644 --- a/locales/en.json +++ b/locales/en.json @@ -37,15 +37,6 @@ "battery" : "Batterylevel:", "fanspeed" : "Fanspeed:" }, - "settings": { - "title": "Yeelights", - "intro1": "When the Xiaomi Mi Home App was first developed communication with Yeelights followed the same protocol as the Xiaomi Mi/MiJia WiFi devices. This is a reversed engineered protocol and is not very user or even developer friendly. At some point a better method to control the Yeelights became available and I implemented support for that. Now the Yeelights and the Xiaomi devices have nothing in common anymore within this app and I have decided to split off the Yeelights into it's own Yeelight app which is available in the app store. This means the Yeelight functionality within the Xiaomi Mi Home app will not be developed and supported anymore.", - "intro2": "I'm aware of the hassle it will be but you are asked to un-paired your Yeelights from this app and re-pair them again in the new Yeelight app. And there is another downside, both apps can not function correctly next to each other. Homey listens to updates from the Yeelights but only one app at the time is able to listen to these status updates which keep your Yeelights in Homey in sync with the actual status of the light. So it's best that you move your Yeelights to the new app within a short time period.", - "intro3": "Once you have moved your devices you should check the checkbox below. This will prevent the Xiaomi Mi Home app from listening to the Yeelights allowing the new Yeelight app to pick up the status updates of your lights. Please restart the new Yeelights app after you have enabled this checkbox.", - "compatibility-label": "Turn Off Yeelight Updates", - "success": "Settings have been tested succesfully. Please restart the new Yeelights app.", - "save": "Save" - }, "yeelight_bulb_color": "Yeelight Bulb Color", "yeelight_bulb_white": "Yeelight Bulb White", "yeelight_led_stripe": "Yeelight LED Strip", diff --git a/locales/nl.json b/locales/nl.json index be2332a..3ae84fb 100644 --- a/locales/nl.json +++ b/locales/nl.json @@ -37,15 +37,6 @@ "battery" : "Battery niveau:", "fanspeed" : "Ventilator snelheid:" }, - "settings": { - "title": "Yeelights", - "intro1": "When the Xiaomi Mi Home App was first developed communication with Yeelights followed the same protocol as the Xiaomi Mi/MiJia WiFi devices. This is a reversed engineered protocol and is not very user or even developer friendly. At some point a better method to control the Yeelights became available and I implemented support for that. Now the Yeelights and the Xiaomi devices have nothing in common anymore within this app and I have decided to split off the Yeelights into it's own Yeelight app which is available in the app store. This means the Yeelight functionality within the Xiaomi Mi Home app will not be developed and supported anymore.", - "intro2": "I'm aware of the hassle it will be but you are asked to un-paired your Yeelights from this app and re-pair them again in the new Yeelight app. And there is another downside, both apps can not function correctly next to each other. Homey listens to updates from the Yeelights but only one app at the time is able to listen to these status updates which keep your Yeelights in Homey in sync with the actual status of the light. So it's best that you move your Yeelights to the new app within a short time period.", - "intro3": "Once you have moved your devices you should check the checkbox below. This will prevent the Xiaomi Mi Home app from listening to the Yeelights allowing the new Yeelight app to pick up the status updates of your lights. Please restart the new Yeelights app after you have enabled this checkbox.", - "compatibility-label": "Turn Off Yeelight Updates", - "success": "Settings have been tested succesfully. Please restart the new Yeelights app.", - "save": "Save" - }, "yeelight_bulb_color": "Yeelight Bulb Kleur", "yeelight_bulb_white": "Yeelight Bulb Wit", "yeelight_led_strip": "Yeelight LED strip", diff --git a/settings/index.html b/settings/index.html deleted file mode 100644 index 92419c6..0000000 --- a/settings/index.html +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - -

Yeelights

-

When the Xiaomi Mi Home App was first developed communication with Yeelights followed the same protocol as the Xiaomi Mi/MiJia WiFi devices. This is a reversed engineered protocol and is not very user or even developer friendly. At some point a better method to control the Yeelights became available and I implemented support for that. Now the Yeelights and the Xiaomi devices have nothing in common anymore within this app and I have decided to split off the Yeelights into it's own Yeelight app which is available in the app store. This means the Yeelight functionality within the Xiaomi Mi Home app will not be developed and supported anymore.

-

I'm aware of the hassle it will be but you are asked to un-paired your Yeelights from this app and re-pair them again in the new Yeelight app. And there is another downside, both apps can not function correctly next to each other. Homey listens to updates from the Yeelights but only one app at the time is able to listen to these status updates which keep your Yeelights in Homey in sync with the actual status of the light. So it's best that you move your Yeelights to the new app within a short time period.

-

Once you have moved your devices you should check the checkbox below. This will prevent the Xiaomi Mi Home app from listening to the Yeelights allowing the new Yeelight app to pick up the status updates of your lights. Please restart the new Yeelights app after you have enabled this checkbox.

- -
-
- - -
-
-

Settings have been tested succesfully. Please restart the new Yeelights app.

-

-
-
- -
-
- - - - - -