From 5511a82fb680cf5fa078fa26a4b3502f60a16f4a Mon Sep 17 00:00:00 2001 From: Nicolas Dujardin Date: Sat, 20 Feb 2021 21:41:09 +0100 Subject: [PATCH] 1.4.4 --- CHANGELOG.md | 6 ++++++ deebotEcovacsAPI.js | 1 + index.js | 27 ++++++++++++++------------- package.json | 4 ++-- 4 files changed, 23 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 31338a3..ab91a93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,12 @@ You can also use the [PACKAGES](https://github.com/oznu/docker-homebridge#option All notable changes to this project will be documented in this file. +## 1.4.4 + +- [NEW] bump dep +- [FIX] wrnings on homebridge 1.3.X +- + ## 1.4.3 - [NEW] bump dep diff --git a/deebotEcovacsAPI.js b/deebotEcovacsAPI.js index cd7cfdb..b1a2e56 100644 --- a/deebotEcovacsAPI.js +++ b/deebotEcovacsAPI.js @@ -233,6 +233,7 @@ DeebotEcovacsAPI.prototype = { 'INFO - updating sensor for ' + deebotAccessory.name + ' : %s ', isOnError ); + deebotAccessory.HKMotionService.getCharacteristic( Characteristic.MotionDetected ).updateValue(isOnError); diff --git a/index.js b/index.js index 7b086b6..396fdc8 100644 --- a/index.js +++ b/index.js @@ -230,24 +230,25 @@ myDeebotEcovacsPlatform.prototype = { if (!myDeebotEcovacsAccessory) { myDeebotEcovacsAccessory = new Accessory(deebotName, uuid); - myDeebotEcovacsAccessory.name = deebotName; - myDeebotEcovacsAccessory.manufacturer = vacBot.vacuum.company; - myDeebotEcovacsAccessory.serialNumber = vacBot.vacuum.did; - - myDeebotEcovacsAccessory - .getService(Service.AccessoryInformation) - .setCharacteristic(Characteristic.Manufacturer, myDeebotEcovacsAccessory.manufacturer) - .setCharacteristic(Characteristic.Model, myDeebotEcovacsAccessory.model) - .setCharacteristic(Characteristic.SerialNumber, myDeebotEcovacsAccessory.serialNumber); + this.api.registerPlatformAccessories('homebridge-deebotecovacs', 'DeebotEcovacs', [ myDeebotEcovacsAccessory, ]); this.foundAccessories.push(myDeebotEcovacsAccessory); } - + myDeebotEcovacsAccessory.name = deebotName; + myDeebotEcovacsAccessory.manufacturer = vacBot.vacuum.company; + myDeebotEcovacsAccessory.serialNumber = vacBot.vacuum.did; + myDeebotEcovacsAccessory.model = vacBot.deviceModel; myDeebotEcovacsAccessory.vacBot = vacBot; myDeebotEcovacsAccessory.name = deebotName; + myDeebotEcovacsAccessory + .getService(Service.AccessoryInformation) + .setCharacteristic(Characteristic.Manufacturer, myDeebotEcovacsAccessory.manufacturer) + .setCharacteristic(Characteristic.Model, myDeebotEcovacsAccessory.model) + .setCharacteristic(Characteristic.SerialNumber, myDeebotEcovacsAccessory.serialNumber); + let HKBatteryService = myDeebotEcovacsAccessory.getServiceByUUIDAndSubType( deebotName, 'BatteryService' + deebotName @@ -789,7 +790,7 @@ myDeebotEcovacsPlatform.prototype = { .on( 'get', function (callback) { - callback(false); + callback(null, false); }.bind(this) ) .on( @@ -811,7 +812,7 @@ myDeebotEcovacsPlatform.prototype = { .on( 'get', function (callback) { - callback(false); + callback(null, false); }.bind(this) ) .on( @@ -826,7 +827,7 @@ myDeebotEcovacsPlatform.prototype = { service.getCharacteristic(Characteristic.MotionDetected).on( 'get', function (callback) { - callback(false); + callback(null, false); }.bind(this) ); }, diff --git a/package.json b/package.json index 0f0fd61..a8e764b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "homebridge-deebotecovacs", - "version": "1.4.3", + "version": "1.4.4", "author": "Nicolas Dujardin", "description": "Publish your deebot ecovacs as an homekit accessory", "main": "index.js", @@ -25,7 +25,7 @@ "homekit" ], "dependencies": { - "ecovacs-deebot": "^0.5.5", + "ecovacs-deebot": "^0.5.6", "node-machine-id": "^1.1.12" }, "bugs": {