From 474b23b93f8e768ab59ab2b73eb86593b7a4bd98 Mon Sep 17 00:00:00 2001 From: TA2k Date: Sat, 26 Oct 2024 17:56:20 +0200 Subject: [PATCH] update client version --- main.js | 21 +++++++++++---------- package.json | 2 +- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/main.js b/main.js index 6beb55b..49ae219 100644 --- a/main.js +++ b/main.js @@ -27,6 +27,7 @@ class Vesync extends utils.Adapter { this.json2iob = new Json2iob(this); this.requestClient = axios.create(); + this.clientVersion = 'VeSync 5.0.50 build16'; } /** @@ -110,7 +111,7 @@ class Vesync extends utils.Adapter { clientType: 'vesyncApp', userCountryCode: 'US', method: 'appLoginV3', - clientVersion: 'VeSync 5.0.50 build16', + clientVersion: this.clientVersion, acceptLanguage: 'de', timeZone: 'Europe/Berlin', debugMode: false, @@ -434,9 +435,9 @@ class Vesync extends utils.Adapter { phoneOS: 'iOS16.7.2', clientInfo: 'iPhone 8 Plus', clientType: 'vesyncApp', - clientVersion: 'VeSync 5.0.50 build16', + clientVersion: this.clientVersion, traceId: Date.now().toString(), - appVersion: 'VeSync 5.0.50 build16', + appVersion: this.clientVersion, token: this.session.token, terminalId: this.terminalId, phoneBrand: 'iPhone 8 Plus', @@ -455,14 +456,14 @@ class Vesync extends utils.Adapter { accountID: this.session.accountID, clientInfo: 'iPhone 8 Plus', clientType: 'vesyncApp', - clientVersion: 'VeSync 5.0.50 build16', + clientVersion: this.clientVersion, debugMode: false, method: 'getWeighingDataV4', osInfo: 'iOS16.7.2', terminalId: this.terminalId, timeZone: 'Europe/Berlin', token: this.session.token, - traceId: '', + traceId: Date.now().toString(), userCountryCode: 'DE', }, data: status.data, @@ -508,7 +509,7 @@ class Vesync extends utils.Adapter { return { acceptLanguage: 'de', accountID: this.session.accountID, - appVersion: 'VeSync 4.1.52 build4', + appVersion: this.clientVersion, cid: device.cid, configModule: device.configModule, debugMode: false, @@ -531,7 +532,7 @@ class Vesync extends utils.Adapter { return { acceptLanguage: 'de', accountID: this.session.accountID, - appVersion: 'VeSync 4.2.20 build12', + appVersion: this.clientVersion, cid: device.cid, configModule: device.configModule, debugMode: false, @@ -599,7 +600,7 @@ class Vesync extends utils.Adapter { traceId: Date.now(), phoneBrand: 'iPhone 8 Plus', acceptLanguage: 'de', - appVersion: 'VeSync 4.1.10 build2', + appVersion: this.clientVersion, userCountryCode: 'DE', token: this.session.token, }; @@ -669,7 +670,7 @@ class Vesync extends utils.Adapter { cookMode: JSON.parse(state.val), }, method: 'bypass', - appVersion: 'VeSync 4.1.10 build2', + appVersion: this.clientVersion, deviceRegion: 'EU', phoneBrand: 'iPhone 8 Plus', token: this.session.token, @@ -758,7 +759,7 @@ class Vesync extends utils.Adapter { source: 'APP', method: command, }, - appVersion: 'VeSync 4.1.10 build2', + appVersion: this.clientVersion, deviceRegion: 'EU', phoneBrand: 'iPhone 8 Plus', token: this.session.token, diff --git a/package.json b/package.json index 76f0835..d224dad 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "@eslint/js": "^9.13.0", "@iobroker/testing": "^5.0.0", "@tsconfig/node18": "^18.2.4", - "@types/node": "^22.7.7", + "@types/node": "^22.8.1", "eslint": "^9.13.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-prettier": "^5.2.1",