iobroker.zendure-solarflow 1.1.4 → 1.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -24,7 +24,7 @@ module.exports = __toCommonJS(timeHelper_exports);
24
24
  const toHoursAndMinutes = (totalMinutes) => {
25
25
  const hours = Math.floor(totalMinutes / 60);
26
26
  const minutes = totalMinutes % 60;
27
- return hours + ":" + minutes;
27
+ return hours + ":" + ("00" + minutes).slice(-2);
28
28
  };
29
29
  // Annotate the CommonJS export names for ESM import in node:
30
30
  0 && (module.exports = {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/helpers/timeHelper.ts"],
4
- "sourcesContent": ["export const toHoursAndMinutes = (totalMinutes: number) => {\n\tconst hours = Math.floor(totalMinutes / 60);\n\tconst minutes = totalMinutes % 60;\n\treturn hours + \":\" + minutes;\n}"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,oBAAoB,CAAC,iBAAyB;AAC1D,QAAM,QAAQ,KAAK,MAAM,eAAe,EAAE;AAC1C,QAAM,UAAU,eAAe;AAC/B,SAAO,QAAQ,MAAM;AACtB;",
4
+ "sourcesContent": ["export const toHoursAndMinutes = (totalMinutes: number): string => {\n\tconst hours = Math.floor(totalMinutes / 60);\n\tconst minutes = totalMinutes % 60;\n\treturn hours + \":\" + (\"00\" + minutes).slice(-2);\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,oBAAoB,CAAC,iBAAiC;AAClE,QAAM,QAAQ,KAAK,MAAM,eAAe,EAAE;AAC1C,QAAM,UAAU,eAAe;AAC/B,SAAO,QAAQ,OAAO,OAAO,SAAS,MAAM,EAAE;AAC/C;",
6
6
  "names": []
7
7
  }
package/build/main.js CHANGED
@@ -36,6 +36,7 @@ var import_mqttService = require("./services/mqttService");
36
36
  var import_webService = require("./services/webService");
37
37
  var import_paths = require("./constants/paths");
38
38
  var import_adapterService = require("./services/adapterService");
39
+ var import_node_schedule = require("node-schedule");
39
40
  class ZendureSolarflow extends utils.Adapter {
40
41
  constructor(options = {}) {
41
42
  super({
@@ -48,6 +49,7 @@ class ZendureSolarflow extends utils.Adapter {
48
49
  this.paths = void 0;
49
50
  this.interval = void 0;
50
51
  this.lastLogin = void 0;
52
+ this.resetValuesJob = void 0;
51
53
  this.on("ready", this.onReady.bind(this));
52
54
  this.on("stateChange", this.onStateChange.bind(this));
53
55
  this.on("unload", this.onUnload.bind(this));
@@ -63,6 +65,18 @@ class ZendureSolarflow extends utils.Adapter {
63
65
  this.accessToken = _accessToken;
64
66
  this.connected = true;
65
67
  this.lastLogin = /* @__PURE__ */ new Date();
68
+ this.resetValuesJob = (0, import_node_schedule.scheduleJob)("0 0 * * *", () => {
69
+ var _a2;
70
+ this.log.debug(`Refreshing accessToken!`);
71
+ if (this.config.userName && this.config.password) {
72
+ (_a2 = (0, import_webService.login)(this)) == null ? void 0 : _a2.then((_accessToken2) => {
73
+ this.accessToken = _accessToken2;
74
+ this.lastLogin = /* @__PURE__ */ new Date();
75
+ this.connected = true;
76
+ });
77
+ }
78
+ (0, import_adapterService.resetTodaysValues)(this);
79
+ });
66
80
  (0, import_webService.getDeviceList)(this).then((result) => {
67
81
  if (result) {
68
82
  this.deviceList = result;
@@ -93,6 +107,9 @@ class ZendureSolarflow extends utils.Adapter {
93
107
  if (this.interval) {
94
108
  this.clearInterval(this.interval);
95
109
  }
110
+ if (this.resetValuesJob) {
111
+ this.resetValuesJob.cancel();
112
+ }
96
113
  callback();
97
114
  } catch (e) {
98
115
  callback();
@@ -102,23 +119,24 @@ class ZendureSolarflow extends utils.Adapter {
102
119
  * Is called if a subscribed state changes
103
120
  */
104
121
  onStateChange(id, state) {
105
- if (state && !state.ack) {
106
- this.log.debug(`state ${id} changed: ${state.val} (ack = ${state.ack})`);
122
+ if (state) {
123
+ const splitted = id.split(".");
124
+ const productKey = splitted[2];
125
+ const deviceKey = splitted[3];
107
126
  if (id.includes("setOutputLimit") && state.val != void 0 && state.val != null) {
108
- const splitted = id.split(".");
109
- const productKey = splitted[2];
110
- const deviceKey = splitted[3];
111
127
  (0, import_mqttService.setOutputLimit)(this, productKey, deviceKey, Number(state.val));
112
128
  } else if (id.includes("dischargeLimit") && state.val != void 0 && state.val != null) {
113
- const splitted = id.split(".");
114
- const productKey = splitted[2];
115
- const deviceKey = splitted[3];
116
129
  (0, import_mqttService.setDischargeLimit)(this, productKey, deviceKey, Number(state.val));
117
130
  } else if (id.includes("chargeLimit") && state.val != void 0 && state.val != null) {
118
- const splitted = id.split(".");
119
- const productKey = splitted[2];
120
- const deviceKey = splitted[3];
121
131
  (0, import_mqttService.setChargeLimit)(this, productKey, deviceKey, Number(state.val));
132
+ } else if (id.includes("solarInput") && state.val != void 0 && state.val != null) {
133
+ (0, import_adapterService.calculateEnergy)(this, productKey, deviceKey, "solarInput", state);
134
+ } else if (id.includes("outputPackPower") && state.val != void 0 && state.val != null) {
135
+ (0, import_adapterService.calculateEnergy)(this, productKey, deviceKey, "outputPack", state);
136
+ } else if (id.includes("packInputPower") && state.val != void 0 && state.val != null) {
137
+ (0, import_adapterService.calculateEnergy)(this, productKey, deviceKey, "packInput", state);
138
+ } else if (id.includes("outputHomePower") && state.val != void 0 && state.val != null) {
139
+ (0, import_adapterService.calculateEnergy)(this, productKey, deviceKey, "outputHome", state);
122
140
  }
123
141
  } else {
124
142
  this.log.debug(`state ${id} deleted`);
package/build/main.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/main.ts"],
4
- "sourcesContent": ["/* eslint-disable @typescript-eslint/indent */\r\n/*\r\n * Created with @iobroker/create-adapter v2.5.0\r\n */\r\n\r\n// The adapter-core module gives you access to the core ioBroker functions\r\n// you need to create an adapter\r\nimport * as utils from \"@iobroker/adapter-core\";\r\nimport { connectMqttClient, setChargeLimit, setDischargeLimit, setOutputLimit } from \"./services/mqttService\";\r\nimport { getDeviceList, login } from \"./services/webService\";\r\nimport { ISolarFlowDeviceDetails } from \"./models/ISolarFlowDeviceDetails\";\r\nimport { ISolarFlowPaths } from \"./models/ISolarFlowPaths\";\r\nimport { pathsGlobal } from \"./constants/paths\";\r\nimport { startCheckStatesTimer } from \"./services/adapterService\";\r\n\r\nexport class ZendureSolarflow extends utils.Adapter {\r\n public constructor(options: Partial<utils.AdapterOptions> = {}) {\r\n super({\r\n ...options,\r\n name: \"zendure-solarflow\",\r\n });\r\n this.on(\"ready\", this.onReady.bind(this));\r\n this.on(\"stateChange\", this.onStateChange.bind(this));\r\n this.on(\"unload\", this.onUnload.bind(this));\r\n }\r\n\r\n public accessToken: string | undefined = undefined; // Access Token for Zendure Rest API\r\n public deviceList: ISolarFlowDeviceDetails[] = [];\r\n public paths: ISolarFlowPaths | undefined = undefined;\r\n public interval: ioBroker.Interval | undefined = undefined;\r\n public lastLogin: Date | undefined = undefined;\r\n\r\n /**\r\n * Is called when databases are connected and adapter received configuration.\r\n */\r\n private async onReady(): Promise<void> {\r\n // Currently only global Zendure Server are supported!\r\n this.paths = pathsGlobal;\r\n\r\n // If Username and Password is provided, try to login and get the access token.\r\n if (this.config.userName && this.config.password) {\r\n login(this)\r\n ?.then((_accessToken: string) => {\r\n this.accessToken = _accessToken;\r\n\r\n this.connected = true;\r\n this.lastLogin = new Date();\r\n\r\n // Try to get the device list\r\n getDeviceList(this)\r\n .then((result: ISolarFlowDeviceDetails[]) => {\r\n if (result) {\r\n // Device List found. Save in the adapter properties and connect to MQTT\r\n this.deviceList = result;\r\n connectMqttClient(this);\r\n startCheckStatesTimer(this);\r\n }\r\n })\r\n .catch(() => {\r\n this.connected = false;\r\n this.log?.error(\"Retrieving device failed!\");\r\n });\r\n })\r\n .catch((error) => {\r\n this.connected = false;\r\n this.log.error(\r\n \"Logon error at Zendure cloud service! Error: \" + error.toString(),\r\n );\r\n });\r\n } else {\r\n this.connected = false;\r\n this.log.error(\"No Login Information provided!\");\r\n //this.stop?.();\r\n }\r\n }\r\n\r\n /**\r\n * Is called when adapter shuts down - callback has to be called under any circumstances!\r\n */\r\n private onUnload(callback: () => void): void {\r\n try {\r\n if (this.interval) {\r\n this.clearInterval(this.interval);\r\n }\r\n callback();\r\n } catch (e) {\r\n callback();\r\n }\r\n }\r\n\r\n /**\r\n * Is called if a subscribed state changes\r\n */\r\n private onStateChange(\r\n id: string,\r\n state: ioBroker.State | null | undefined,\r\n ): void {\r\n if (state && !state.ack) {\r\n // The state was changed\r\n this.log.debug(`state ${id} changed: ${state.val} (ack = ${state.ack})`);\r\n if (\r\n id.includes(\"setOutputLimit\") &&\r\n state.val != undefined &&\r\n state.val != null\r\n ) {\r\n const splitted = id.split(\".\");\r\n const productKey = splitted[2];\r\n const deviceKey = splitted[3];\r\n setOutputLimit(this, productKey, deviceKey, Number(state.val));\r\n }\r\n else if (\r\n id.includes(\"dischargeLimit\") &&\r\n state.val != undefined &&\r\n state.val != null\r\n ) {\r\n const splitted = id.split(\".\");\r\n const productKey = splitted[2];\r\n const deviceKey = splitted[3];\r\n setDischargeLimit(this, productKey, deviceKey, Number(state.val));\r\n }\r\n else if (\r\n id.includes(\"chargeLimit\") &&\r\n state.val != undefined &&\r\n state.val != null\r\n ) {\r\n const splitted = id.split(\".\");\r\n const productKey = splitted[2];\r\n const deviceKey = splitted[3];\r\n setChargeLimit(this, productKey, deviceKey, Number(state.val));\r\n }\r\n } else {\r\n // The state was deleted\r\n this.log.debug(`state ${id} deleted`);\r\n }\r\n }\r\n}\r\n\r\nif (require.main !== module) {\r\n // Export the constructor in compact mode\r\n module.exports = (options: Partial<utils.AdapterOptions> | undefined) =>\r\n new ZendureSolarflow(options);\r\n} else {\r\n // otherwise start the instance directly\r\n (() => new ZendureSolarflow())();\r\n}\r\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA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AAO;AAEL,GAAC,MAAM,IAAI,iBAAiB,GAAG;AACjC;",
6
- "names": ["_a"]
4
+ "sourcesContent": ["/* eslint-disable @typescript-eslint/indent */\r\n/*\r\n * Created with @iobroker/create-adapter v2.5.0\r\n */\r\n\r\n// The adapter-core module gives you access to the core ioBroker functions\r\n// you need to create an adapter\r\nimport * as utils from \"@iobroker/adapter-core\";\r\nimport {\r\n connectMqttClient,\r\n setChargeLimit,\r\n setDischargeLimit,\r\n setOutputLimit,\r\n} from \"./services/mqttService\";\r\nimport { getDeviceList, login } from \"./services/webService\";\r\nimport { ISolarFlowDeviceDetails } from \"./models/ISolarFlowDeviceDetails\";\r\nimport { ISolarFlowPaths } from \"./models/ISolarFlowPaths\";\r\nimport { pathsGlobal } from \"./constants/paths\";\r\nimport {\r\n calculateEnergy,\r\n resetTodaysValues,\r\n startCheckStatesTimer,\r\n} from \"./services/adapterService\";\r\nimport { Job, scheduleJob } from \"node-schedule\";\r\n\r\nexport class ZendureSolarflow extends utils.Adapter {\r\n public constructor(options: Partial<utils.AdapterOptions> = {}) {\r\n super({\r\n ...options,\r\n name: \"zendure-solarflow\",\r\n });\r\n this.on(\"ready\", this.onReady.bind(this));\r\n this.on(\"stateChange\", this.onStateChange.bind(this));\r\n this.on(\"unload\", this.onUnload.bind(this));\r\n }\r\n\r\n public accessToken: string | undefined = undefined; // Access Token for Zendure Rest API\r\n public deviceList: ISolarFlowDeviceDetails[] = [];\r\n public paths: ISolarFlowPaths | undefined = undefined;\r\n public interval: ioBroker.Interval | undefined = undefined;\r\n public lastLogin: Date | undefined = undefined;\r\n\r\n public resetValuesJob: Job | undefined = undefined;\r\n\r\n /**\r\n * Is called when databases are connected and adapter received configuration.\r\n */\r\n private async onReady(): Promise<void> {\r\n // Currently only global Zendure Server are supported!\r\n this.paths = pathsGlobal;\r\n\r\n // If Username and Password is provided, try to login and get the access token.\r\n if (this.config.userName && this.config.password) {\r\n login(this)\r\n ?.then((_accessToken: string) => {\r\n this.accessToken = _accessToken;\r\n\r\n this.connected = true;\r\n this.lastLogin = new Date();\r\n\r\n // Schedule Job\r\n this.resetValuesJob = scheduleJob(\"0 0 * * *\", () => {\r\n // Relogin at night to get a fresh accessToken!\r\n this.log.debug(`Refreshing accessToken!`);\r\n\r\n if (this.config.userName && this.config.password) {\r\n login(this)?.then((_accessToken: string) => {\r\n this.accessToken = _accessToken;\r\n this.lastLogin = new Date();\r\n this.connected = true;\r\n });\r\n }\r\n\r\n // Reset Values\r\n resetTodaysValues(this);\r\n });\r\n\r\n // Try to get the device list\r\n getDeviceList(this)\r\n .then((result: ISolarFlowDeviceDetails[]) => {\r\n if (result) {\r\n // Device List found. Save in the adapter properties and connect to MQTT\r\n this.deviceList = result;\r\n connectMqttClient(this);\r\n startCheckStatesTimer(this);\r\n }\r\n })\r\n .catch(() => {\r\n this.connected = false;\r\n this.log?.error(\"Retrieving device failed!\");\r\n });\r\n })\r\n .catch((error) => {\r\n this.connected = false;\r\n this.log.error(\r\n \"Logon error at Zendure cloud service! Error: \" + error.toString(),\r\n );\r\n });\r\n } else {\r\n this.connected = false;\r\n this.log.error(\"No Login Information provided!\");\r\n //this.stop?.();\r\n }\r\n }\r\n\r\n /**\r\n * Is called when adapter shuts down - callback has to be called under any circumstances!\r\n */\r\n private onUnload(callback: () => void): void {\r\n try {\r\n if (this.interval) {\r\n this.clearInterval(this.interval);\r\n }\r\n\r\n // Scheduler beenden\r\n if (this.resetValuesJob) {\r\n this.resetValuesJob.cancel();\r\n }\r\n\r\n callback();\r\n } catch (e) {\r\n callback();\r\n }\r\n }\r\n\r\n /**\r\n * Is called if a subscribed state changes\r\n */\r\n private onStateChange(\r\n id: string,\r\n state: ioBroker.State | null | undefined,\r\n ): void {\r\n if (state) {\r\n // The state was changed\r\n //this.log.debug(`state ${id} changed: ${state.val} (ack = ${state.ack})`);\r\n\r\n // Read product and device key from string\r\n const splitted = id.split(\".\");\r\n const productKey = splitted[2];\r\n const deviceKey = splitted[3];\r\n\r\n if (id.includes(\"setOutputLimit\") && state.val != undefined && state.val != null) {\r\n setOutputLimit(this, productKey, deviceKey, Number(state.val));\r\n } else if (id.includes(\"dischargeLimit\")&& state.val != undefined && state.val != null) {\r\n setDischargeLimit(this, productKey, deviceKey, Number(state.val));\r\n } else if (id.includes(\"chargeLimit\")&& state.val != undefined && state.val != null) {\r\n setChargeLimit(this, productKey, deviceKey, Number(state.val));\r\n } else if (id.includes(\"solarInput\")&& state.val != undefined && state.val != null) {\r\n // Calculate todays solar input\r\n calculateEnergy(this, productKey, deviceKey, \"solarInput\", state);\r\n } else if (id.includes(\"outputPackPower\")&& state.val != undefined && state.val != null) {\r\n // Calculate todays output pack power (energy to battery)\r\n calculateEnergy(this, productKey, deviceKey, \"outputPack\", state);\r\n } else if (id.includes(\"packInputPower\")&& state.val != undefined && state.val != null) {\r\n // Calculate todays pack input power (energy from battery)\r\n calculateEnergy(this, productKey, deviceKey, \"packInput\", state);\r\n } else if (id.includes(\"outputHomePower\")&& state.val != undefined && state.val != null) {\r\n // Calculate todays pack input power (energy from system to home)\r\n calculateEnergy(this, productKey, deviceKey, \"outputHome\", state);\r\n }\r\n } else {\r\n // The state was deleted\r\n this.log.debug(`state ${id} deleted`);\r\n }\r\n }\r\n}\r\n\r\nif (require.main !== module) {\r\n // Export the constructor in compact mode\r\n module.exports = (options: Partial<utils.AdapterOptions> | undefined) =>\r\n new ZendureSolarflow(options);\r\n} else {\r\n // otherwise start the instance directly\r\n (() => new ZendureSolarflow())();\r\n}\r\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,YAAuB;AACvB,yBAKO;AACP,wBAAqC;AAGrC,mBAA4B;AAC5B,4BAIO;AACP,2BAAiC;AAE1B,MAAM,yBAAyB,MAAM,QAAQ;AAAA,EAC3C,YAAY,UAAyC,CAAC,GAAG;AAC9D,UAAM;AAAA,MACJ,GAAG;AAAA,MACH,MAAM;AAAA,IACR,CAAC;AAM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