From ec6d4dfd3521146fbbc3a80108844ecf9b0a6af7 Mon Sep 17 00:00:00 2001 From: Chris Posthumus Date: Fri, 11 Oct 2024 13:32:54 +0200 Subject: [PATCH] Fixed bug for api secret being gone. And live updates --- CHANGELOG.md | 4 ++++ README.md | 6 +++--- index.js | 8 ++++++++ lib/sunsynkAPI.js | 2 +- package.json | 2 +- 5 files changed, 17 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 48bf101..eb47669 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ This change log documents all release versions of homebridge-texecom +### 1.0.1 (2024-10-11) + +- **BUG** - Fixed bug for token being removed and can not continue requests. + ### 1.0.0 (2024-10-11) - **FEATURE** - Released. diff --git a/README.md b/README.md index 01c8546..562e9a7 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -[![npm](https://badgen.net/npm/v/homebridge-sunsynk/latest)](https://www.npmjs.com/package/homebridge-sunsynk) -[![npm](https://badgen.net/npm/v/homebridge-sunsynk)](https://www.npmjs.com/package/homebridge-sunsynk) -[![npm](https://badgen.net/npm/dt/homebridge-sunsynk)](https://www.npmjs.com/package/homebridge-sunsynk) +[![npm version](https://badgen.net/npm/v/homebridge-sunsynk/latest)](https://www.npmjs.com/package/homebridge-sunsynk) +[![npm beta version](https://badgen.net/npm/v/homebridge-sunsynk/beta)](https://www.npmjs.com/package/homebridge-sunsynk) +[![npm downloads](https://badgen.net/npm/dt/homebridge-sunsynk)](https://www.npmjs.com/package/homebridge-sunsynk) [![GitHub last commit](https://badgen.net/github/last-commit/K1LL3R234/homebridge-sunsynk)](https://github.com/K1LL3R234/homebridge-sunsynk) # homebridge-sunsynk Sunsynk Inveter plugin diff --git a/index.js b/index.js index 2c88ac4..14334da 100644 --- a/index.js +++ b/index.js @@ -192,6 +192,8 @@ SunsynkAccessory.prototype = { changeAction = function (newvalue) { service.getCharacteristic(Characteristic.CurrentAmbientLightLevel) .setValue(newvalue); + service.getCharacteristic(Characteristic.CurrentAmbientLightLevel) + .updateValue(newvalue); } break; @@ -200,16 +202,22 @@ SunsynkAccessory.prototype = { changeAction = function (newvalue) { service.getCharacteristic(Characteristic.BatteryLevel) .setValue(newvalue); + service.getCharacteristic(Characteristic.BatteryLevel) + .updateValue(newvalue); } changeLevel = function (newlevel) { service.getCharacteristic(Characteristic.StatusLowBattery) .setValue(newlevel); + service.getCharacteristic(Characteristic.StatusLowBattery) + .updateValue(newlevel); } changeState = function (newvalue) { service.getCharacteristic(Characteristic.ChargingState) .setValue(newvalue); + service.getCharacteristic(Characteristic.ChargingState) + .updateValue(newvalue); } break; } diff --git a/lib/sunsynkAPI.js b/lib/sunsynkAPI.js index 119bc11..0f94936 100644 --- a/lib/sunsynkAPI.js +++ b/lib/sunsynkAPI.js @@ -147,7 +147,7 @@ class sunsynkAPI { if (this.tokenInfo.expires_in - 60 * 1000 > new Date().getTime()) { return; } - this.tokenInfo.access_token = ''; + //this.tokenInfo.access_token = ''; } calcMd5(data) { diff --git a/package.json b/package.json index 3642799..332146d 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "displayName": "Homebridge Sunsynk", "name": "homebridge-sunsynk", "description": "A plugin for homebridge (https://github.com/nfarina/homebridge) to integrate Sunsynk inverter into HomeKit", - "version": "1.0.0", + "version": "1.0.1", "author": { "name": "Chris Posthumus", "email": "chris.posthumus@gmail.com"