iobroker.zendure-solarflow 0.1.0-alpha.0
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.
- package/LICENSE +21 -0
- package/README.md +71 -0
- package/admin/.watch/index.css +270 -0
- package/admin/.watch/index.js +59658 -0
- package/admin/build/index.css +2 -0
- package/admin/build/index.css.map +7 -0
- package/admin/build/index.js +145 -0
- package/admin/build/index.js.map +7 -0
- package/admin/donate-with-paypal.png +0 -0
- package/admin/index_m.html +18 -0
- package/admin/style.css +32 -0
- package/admin/zendure-solarflow.png +0 -0
- package/build/constants/paths.js +50 -0
- package/build/constants/paths.js.map +7 -0
- package/build/main.js +106 -0
- package/build/main.js.map +7 -0
- package/build/models/IPackData.js +17 -0
- package/build/models/IPackData.js.map +7 -0
- package/build/models/ISolarFlowDeviceDetails.js +17 -0
- package/build/models/ISolarFlowDeviceDetails.js.map +7 -0
- package/build/models/ISolarFlowPaths.js +17 -0
- package/build/models/ISolarFlowPaths.js.map +7 -0
- package/build/services/adapterService.js +387 -0
- package/build/services/adapterService.js.map +7 -0
- package/build/services/mqttService.js +242 -0
- package/build/services/mqttService.js.map +7 -0
- package/build/services/webService.js +103 -0
- package/build/services/webService.js.map +7 -0
- package/io-package.json +104 -0
- package/package.json +96 -0
|
Binary file
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<html>
|
|
2
|
+
<head>
|
|
3
|
+
<!-- Load ioBroker scripts and styles-->
|
|
4
|
+
<link rel="stylesheet" type="text/css" href="../../css/adapter.css" />
|
|
5
|
+
<script type="text/javascript" src="../../socket.io/socket.io.js"></script>
|
|
6
|
+
|
|
7
|
+
<!-- Load our own files -->
|
|
8
|
+
<link rel="stylesheet" type="text/css" href="style.css" />
|
|
9
|
+
</head>
|
|
10
|
+
|
|
11
|
+
<body>
|
|
12
|
+
<!-- this is where the React components are loaded into -->
|
|
13
|
+
<div class="m adapter-container" id="root"></div>
|
|
14
|
+
|
|
15
|
+
<!-- load compiled React scripts -->
|
|
16
|
+
<script type="text/javascript" src="build/index.js"></script>
|
|
17
|
+
</body>
|
|
18
|
+
</html>
|
package/admin/style.css
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/* You can delete those if you want. I just found them very helpful */
|
|
2
|
+
* {
|
|
3
|
+
box-sizing: border-box
|
|
4
|
+
}
|
|
5
|
+
.m {
|
|
6
|
+
/* Don't cut off dropdowns! */
|
|
7
|
+
overflow: initial;
|
|
8
|
+
}
|
|
9
|
+
.m.adapter-container,
|
|
10
|
+
.m.adapter-container > div.App {
|
|
11
|
+
/* Fix layout/scrolling issues with tabs */
|
|
12
|
+
height: 100%;
|
|
13
|
+
width: 100%;
|
|
14
|
+
position: relative;
|
|
15
|
+
}
|
|
16
|
+
.m .select-wrapper + label {
|
|
17
|
+
/* The positioning for dropdown labels is messed up */
|
|
18
|
+
transform: none !important;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
label > i[title] {
|
|
22
|
+
/* Display the help cursor for the tooltip icons and fix their positioning */
|
|
23
|
+
cursor: help;
|
|
24
|
+
margin-left: 0.25em;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.dropdown-content {
|
|
28
|
+
/* Don't wrap text in dropdowns */
|
|
29
|
+
white-space: nowrap;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/* Add your styles here */
|
|
Binary file
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var paths_exports = {};
|
|
20
|
+
__export(paths_exports, {
|
|
21
|
+
pathsEu: () => pathsEu,
|
|
22
|
+
pathsGlobal: () => pathsGlobal
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(paths_exports);
|
|
25
|
+
const hostname = `app.zendure.tech`;
|
|
26
|
+
const versionGlobal = `v2`;
|
|
27
|
+
const versionEu = `eu`;
|
|
28
|
+
const solarFlowDevRegisterPath = `developer/api/apply`;
|
|
29
|
+
const solarFlowTokenPath = `auth/app/token`;
|
|
30
|
+
const solarFlowDeviceListPath = `productModule/device/queryDeviceListByConsumerId`;
|
|
31
|
+
const pathsGlobal = {
|
|
32
|
+
solarFlowDevRegisterUrl: `https://${hostname}/${versionGlobal}/${solarFlowDevRegisterPath}`,
|
|
33
|
+
solarFlowTokenUrl: `https://${hostname}/${versionGlobal}/${solarFlowTokenPath}`,
|
|
34
|
+
solarFlowQueryDeviceListUrl: `https://${hostname}/${versionGlobal}/${solarFlowDeviceListPath}`,
|
|
35
|
+
mqttUrl: "mq.zen-iot.com",
|
|
36
|
+
mqttPort: 1883
|
|
37
|
+
};
|
|
38
|
+
const pathsEu = {
|
|
39
|
+
solarFlowDevRegisterUrl: `https://${hostname}/${versionEu}/${solarFlowDevRegisterPath}`,
|
|
40
|
+
solarFlowTokenUrl: `https://${hostname}/${versionEu}/${solarFlowTokenPath}`,
|
|
41
|
+
solarFlowQueryDeviceListUrl: `https://${hostname}/${versionEu}/${solarFlowDeviceListPath}`,
|
|
42
|
+
mqttUrl: "mqtteu.zen-iot.com",
|
|
43
|
+
mqttPort: 1883
|
|
44
|
+
};
|
|
45
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
46
|
+
0 && (module.exports = {
|
|
47
|
+
pathsEu,
|
|
48
|
+
pathsGlobal
|
|
49
|
+
});
|
|
50
|
+
//# sourceMappingURL=paths.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/constants/paths.ts"],
|
|
4
|
+
"sourcesContent": ["import { ISolarFlowPaths } from \"../models/ISolarFlowPaths\";\r\n\r\n/* eslint-disable @typescript-eslint/indent */\r\nconst hostname = `app.zendure.tech`;\r\nconst versionGlobal = `v2`;\r\nconst versionEu = `eu`; // currently not used! Only the global server is ready at the moment\r\n\r\nconst solarFlowDevRegisterPath = `developer/api/apply`;\r\nconst solarFlowTokenPath = `auth/app/token`;\r\nconst solarFlowDeviceListPath = `productModule/device/queryDeviceListByConsumerId`;\r\n\r\nexport const pathsGlobal: ISolarFlowPaths = {\r\n solarFlowDevRegisterUrl: `https://${hostname}/${versionGlobal}/${solarFlowDevRegisterPath}`,\r\n solarFlowTokenUrl: `https://${hostname}/${versionGlobal}/${solarFlowTokenPath}`,\r\n solarFlowQueryDeviceListUrl: `https://${hostname}/${versionGlobal}/${solarFlowDeviceListPath}`,\r\n mqttUrl: \"mq.zen-iot.com\",\r\n mqttPort: 1883,\r\n};\r\n\r\nexport const pathsEu: ISolarFlowPaths = {\r\n solarFlowDevRegisterUrl: `https://${hostname}/${versionEu}/${solarFlowDevRegisterPath}`,\r\n solarFlowTokenUrl: `https://${hostname}/${versionEu}/${solarFlowTokenPath}`,\r\n solarFlowQueryDeviceListUrl: `https://${hostname}/${versionEu}/${solarFlowDeviceListPath}`,\r\n mqttUrl: \"mqtteu.zen-iot.com\",\r\n mqttPort: 1883,\r\n};\r\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,MAAM,WAAW;AACjB,MAAM,gBAAgB;AACtB,MAAM,YAAY;AAElB,MAAM,2BAA2B;AACjC,MAAM,qBAAqB;AAC3B,MAAM,0BAA0B;AAEzB,MAAM,cAA+B;AAAA,EAC1C,yBAAyB,WAAW,YAAY,iBAAiB;AAAA,EACjE,mBAAmB,WAAW,YAAY,iBAAiB;AAAA,EAC3D,6BAA6B,WAAW,YAAY,iBAAiB;AAAA,EACrE,SAAS;AAAA,EACT,UAAU;AACZ;AAEO,MAAM,UAA2B;AAAA,EACtC,yBAAyB,WAAW,YAAY,aAAa;AAAA,EAC7D,mBAAmB,WAAW,YAAY,aAAa;AAAA,EACvD,6BAA6B,WAAW,YAAY,aAAa;AAAA,EACjE,SAAS;AAAA,EACT,UAAU;AACZ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/build/main.js
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
24
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
25
|
+
var main_exports = {};
|
|
26
|
+
__export(main_exports, {
|
|
27
|
+
ZendureSolarflow: () => ZendureSolarflow
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(main_exports);
|
|
30
|
+
var utils = __toESM(require("@iobroker/adapter-core"));
|
|
31
|
+
var import_mqttService = require("./services/mqttService");
|
|
32
|
+
var import_webService = require("./services/webService");
|
|
33
|
+
var import_paths = require("./constants/paths");
|
|
34
|
+
var import_adapterService = require("./services/adapterService");
|
|
35
|
+
class ZendureSolarflow extends utils.Adapter {
|
|
36
|
+
constructor(options = {}) {
|
|
37
|
+
super({
|
|
38
|
+
...options,
|
|
39
|
+
name: "zendure-solarflow"
|
|
40
|
+
});
|
|
41
|
+
this.accessToken = void 0;
|
|
42
|
+
this.deviceList = [];
|
|
43
|
+
this.paths = void 0;
|
|
44
|
+
this.timer = null;
|
|
45
|
+
this.on("ready", this.onReady.bind(this));
|
|
46
|
+
this.on("stateChange", this.onStateChange.bind(this));
|
|
47
|
+
this.on("unload", this.onUnload.bind(this));
|
|
48
|
+
}
|
|
49
|
+
async onReady() {
|
|
50
|
+
var _a, _b;
|
|
51
|
+
this.paths = import_paths.pathsGlobal;
|
|
52
|
+
if (this.config.userName && this.config.password) {
|
|
53
|
+
(_a = (0, import_webService.login)(this)) == null ? void 0 : _a.then((_accessToken) => {
|
|
54
|
+
this.accessToken = _accessToken;
|
|
55
|
+
(0, import_webService.getDeviceList)(this).then((result) => {
|
|
56
|
+
if (result) {
|
|
57
|
+
this.deviceList = result;
|
|
58
|
+
(0, import_mqttService.connectMqttClient)(this);
|
|
59
|
+
(0, import_adapterService.startCheckStatesTimer)(this);
|
|
60
|
+
}
|
|
61
|
+
}).catch(() => {
|
|
62
|
+
var _a2;
|
|
63
|
+
(_a2 = this.log) == null ? void 0 : _a2.error("Retrieving device failed!");
|
|
64
|
+
});
|
|
65
|
+
}).catch((err) => {
|
|
66
|
+
this.log.error("Logon error at Zendure cloud service!");
|
|
67
|
+
});
|
|
68
|
+
} else {
|
|
69
|
+
this.log.error("No Login Information provided!");
|
|
70
|
+
(_b = this.stop) == null ? void 0 : _b.call(this);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
onUnload(callback) {
|
|
74
|
+
try {
|
|
75
|
+
if (this.timer) {
|
|
76
|
+
this.timer = null;
|
|
77
|
+
}
|
|
78
|
+
callback();
|
|
79
|
+
} catch (e) {
|
|
80
|
+
callback();
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
onStateChange(id, state) {
|
|
84
|
+
if (state) {
|
|
85
|
+
this.log.info(`state ${id} changed: ${state.val} (ack = ${state.ack})`);
|
|
86
|
+
if (id.includes("setOutputLimit") && state.val != void 0 && state.val != null) {
|
|
87
|
+
const splitted = id.split(".");
|
|
88
|
+
const productKey = splitted[2];
|
|
89
|
+
const deviceKey = splitted[3];
|
|
90
|
+
(0, import_mqttService.setOutputLimit)(this, productKey, deviceKey, Number(state.val));
|
|
91
|
+
}
|
|
92
|
+
} else {
|
|
93
|
+
this.log.info(`state ${id} deleted`);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
if (require.main !== module) {
|
|
98
|
+
module.exports = (options) => new ZendureSolarflow(options);
|
|
99
|
+
} else {
|
|
100
|
+
(() => new ZendureSolarflow())();
|
|
101
|
+
}
|
|
102
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
103
|
+
0 && (module.exports = {
|
|
104
|
+
ZendureSolarflow
|
|
105
|
+
});
|
|
106
|
+
//# sourceMappingURL=main.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 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, 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 timer: NodeJS.Timeout | null = null;\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)?.then((_accessToken: string) => {\r\n this.accessToken = _accessToken;\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.log?.error(\"Retrieving device failed!\");\r\n });\r\n }).catch((err) => {\r\n this.log.error(\"Logon error at Zendure cloud service!\")\r\n });\r\n } else {\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.timer) {\r\n this.timer = null;\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.info(`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 {\r\n // The state was deleted\r\n this.log.info(`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,yBAAkD;AAClD,wBAAqC;AAGrC,mBAA4B;AAC5B,4BAAsC;AAE/B,MAAM,yBAAyB,MAAM,QAAQ;AAAA,EAC3C,YAAY,UAAyC,CAAC,GAAG;AAC9D,UAAM;AAAA,MACJ,GAAG;AAAA,MACH,MAAM;AAAA,IACR,CAAC;AAMH,SAAO,cAAkC;AACzC,SAAO,aAAwC,CAAC;AAChD,SAAO,QAAqC;AAC5C,SAAO,QAA+B;AARpC,SAAK,GAAG,SAAS,KAAK,QAAQ,KAAK,IAAI,CAAC;AACxC,SAAK,GAAG,eAAe,KAAK,cAAc,KAAK,IAAI,CAAC;AACpD,SAAK,GAAG,UAAU,KAAK,SAAS,KAAK,IAAI,CAAC;AAAA,EAC5C;AAAA,EAUA,MAAc,UAAyB;AAlCzC;AAoCI,SAAK,QAAQ;AAGb,QAAI,KAAK,OAAO,YAAY,KAAK,OAAO,UAAU;AAChD,yCAAM,IAAI,MAAV,mBAAa,KAAK,CAAC,iBAAyB;AAC1C,aAAK,cAAc;AAGnB,6CAAc,IAAI,EACf,KAAK,CAAC,WAAsC;AAC3C,cAAI,QAAQ;AAEV,iBAAK,aAAa;AAClB,sDAAkB,IAAI;AACtB,6DAAsB,IAAI;AAAA,UAC5B;AAAA,QACF,CAAC,EACA,MAAM,MAAM;AArDvB,cAAAA;AAsDY,WAAAA,MAAA,KAAK,QAAL,gBAAAA,IAAU,MAAM;AAAA,QAClB,CAAC;AAAA,MACL,GAAG,MAAM,CAAC,QAAQ;AAChB,aAAK,IAAI,MAAM,uCAAuC;AAAA,MACxD;AAAA,IACF,OAAO;AACL,WAAK,IAAI,MAAM,gCAAgC;AAC/C,iBAAK,SAAL;AAAA,IACF;AAAA,EACF;AAAA,EAKQ,SAAS,UAA4B;AAC3C,QAAI;AACF,UAAI,KAAK,OAAO;AACd,aAAK,QAAQ;AAAA,MACf;AACA,eAAS;AAAA,IACX,SAAS,GAAP;AACA,eAAS;AAAA,IACX;AAAA,EACF;AAAA,EAKQ,cACN,IACA,OACM;AACN,QAAI,OAAO;AAET,WAAK,IAAI,KAAK,SAAS,eAAe,MAAM,cAAc,MAAM,MAAM;AACtE,UACE,GAAG,SAAS,gBAAgB,KAC5B,MAAM,OAAO,UACb,MAAM,OAAO,MACb;AACA,cAAM,WAAW,GAAG,MAAM,GAAG;AAC7B,cAAM,aAAa,SAAS;AAC5B,cAAM,YAAY,SAAS;AAC3B,+CAAe,MAAM,YAAY,WAAW,OAAO,MAAM,GAAG,CAAC;AAAA,MAC/D;AAAA,IACF,OAAO;AAEL,WAAK,IAAI,KAAK,SAAS,YAAY;AAAA,IACrC;AAAA,EACF;AACF;AAEA,IAAI,QAAQ,SAAS,QAAQ;AAE3B,SAAO,UAAU,CAAC,YAChB,IAAI,iBAAiB,OAAO;AAChC,OAAO;AAEL,GAAC,MAAM,IAAI,iBAAiB,GAAG;AACjC;",
|
|
6
|
+
"names": ["_a"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
var IPackData_exports = {};
|
|
16
|
+
module.exports = __toCommonJS(IPackData_exports);
|
|
17
|
+
//# sourceMappingURL=IPackData.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/models/IPackData.ts"],
|
|
4
|
+
"sourcesContent": ["/* eslint-disable @typescript-eslint/indent */\r\nexport interface IPackData {\r\n sn: string;\r\n socLevel: number;\r\n maxTemp: number;\r\n minVol: number;\r\n maxVol: number;\r\n totalVol: number;\r\n}\r\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
var ISolarFlowDeviceDetails_exports = {};
|
|
16
|
+
module.exports = __toCommonJS(ISolarFlowDeviceDetails_exports);
|
|
17
|
+
//# sourceMappingURL=ISolarFlowDeviceDetails.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/models/ISolarFlowDeviceDetails.ts"],
|
|
4
|
+
"sourcesContent": ["/* eslint-disable @typescript-eslint/indent */\r\nexport interface ISolarFlowDeviceDetails {\r\n batteryCode: string;\r\n bindId: number;\r\n bindStatus: number;\r\n bindType: number;\r\n blueState: boolean;\r\n deviceKey: string;\r\n electricity: number; // SOC\r\n fourGStatus: boolean;\r\n id: number;\r\n input: boolean;\r\n inputPower: number;\r\n isShareFlag: string;\r\n isSwitch: boolean;\r\n name: string; // SolarFlow\r\n networkType: number;\r\n onlineFlag: string;\r\n output: boolean;\r\n outputPower: number;\r\n packList: number[];\r\n parallelMode: number;\r\n productId: number;\r\n productKey: string;\r\n productName: string;\r\n productType: number;\r\n remainOutTime: number;\r\n seriesMode: number;\r\n slowChargePower: number;\r\n snNumber: string;\r\n standard: string;\r\n temperature: number;\r\n temperatureUnit: number;\r\n upgradeStatus: unknown;\r\n upgradeStatusDes: string;\r\n upsMode: boolean;\r\n url: string;\r\n wifiStatus: boolean;\r\n}\r\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
var ISolarFlowPaths_exports = {};
|
|
16
|
+
module.exports = __toCommonJS(ISolarFlowPaths_exports);
|
|
17
|
+
//# sourceMappingURL=ISolarFlowPaths.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/models/ISolarFlowPaths.ts"],
|
|
4
|
+
"sourcesContent": ["/* eslint-disable @typescript-eslint/indent */\r\nexport interface ISolarFlowPaths {\r\n solarFlowDevRegisterUrl: string;\r\n solarFlowTokenUrl: string;\r\n solarFlowQueryDeviceListUrl: string;\r\n mqttUrl: string;\r\n mqttPort: number;\r\n}\r\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|