iobroker.zendure-solarflow 1.1.15 → 1.1.17
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/README.md +5 -0
- package/admin/build/index.js +1 -1
- package/admin/build/index.js.map +2 -2
- package/build/helpers/createCalculationStates.js +16 -16
- package/build/helpers/createCalculationStates.js.map +2 -2
- package/build/helpers/createControlStates.js +10 -16
- package/build/helpers/createControlStates.js.map +2 -2
- package/build/helpers/createSolarFlowStates.js +120 -159
- package/build/helpers/createSolarFlowStates.js.map +2 -2
- package/build/main.js +11 -22
- package/build/main.js.map +2 -2
- package/build/services/adapterService.js +8 -8
- package/build/services/adapterService.js.map +2 -2
- package/build/services/calculationService.js +46 -31
- package/build/services/calculationService.js.map +2 -2
- package/build/services/jobSchedule.js +9 -0
- package/build/services/jobSchedule.js.map +2 -2
- package/build/services/mqttService.js +2 -2
- package/build/services/mqttService.js.map +2 -2
- package/build/services/webService.js.map +2 -2
- package/io-package.json +27 -27
- package/package.json +2 -1
|
@@ -23,7 +23,7 @@ __export(createCalculationStates_exports, {
|
|
|
23
23
|
module.exports = __toCommonJS(createCalculationStates_exports);
|
|
24
24
|
const createCalculationStates = async (adapter, productKey, deviceKey) => {
|
|
25
25
|
await (adapter == null ? void 0 : adapter.extendObjectAsync(
|
|
26
|
-
productKey
|
|
26
|
+
`${productKey}.${deviceKey}.calculations.solarInputEnergyTodayWh`,
|
|
27
27
|
{
|
|
28
28
|
type: "state",
|
|
29
29
|
common: {
|
|
@@ -42,7 +42,7 @@ const createCalculationStates = async (adapter, productKey, deviceKey) => {
|
|
|
42
42
|
}
|
|
43
43
|
));
|
|
44
44
|
await (adapter == null ? void 0 : adapter.extendObjectAsync(
|
|
45
|
-
productKey
|
|
45
|
+
`${productKey}.${deviceKey}.calculations.solarInputEnergyTodaykWh`,
|
|
46
46
|
{
|
|
47
47
|
type: "state",
|
|
48
48
|
common: {
|
|
@@ -61,7 +61,7 @@ const createCalculationStates = async (adapter, productKey, deviceKey) => {
|
|
|
61
61
|
}
|
|
62
62
|
));
|
|
63
63
|
await (adapter == null ? void 0 : adapter.extendObjectAsync(
|
|
64
|
-
productKey
|
|
64
|
+
`${productKey}.${deviceKey}.calculations.outputPackEnergyTodayWh`,
|
|
65
65
|
{
|
|
66
66
|
type: "state",
|
|
67
67
|
common: {
|
|
@@ -80,7 +80,7 @@ const createCalculationStates = async (adapter, productKey, deviceKey) => {
|
|
|
80
80
|
}
|
|
81
81
|
));
|
|
82
82
|
await (adapter == null ? void 0 : adapter.extendObjectAsync(
|
|
83
|
-
productKey
|
|
83
|
+
`${productKey}.${deviceKey}.calculations.outputPackEnergyTodaykWh`,
|
|
84
84
|
{
|
|
85
85
|
type: "state",
|
|
86
86
|
common: {
|
|
@@ -99,7 +99,7 @@ const createCalculationStates = async (adapter, productKey, deviceKey) => {
|
|
|
99
99
|
}
|
|
100
100
|
));
|
|
101
101
|
await (adapter == null ? void 0 : adapter.extendObjectAsync(
|
|
102
|
-
productKey
|
|
102
|
+
`${productKey}.${deviceKey}.calculations.packInputEnergyTodayWh`,
|
|
103
103
|
{
|
|
104
104
|
type: "state",
|
|
105
105
|
common: {
|
|
@@ -118,7 +118,7 @@ const createCalculationStates = async (adapter, productKey, deviceKey) => {
|
|
|
118
118
|
}
|
|
119
119
|
));
|
|
120
120
|
await (adapter == null ? void 0 : adapter.extendObjectAsync(
|
|
121
|
-
productKey
|
|
121
|
+
`${productKey}.${deviceKey}.calculations.packInputEnergyTodaykWh`,
|
|
122
122
|
{
|
|
123
123
|
type: "state",
|
|
124
124
|
common: {
|
|
@@ -137,7 +137,7 @@ const createCalculationStates = async (adapter, productKey, deviceKey) => {
|
|
|
137
137
|
}
|
|
138
138
|
));
|
|
139
139
|
await (adapter == null ? void 0 : adapter.extendObjectAsync(
|
|
140
|
-
productKey
|
|
140
|
+
`${productKey}.${deviceKey}.calculations.outputHomeEnergyTodayWh`,
|
|
141
141
|
{
|
|
142
142
|
type: "state",
|
|
143
143
|
common: {
|
|
@@ -156,7 +156,7 @@ const createCalculationStates = async (adapter, productKey, deviceKey) => {
|
|
|
156
156
|
}
|
|
157
157
|
));
|
|
158
158
|
await (adapter == null ? void 0 : adapter.extendObjectAsync(
|
|
159
|
-
productKey
|
|
159
|
+
`${productKey}.${deviceKey}.calculations.outputHomeEnergyTodaykWh`,
|
|
160
160
|
{
|
|
161
161
|
type: "state",
|
|
162
162
|
common: {
|
|
@@ -175,7 +175,7 @@ const createCalculationStates = async (adapter, productKey, deviceKey) => {
|
|
|
175
175
|
}
|
|
176
176
|
));
|
|
177
177
|
await (adapter == null ? void 0 : adapter.extendObjectAsync(
|
|
178
|
-
productKey
|
|
178
|
+
`${productKey}.${deviceKey}.calculations.remainInputTime`,
|
|
179
179
|
{
|
|
180
180
|
type: "state",
|
|
181
181
|
common: {
|
|
@@ -193,7 +193,7 @@ const createCalculationStates = async (adapter, productKey, deviceKey) => {
|
|
|
193
193
|
}
|
|
194
194
|
));
|
|
195
195
|
await (adapter == null ? void 0 : adapter.extendObjectAsync(
|
|
196
|
-
productKey
|
|
196
|
+
`${productKey}.${deviceKey}.calculations.remainOutTime`,
|
|
197
197
|
{
|
|
198
198
|
type: "state",
|
|
199
199
|
common: {
|
|
@@ -211,7 +211,7 @@ const createCalculationStates = async (adapter, productKey, deviceKey) => {
|
|
|
211
211
|
}
|
|
212
212
|
));
|
|
213
213
|
await (adapter == null ? void 0 : adapter.extendObjectAsync(
|
|
214
|
-
productKey
|
|
214
|
+
`${productKey}.${deviceKey}.calculations.soc`,
|
|
215
215
|
{
|
|
216
216
|
type: "state",
|
|
217
217
|
common: {
|
|
@@ -219,7 +219,7 @@ const createCalculationStates = async (adapter, productKey, deviceKey) => {
|
|
|
219
219
|
de: "Ladezustand in %",
|
|
220
220
|
en: "State of Charge %"
|
|
221
221
|
},
|
|
222
|
-
type: "
|
|
222
|
+
type: "number",
|
|
223
223
|
desc: "soc",
|
|
224
224
|
role: "value",
|
|
225
225
|
read: true,
|
|
@@ -230,7 +230,7 @@ const createCalculationStates = async (adapter, productKey, deviceKey) => {
|
|
|
230
230
|
}
|
|
231
231
|
));
|
|
232
232
|
await (adapter == null ? void 0 : adapter.extendObjectAsync(
|
|
233
|
-
productKey
|
|
233
|
+
`${productKey}.${deviceKey}.calculations.energyWh`,
|
|
234
234
|
{
|
|
235
235
|
type: "state",
|
|
236
236
|
common: {
|
|
@@ -238,7 +238,7 @@ const createCalculationStates = async (adapter, productKey, deviceKey) => {
|
|
|
238
238
|
de: "Energie in den Batterien (Wh)",
|
|
239
239
|
en: "Energy in battery (Wh)"
|
|
240
240
|
},
|
|
241
|
-
type: "
|
|
241
|
+
type: "number",
|
|
242
242
|
desc: "energyWh",
|
|
243
243
|
role: "value",
|
|
244
244
|
read: true,
|
|
@@ -249,7 +249,7 @@ const createCalculationStates = async (adapter, productKey, deviceKey) => {
|
|
|
249
249
|
}
|
|
250
250
|
));
|
|
251
251
|
await (adapter == null ? void 0 : adapter.extendObjectAsync(
|
|
252
|
-
productKey
|
|
252
|
+
`${productKey}.${deviceKey}.calculations.energyWhMax`,
|
|
253
253
|
{
|
|
254
254
|
type: "state",
|
|
255
255
|
common: {
|
|
@@ -257,7 +257,7 @@ const createCalculationStates = async (adapter, productKey, deviceKey) => {
|
|
|
257
257
|
de: "Max. Energie in allen Batterien (Wh)",
|
|
258
258
|
en: "Max. Energy in battery (Wh)"
|
|
259
259
|
},
|
|
260
|
-
type: "
|
|
260
|
+
type: "number",
|
|
261
261
|
desc: "energyWhMax",
|
|
262
262
|
role: "value",
|
|
263
263
|
read: true,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/helpers/createCalculationStates.ts"],
|
|
4
|
-
"sourcesContent": ["import { ZendureSolarflow } from \"../main\";\r\n\r\n/* eslint-disable @typescript-eslint/indent */\r\nexport const createCalculationStates = async (\r\n adapter: ZendureSolarflow,\r\n productKey: string,\r\n deviceKey: string,\r\n): Promise<void> => {\r\n /*\r\n Start Solar Input Energy states\r\n */\r\n await adapter?.extendObjectAsync(\r\n productKey
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGO,MAAM,0BAA0B,OACrC,SACA,YACA,cACkB;AAIlB,SAAM,mCAAS;AAAA,IACb,
|
|
4
|
+
"sourcesContent": ["import { ZendureSolarflow } from \"../main\";\r\n\r\n/* eslint-disable @typescript-eslint/indent */\r\nexport const createCalculationStates = async (\r\n adapter: ZendureSolarflow,\r\n productKey: string,\r\n deviceKey: string,\r\n): Promise<void> => {\r\n /*\r\n Start Solar Input Energy states\r\n */\r\n await adapter?.extendObjectAsync(\r\n `${productKey}.${deviceKey}.calculations.solarInputEnergyTodayWh`,\r\n {\r\n type: \"state\",\r\n common: {\r\n name: {\r\n de: \"Heutiger Solarertrag (Wh)\",\r\n en: \"Todays solar input (Wh)\",\r\n },\r\n type: \"number\",\r\n desc: \"solarInputEnergyTodayWh\",\r\n role: \"value.energy\",\r\n read: true,\r\n write: false,\r\n unit: \"Wh\",\r\n },\r\n native: {},\r\n },\r\n );\r\n\r\n await adapter?.extendObjectAsync(\r\n `${productKey}.${deviceKey}.calculations.solarInputEnergyTodaykWh`,\r\n {\r\n type: \"state\",\r\n common: {\r\n name: {\r\n de: \"Heutiger Solarertrag (kWh)\",\r\n en: \"Todays solar input (kWh)\",\r\n },\r\n type: \"number\",\r\n desc: \"solarInputEnergyTodaykWh\",\r\n role: \"value.energy\",\r\n read: true,\r\n write: false,\r\n unit: \"kWh\",\r\n },\r\n native: {},\r\n },\r\n );\r\n\r\n /*\r\n Start output pack Energy states\r\n */\r\n await adapter?.extendObjectAsync(\r\n `${productKey}.${deviceKey}.calculations.outputPackEnergyTodayWh`,\r\n {\r\n type: \"state\",\r\n common: {\r\n name: {\r\n de: \"Heutige Ladung zu Batterie (Wh)\",\r\n en: \"Todays charge energy to battery (Wh)\",\r\n },\r\n type: \"number\",\r\n desc: \"outputPackEnergyTodayWh\",\r\n role: \"value.energy\",\r\n read: true,\r\n write: false,\r\n unit: \"Wh\",\r\n },\r\n native: {},\r\n },\r\n );\r\n\r\n await adapter?.extendObjectAsync(\r\n `${productKey}.${deviceKey}.calculations.outputPackEnergyTodaykWh`,\r\n {\r\n type: \"state\",\r\n common: {\r\n name: {\r\n de: \"Heutige Ladung zur Batterie (kWh)\",\r\n en: \"todays charge energy to battery (kWh)\",\r\n },\r\n type: \"number\",\r\n desc: \"outputPackEnergyTodaykWh\",\r\n role: \"value.energy\",\r\n read: true,\r\n write: false,\r\n unit: \"kWh\",\r\n },\r\n native: {},\r\n },\r\n );\r\n\r\n /*\r\n Start Pack Input Energy states\r\n */\r\n await adapter?.extendObjectAsync(\r\n `${productKey}.${deviceKey}.calculations.packInputEnergyTodayWh`,\r\n {\r\n type: \"state\",\r\n common: {\r\n name: {\r\n de: \"Heutige Einspeisung aus Batterie (Wh)\",\r\n en: \"Todays discharge energy from battery (Wh)\",\r\n },\r\n type: \"number\",\r\n desc: \"packInputEnergyTodayWh\",\r\n role: \"value.energy\",\r\n read: true,\r\n write: false,\r\n unit: \"Wh\",\r\n },\r\n native: {},\r\n },\r\n );\r\n\r\n await adapter?.extendObjectAsync(\r\n `${productKey}.${deviceKey}.calculations.packInputEnergyTodaykWh`,\r\n {\r\n type: \"state\",\r\n common: {\r\n name: {\r\n de: \"Heutige Einspeisung aus Batterie (kWh)\",\r\n en: \"Todays discharge energy from battery (kWh)\",\r\n },\r\n type: \"number\",\r\n desc: \"packInputEnergyTodaykWh\",\r\n role: \"value.energy\",\r\n read: true,\r\n write: false,\r\n unit: \"kWh\",\r\n },\r\n native: {},\r\n },\r\n );\r\n\r\n /*\r\n Start outputHome Energy states\r\n */\r\n await adapter?.extendObjectAsync(\r\n `${productKey}.${deviceKey}.calculations.outputHomeEnergyTodayWh`,\r\n {\r\n type: \"state\",\r\n common: {\r\n name: {\r\n de: \"Heutige Einspeisung ins Haus (Wh)\",\r\n en: \"Todays input energy to home (Wh)\",\r\n },\r\n type: \"number\",\r\n desc: \"outputHomeEnergyTodayWh\",\r\n role: \"value.energy\",\r\n read: true,\r\n write: false,\r\n unit: \"Wh\",\r\n },\r\n native: {},\r\n },\r\n );\r\n\r\n await adapter?.extendObjectAsync(\r\n `${productKey}.${deviceKey}.calculations.outputHomeEnergyTodaykWh`,\r\n {\r\n type: \"state\",\r\n common: {\r\n name: {\r\n de: \"Heutige Einspeisung ins Haus (kWh)\",\r\n en: \"Todays input energy to home (kWh)\",\r\n },\r\n type: \"number\",\r\n desc: \"outputHomeEnergyTodaykWh\",\r\n role: \"value.energy\",\r\n read: true,\r\n write: false,\r\n unit: \"kWh\",\r\n },\r\n native: {},\r\n },\r\n );\r\n /*\r\n End Energy states\r\n */\r\n\r\n // Calculation input time\r\n await adapter?.extendObjectAsync(\r\n `${productKey}.${deviceKey}.calculations.remainInputTime`,\r\n {\r\n type: \"state\",\r\n common: {\r\n name: {\r\n de: \"Erwartete Ladedauer (hh:mm)\",\r\n en: \"remaining charge time (hh:mm)\",\r\n },\r\n type: \"string\",\r\n desc: \"calcRemainInputTime\",\r\n role: \"value\",\r\n read: true,\r\n write: false,\r\n },\r\n native: {},\r\n },\r\n );\r\n\r\n // Calculation remainOutTime\r\n await adapter?.extendObjectAsync(\r\n `${productKey}.${deviceKey}.calculations.remainOutTime`,\r\n {\r\n type: \"state\",\r\n common: {\r\n name: {\r\n de: \"Erwartete Entladedauer (hh:mm)\",\r\n en: \"remaining discharge time (hh:mm)\",\r\n },\r\n type: \"string\",\r\n desc: \"calcRemainOutTime\",\r\n role: \"value\",\r\n read: true,\r\n write: false,\r\n },\r\n native: {},\r\n },\r\n );\r\n\r\n // Calculation SOC\r\n await adapter?.extendObjectAsync(\r\n `${productKey}.${deviceKey}.calculations.soc`,\r\n {\r\n type: \"state\",\r\n common: {\r\n name: {\r\n de: \"Ladezustand in %\",\r\n en: \"State of Charge %\",\r\n },\r\n type: \"number\",\r\n desc: \"soc\",\r\n role: \"value\",\r\n read: true,\r\n write: false,\r\n unit: \"%\",\r\n },\r\n native: {},\r\n },\r\n );\r\n\r\n // Energy Wh\r\n await adapter?.extendObjectAsync(\r\n `${productKey}.${deviceKey}.calculations.energyWh`,\r\n {\r\n type: \"state\",\r\n common: {\r\n name: {\r\n de: \"Energie in den Batterien (Wh)\",\r\n en: \"Energy in battery (Wh)\",\r\n },\r\n type: \"number\",\r\n desc: \"energyWh\",\r\n role: \"value\",\r\n read: true,\r\n write: false,\r\n unit: \"Wh\",\r\n },\r\n native: {},\r\n },\r\n );\r\n\r\n // Max. Energy for alle batteries Wh\r\n await adapter?.extendObjectAsync(\r\n `${productKey}.${deviceKey}.calculations.energyWhMax`,\r\n {\r\n type: \"state\",\r\n common: {\r\n name: {\r\n de: \"Max. Energie in allen Batterien (Wh)\",\r\n en: \"Max. Energy in battery (Wh)\",\r\n },\r\n type: \"number\",\r\n desc: \"energyWhMax\",\r\n role: \"value\",\r\n read: true,\r\n write: false,\r\n unit: \"Wh\",\r\n },\r\n native: {},\r\n },\r\n );\r\n};\r\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGO,MAAM,0BAA0B,OACrC,SACA,YACA,cACkB;AAIlB,SAAM,mCAAS;AAAA,IACb,GAAG,UAAU,IAAI,SAAS;AAAA,IAC1B;AAAA,MACE,MAAM;AAAA,MACN,QAAQ;AAAA,QACN,MAAM;AAAA,UACJ,IAAI;AAAA,UACJ,IAAI;AAAA,QACN;AAAA,QACA,MAAM;AAAA,QACN,MAAM;AAAA,QACN,MAAM;AAAA,QACN,MAAM;AAAA,QACN,OAAO;AAAA,QACP,MAAM;AAAA,MACR;AAAA,MACA,QAAQ,CAAC;AAAA,IACX;AAAA;AAGF,SAAM,mCAAS;AAAA,IACb,GAAG,UAAU,IAAI,SAAS;AAAA,IAC1B;AAAA,MACE,MAAM;AAAA,MACN,QAAQ;AAAA,Q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
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -22,7 +22,7 @@ __export(createControlStates_exports, {
|
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(createControlStates_exports);
|
|
24
24
|
const createControlStates = async (adapter, productKey, deviceKey) => {
|
|
25
|
-
await (adapter == null ? void 0 : adapter.extendObjectAsync(productKey
|
|
25
|
+
await (adapter == null ? void 0 : adapter.extendObjectAsync(`${productKey}.${deviceKey}.control`, {
|
|
26
26
|
type: "channel",
|
|
27
27
|
common: {
|
|
28
28
|
name: {
|
|
@@ -33,7 +33,7 @@ const createControlStates = async (adapter, productKey, deviceKey) => {
|
|
|
33
33
|
native: {}
|
|
34
34
|
}));
|
|
35
35
|
await (adapter == null ? void 0 : adapter.extendObjectAsync(
|
|
36
|
-
productKey
|
|
36
|
+
`${productKey}.${deviceKey}.control.setOutputLimit`,
|
|
37
37
|
{
|
|
38
38
|
type: "state",
|
|
39
39
|
common: {
|
|
@@ -53,7 +53,7 @@ const createControlStates = async (adapter, productKey, deviceKey) => {
|
|
|
53
53
|
}
|
|
54
54
|
));
|
|
55
55
|
await (adapter == null ? void 0 : adapter.extendObjectAsync(
|
|
56
|
-
productKey
|
|
56
|
+
`${productKey}.${deviceKey}.control.chargeLimit`,
|
|
57
57
|
{
|
|
58
58
|
type: "state",
|
|
59
59
|
common: {
|
|
@@ -74,7 +74,7 @@ const createControlStates = async (adapter, productKey, deviceKey) => {
|
|
|
74
74
|
}
|
|
75
75
|
));
|
|
76
76
|
await (adapter == null ? void 0 : adapter.extendObjectAsync(
|
|
77
|
-
productKey
|
|
77
|
+
`${productKey}.${deviceKey}.control.dischargeLimit`,
|
|
78
78
|
{
|
|
79
79
|
type: "state",
|
|
80
80
|
common: {
|
|
@@ -96,7 +96,7 @@ const createControlStates = async (adapter, productKey, deviceKey) => {
|
|
|
96
96
|
));
|
|
97
97
|
if (adapter.config.useLowVoltageBlock) {
|
|
98
98
|
await (adapter == null ? void 0 : adapter.extendObjectAsync(
|
|
99
|
-
productKey
|
|
99
|
+
`${productKey}.${deviceKey}.control.lowVoltageBlock`,
|
|
100
100
|
{
|
|
101
101
|
type: "state",
|
|
102
102
|
common: {
|
|
@@ -106,7 +106,7 @@ const createControlStates = async (adapter, productKey, deviceKey) => {
|
|
|
106
106
|
},
|
|
107
107
|
type: "boolean",
|
|
108
108
|
desc: "lowVoltageBlock",
|
|
109
|
-
role: "
|
|
109
|
+
role: "indicator.lowbat",
|
|
110
110
|
read: true,
|
|
111
111
|
write: false
|
|
112
112
|
},
|
|
@@ -114,18 +114,12 @@ const createControlStates = async (adapter, productKey, deviceKey) => {
|
|
|
114
114
|
}
|
|
115
115
|
));
|
|
116
116
|
adapter == null ? void 0 : adapter.subscribeStates(
|
|
117
|
-
productKey
|
|
117
|
+
`${productKey}.${deviceKey}.control.lowVoltageBlock`
|
|
118
118
|
);
|
|
119
119
|
}
|
|
120
|
-
adapter == null ? void 0 : adapter.subscribeStates(
|
|
121
|
-
|
|
122
|
-
);
|
|
123
|
-
adapter == null ? void 0 : adapter.subscribeStates(
|
|
124
|
-
productKey + "." + deviceKey + ".control.chargeLimit"
|
|
125
|
-
);
|
|
126
|
-
adapter == null ? void 0 : adapter.subscribeStates(
|
|
127
|
-
productKey + "." + deviceKey + ".control.dischargeLimit"
|
|
128
|
-
);
|
|
120
|
+
adapter == null ? void 0 : adapter.subscribeStates(`${productKey}.${deviceKey}.control.setOutputLimit`);
|
|
121
|
+
adapter == null ? void 0 : adapter.subscribeStates(`${productKey}.${deviceKey}.control.chargeLimit`);
|
|
122
|
+
adapter == null ? void 0 : adapter.subscribeStates(`${productKey}.${deviceKey}.control.dischargeLimit`);
|
|
129
123
|
};
|
|
130
124
|
// Annotate the CommonJS export names for ESM import in node:
|
|
131
125
|
0 && (module.exports = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/helpers/createControlStates.ts"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable @typescript-eslint/indent */\r\n\r\nimport { ZendureSolarflow } from \"../main\";\r\n\r\nexport const createControlStates = async (\r\n adapter: ZendureSolarflow,\r\n productKey: string,\r\n deviceKey: string,\r\n): Promise<void> => {\r\n // Create control folder\r\n await adapter?.extendObjectAsync(productKey
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIO,MAAM,sBAAsB,OACjC,SACA,YACA,cACkB;AAElB,SAAM,mCAAS,kBAAkB,
|
|
4
|
+
"sourcesContent": ["/* eslint-disable @typescript-eslint/indent */\r\n\r\nimport { ZendureSolarflow } from \"../main\";\r\n\r\nexport const createControlStates = async (\r\n adapter: ZendureSolarflow,\r\n productKey: string,\r\n deviceKey: string,\r\n): Promise<void> => {\r\n // Create control folder\r\n await adapter?.extendObjectAsync(`${productKey}.${deviceKey}.control`, {\r\n type: \"channel\",\r\n common: {\r\n name: {\r\n de: \"Steuerung f\u00FCr Ger\u00E4t \" + deviceKey,\r\n en: \"Control for device \" + deviceKey,\r\n },\r\n },\r\n native: {},\r\n });\r\n\r\n // State zum Setzen des Output Limit\r\n await adapter?.extendObjectAsync(\r\n `${productKey}.${deviceKey}.control.setOutputLimit`,\r\n {\r\n type: \"state\",\r\n common: {\r\n name: {\r\n de: \"Einzustellende Ausgangsleistung\",\r\n en: \"Control of the output limit\",\r\n },\r\n type: \"number\",\r\n desc: \"setOutputLimit\",\r\n role: \"value.power\",\r\n read: true,\r\n write: true,\r\n min: 0,\r\n unit: \"W\",\r\n },\r\n native: {},\r\n },\r\n );\r\n\r\n // State zum Setzen des Charge Limit\r\n await adapter?.extendObjectAsync(\r\n `${productKey}.${deviceKey}.control.chargeLimit`,\r\n {\r\n type: \"state\",\r\n common: {\r\n name: {\r\n de: \"Setzen des Lade-Limits\",\r\n en: \"Control of the charge limit\",\r\n },\r\n type: \"number\",\r\n desc: \"chargeLimit\",\r\n role: \"value.battery\",\r\n read: true,\r\n write: true,\r\n min: 40,\r\n max: 100,\r\n unit: \"%\",\r\n },\r\n native: {},\r\n },\r\n );\r\n\r\n // State zum Setzen des Discharge Limit\r\n await adapter?.extendObjectAsync(\r\n `${productKey}.${deviceKey}.control.dischargeLimit`,\r\n {\r\n type: \"state\",\r\n common: {\r\n name: {\r\n de: \"Setzen des Entlade-Limits\",\r\n en: \"Control of the discharge limit\",\r\n },\r\n type: \"number\",\r\n desc: \"dischargeLimit\",\r\n role: \"value.battery\",\r\n read: true,\r\n write: true,\r\n min: 0,\r\n max: 90,\r\n unit: \"%\",\r\n },\r\n native: {},\r\n },\r\n );\r\n\r\n if (adapter.config.useLowVoltageBlock) {\r\n // State zum Setzen des Output Limit\r\n await adapter?.extendObjectAsync(\r\n `${productKey}.${deviceKey}.control.lowVoltageBlock`,\r\n {\r\n type: \"state\",\r\n common: {\r\n name: {\r\n de: \"Niedrige Batteriespannung erkannt\",\r\n en: \"Low Voltage on battery detected\",\r\n },\r\n type: \"boolean\",\r\n desc: \"lowVoltageBlock\",\r\n role: \"indicator.lowbat\",\r\n read: true,\r\n write: false,\r\n },\r\n native: {},\r\n },\r\n );\r\n\r\n adapter?.subscribeStates(\r\n `${productKey}.${deviceKey}.control.lowVoltageBlock`,\r\n );\r\n }\r\n\r\n // Subcribe to control states\r\n adapter?.subscribeStates(`${productKey}.${deviceKey}.control.setOutputLimit`);\r\n\r\n adapter?.subscribeStates(`${productKey}.${deviceKey}.control.chargeLimit`);\r\n\r\n adapter?.subscribeStates(`${productKey}.${deviceKey}.control.dischargeLimit`);\r\n};\r\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIO,MAAM,sBAAsB,OACjC,SACA,YACA,cACkB;AAElB,SAAM,mCAAS,kBAAkB,GAAG,UAAU,IAAI,SAAS,YAAY;AAAA,IACrE,MAAM;AAAA,IACN,QAAQ;AAAA,MACN,MAAM;AAAA,QACJ,IAAI,+BAAyB;AAAA,QA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AAM;AAAA,QACN,QAAQ;AAAA,UACN,MAAM;AAAA,YACJ,IAAI;AAAA,YACJ,IAAI;AAAA,UACN;AAAA,UACA,MAAM;AAAA,UACN,MAAM;AAAA,UACN,MAAM;AAAA,UACN,MAAM;AAAA,UACN,OAAO;AAAA,QACT;AAAA,QACA,QAAQ,CAAC;AAAA,MACX;AAAA;AAGF,uCAAS;AAAA,MACP,GAAG,UAAU,IAAI,SAAS;AAAA;AAAA,EAE9B;AAGA,qCAAS,gBAAgB,GAAG,UAAU,IAAI,SAAS;AAEnD,qCAAS,gBAAgB,GAAG,UAAU,IAAI,SAAS;AAEnD,qCAAS,gBAAgB,GAAG,UAAU,IAAI,SAAS;AACrD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -40,20 +40,17 @@ const createSolarFlowStates = async (adapter, productKey, deviceKey) => {
|
|
|
40
40
|
},
|
|
41
41
|
native: {}
|
|
42
42
|
}));
|
|
43
|
-
await (adapter == null ? void 0 : adapter.extendObjectAsync(
|
|
44
|
-
|
|
45
|
-
{
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
));
|
|
56
|
-
await (adapter == null ? void 0 : adapter.extendObjectAsync(productKey + "." + deviceKey + ".packData", {
|
|
43
|
+
await (adapter == null ? void 0 : adapter.extendObjectAsync(`${productKey}.${deviceKey}.calculations`, {
|
|
44
|
+
type: "channel",
|
|
45
|
+
common: {
|
|
46
|
+
name: {
|
|
47
|
+
de: "Berechnungen f\xFCr Ger\xE4t " + deviceKey,
|
|
48
|
+
en: "Calculations for Device " + deviceKey
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
native: {}
|
|
52
|
+
}));
|
|
53
|
+
await (adapter == null ? void 0 : adapter.extendObjectAsync(`${productKey}.${deviceKey}.packData`, {
|
|
57
54
|
type: "channel",
|
|
58
55
|
common: {
|
|
59
56
|
name: {
|
|
@@ -63,39 +60,33 @@ const createSolarFlowStates = async (adapter, productKey, deviceKey) => {
|
|
|
63
60
|
},
|
|
64
61
|
native: {}
|
|
65
62
|
}));
|
|
63
|
+
await (adapter == null ? void 0 : adapter.extendObjectAsync(`${productKey}.${deviceKey}.lastUpdate`, {
|
|
64
|
+
type: "state",
|
|
65
|
+
common: {
|
|
66
|
+
name: { de: "Letztes Update", en: "Last Update" },
|
|
67
|
+
type: "number",
|
|
68
|
+
desc: "lastUpdate",
|
|
69
|
+
role: "value.time",
|
|
70
|
+
read: true,
|
|
71
|
+
write: false
|
|
72
|
+
},
|
|
73
|
+
native: {}
|
|
74
|
+
}));
|
|
75
|
+
await (adapter == null ? void 0 : adapter.extendObjectAsync(`${productKey}.${deviceKey}.electricLevel`, {
|
|
76
|
+
type: "state",
|
|
77
|
+
common: {
|
|
78
|
+
name: { de: "SOC Gesamtsystem", en: "SOC of the system" },
|
|
79
|
+
type: "number",
|
|
80
|
+
desc: "electricLevel",
|
|
81
|
+
role: "value.battery",
|
|
82
|
+
read: true,
|
|
83
|
+
write: false,
|
|
84
|
+
unit: "%"
|
|
85
|
+
},
|
|
86
|
+
native: {}
|
|
87
|
+
}));
|
|
66
88
|
await (adapter == null ? void 0 : adapter.extendObjectAsync(
|
|
67
|
-
productKey
|
|
68
|
-
{
|
|
69
|
-
type: "state",
|
|
70
|
-
common: {
|
|
71
|
-
name: { de: "Letztes Update", en: "Last Update" },
|
|
72
|
-
type: "number",
|
|
73
|
-
desc: "lastUpdate",
|
|
74
|
-
role: "value.time",
|
|
75
|
-
read: true,
|
|
76
|
-
write: false
|
|
77
|
-
},
|
|
78
|
-
native: {}
|
|
79
|
-
}
|
|
80
|
-
));
|
|
81
|
-
await (adapter == null ? void 0 : adapter.extendObjectAsync(
|
|
82
|
-
productKey + "." + deviceKey + ".electricLevel",
|
|
83
|
-
{
|
|
84
|
-
type: "state",
|
|
85
|
-
common: {
|
|
86
|
-
name: { de: "SOC Gesamtsystem", en: "SOC of the system" },
|
|
87
|
-
type: "number",
|
|
88
|
-
desc: "electricLevel",
|
|
89
|
-
role: "value.battery",
|
|
90
|
-
read: true,
|
|
91
|
-
write: false,
|
|
92
|
-
unit: "%"
|
|
93
|
-
},
|
|
94
|
-
native: {}
|
|
95
|
-
}
|
|
96
|
-
));
|
|
97
|
-
await (adapter == null ? void 0 : adapter.extendObjectAsync(
|
|
98
|
-
productKey + "." + deviceKey + ".outputHomePower",
|
|
89
|
+
`${productKey}.${deviceKey}.outputHomePower`,
|
|
99
90
|
{
|
|
100
91
|
type: "state",
|
|
101
92
|
common: {
|
|
@@ -110,24 +101,21 @@ const createSolarFlowStates = async (adapter, productKey, deviceKey) => {
|
|
|
110
101
|
native: {}
|
|
111
102
|
}
|
|
112
103
|
));
|
|
104
|
+
await (adapter == null ? void 0 : adapter.extendObjectAsync(`${productKey}.${deviceKey}.outputLimit`, {
|
|
105
|
+
type: "state",
|
|
106
|
+
common: {
|
|
107
|
+
name: { de: "Limit der Ausgangsleistung", en: "limit of output power" },
|
|
108
|
+
type: "number",
|
|
109
|
+
desc: "outputLimit",
|
|
110
|
+
role: "value.power",
|
|
111
|
+
read: true,
|
|
112
|
+
write: false,
|
|
113
|
+
unit: "W"
|
|
114
|
+
},
|
|
115
|
+
native: {}
|
|
116
|
+
}));
|
|
113
117
|
await (adapter == null ? void 0 : adapter.extendObjectAsync(
|
|
114
|
-
productKey
|
|
115
|
-
{
|
|
116
|
-
type: "state",
|
|
117
|
-
common: {
|
|
118
|
-
name: { de: "Limit der Ausgangsleistung", en: "limit of output power" },
|
|
119
|
-
type: "number",
|
|
120
|
-
desc: "outputLimit",
|
|
121
|
-
role: "value.power",
|
|
122
|
-
read: true,
|
|
123
|
-
write: false,
|
|
124
|
-
unit: "W"
|
|
125
|
-
},
|
|
126
|
-
native: {}
|
|
127
|
-
}
|
|
128
|
-
));
|
|
129
|
-
await (adapter == null ? void 0 : adapter.extendObjectAsync(
|
|
130
|
-
productKey + "." + deviceKey + ".outputPackPower",
|
|
118
|
+
`${productKey}.${deviceKey}.outputPackPower`,
|
|
131
119
|
{
|
|
132
120
|
type: "state",
|
|
133
121
|
common: {
|
|
@@ -143,7 +131,7 @@ const createSolarFlowStates = async (adapter, productKey, deviceKey) => {
|
|
|
143
131
|
}
|
|
144
132
|
));
|
|
145
133
|
await (adapter == null ? void 0 : adapter.extendObjectAsync(
|
|
146
|
-
productKey
|
|
134
|
+
`${productKey}.${deviceKey}.packInputPower`,
|
|
147
135
|
{
|
|
148
136
|
type: "state",
|
|
149
137
|
common: {
|
|
@@ -159,7 +147,7 @@ const createSolarFlowStates = async (adapter, productKey, deviceKey) => {
|
|
|
159
147
|
}
|
|
160
148
|
));
|
|
161
149
|
await (adapter == null ? void 0 : adapter.extendObjectAsync(
|
|
162
|
-
productKey
|
|
150
|
+
`${productKey}.${deviceKey}.solarInputPower`,
|
|
163
151
|
{
|
|
164
152
|
type: "state",
|
|
165
153
|
common: {
|
|
@@ -174,40 +162,34 @@ const createSolarFlowStates = async (adapter, productKey, deviceKey) => {
|
|
|
174
162
|
native: {}
|
|
175
163
|
}
|
|
176
164
|
));
|
|
165
|
+
await (adapter == null ? void 0 : adapter.extendObjectAsync(`${productKey}.${deviceKey}.pvPower1`, {
|
|
166
|
+
type: "state",
|
|
167
|
+
common: {
|
|
168
|
+
name: { de: "Leistung PV 1", en: "solar power channel 1" },
|
|
169
|
+
type: "number",
|
|
170
|
+
desc: "pvPower1",
|
|
171
|
+
role: "value.power",
|
|
172
|
+
read: true,
|
|
173
|
+
write: false,
|
|
174
|
+
unit: "W"
|
|
175
|
+
},
|
|
176
|
+
native: {}
|
|
177
|
+
}));
|
|
178
|
+
await (adapter == null ? void 0 : adapter.extendObjectAsync(`${productKey}.${deviceKey}.pvPower2`, {
|
|
179
|
+
type: "state",
|
|
180
|
+
common: {
|
|
181
|
+
name: { de: "Leistung PV 2", en: "solar power channel 2" },
|
|
182
|
+
type: "number",
|
|
183
|
+
desc: "pvPower2",
|
|
184
|
+
role: "value.power",
|
|
185
|
+
read: true,
|
|
186
|
+
write: false,
|
|
187
|
+
unit: "W"
|
|
188
|
+
},
|
|
189
|
+
native: {}
|
|
190
|
+
}));
|
|
177
191
|
await (adapter == null ? void 0 : adapter.extendObjectAsync(
|
|
178
|
-
productKey
|
|
179
|
-
{
|
|
180
|
-
type: "state",
|
|
181
|
-
common: {
|
|
182
|
-
name: { de: "Leistung PV 1", en: "solar power channel 1" },
|
|
183
|
-
type: "number",
|
|
184
|
-
desc: "pvPower1",
|
|
185
|
-
role: "value.power",
|
|
186
|
-
read: true,
|
|
187
|
-
write: false,
|
|
188
|
-
unit: "W"
|
|
189
|
-
},
|
|
190
|
-
native: {}
|
|
191
|
-
}
|
|
192
|
-
));
|
|
193
|
-
await (adapter == null ? void 0 : adapter.extendObjectAsync(
|
|
194
|
-
productKey + "." + deviceKey + ".pvPower2",
|
|
195
|
-
{
|
|
196
|
-
type: "state",
|
|
197
|
-
common: {
|
|
198
|
-
name: { de: "Leistung PV 2", en: "solar power channel 2" },
|
|
199
|
-
type: "number",
|
|
200
|
-
desc: "pvPower2",
|
|
201
|
-
role: "value.power",
|
|
202
|
-
read: true,
|
|
203
|
-
write: false,
|
|
204
|
-
unit: "W"
|
|
205
|
-
},
|
|
206
|
-
native: {}
|
|
207
|
-
}
|
|
208
|
-
));
|
|
209
|
-
await (adapter == null ? void 0 : adapter.extendObjectAsync(
|
|
210
|
-
productKey + "." + deviceKey + ".remainInputTime",
|
|
192
|
+
`${productKey}.${deviceKey}.remainInputTime`,
|
|
211
193
|
{
|
|
212
194
|
type: "state",
|
|
213
195
|
common: {
|
|
@@ -221,68 +203,47 @@ const createSolarFlowStates = async (adapter, productKey, deviceKey) => {
|
|
|
221
203
|
native: {}
|
|
222
204
|
}
|
|
223
205
|
));
|
|
224
|
-
await (adapter == null ? void 0 : adapter.extendObjectAsync(
|
|
225
|
-
|
|
226
|
-
{
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
de: "Erwartete Entladedauer (Minuten)",
|
|
231
|
-
en: "remaining discharge time (minutes)"
|
|
232
|
-
},
|
|
233
|
-
type: "number",
|
|
234
|
-
desc: "remainOutTime",
|
|
235
|
-
role: "value.interval",
|
|
236
|
-
read: true,
|
|
237
|
-
write: false
|
|
238
|
-
},
|
|
239
|
-
native: {}
|
|
240
|
-
}
|
|
241
|
-
));
|
|
242
|
-
await (adapter == null ? void 0 : adapter.extendObjectAsync(
|
|
243
|
-
productKey + "." + deviceKey + ".socSet",
|
|
244
|
-
{
|
|
245
|
-
type: "state",
|
|
246
|
-
common: {
|
|
247
|
-
name: { de: "Max. SOC", en: "max. SOC" },
|
|
248
|
-
type: "number",
|
|
249
|
-
desc: "socSet",
|
|
250
|
-
role: "value.battery",
|
|
251
|
-
read: true,
|
|
252
|
-
write: false,
|
|
253
|
-
unit: "%"
|
|
254
|
-
},
|
|
255
|
-
native: {}
|
|
256
|
-
}
|
|
257
|
-
));
|
|
258
|
-
await (adapter == null ? void 0 : adapter.extendObjectAsync(
|
|
259
|
-
productKey + "." + deviceKey + ".minSoc",
|
|
260
|
-
{
|
|
261
|
-
type: "state",
|
|
262
|
-
common: {
|
|
263
|
-
name: { de: "Min. SOC", en: "min. SOC" },
|
|
264
|
-
type: "number",
|
|
265
|
-
desc: "minSoc",
|
|
266
|
-
role: "value.battery",
|
|
267
|
-
read: true,
|
|
268
|
-
write: false,
|
|
269
|
-
unit: "%"
|
|
206
|
+
await (adapter == null ? void 0 : adapter.extendObjectAsync(`${productKey}.${deviceKey}.remainOutTime`, {
|
|
207
|
+
type: "state",
|
|
208
|
+
common: {
|
|
209
|
+
name: {
|
|
210
|
+
de: "Erwartete Entladedauer (Minuten)",
|
|
211
|
+
en: "remaining discharge time (minutes)"
|
|
270
212
|
},
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
213
|
+
type: "number",
|
|
214
|
+
desc: "remainOutTime",
|
|
215
|
+
role: "value.interval",
|
|
216
|
+
read: true,
|
|
217
|
+
write: false
|
|
218
|
+
},
|
|
219
|
+
native: {}
|
|
220
|
+
}));
|
|
221
|
+
await (adapter == null ? void 0 : adapter.extendObjectAsync(`${productKey}.${deviceKey}.socSet`, {
|
|
222
|
+
type: "state",
|
|
223
|
+
common: {
|
|
224
|
+
name: { de: "Max. SOC", en: "max. SOC" },
|
|
225
|
+
type: "number",
|
|
226
|
+
desc: "socSet",
|
|
227
|
+
role: "value.battery",
|
|
228
|
+
read: true,
|
|
229
|
+
write: false,
|
|
230
|
+
unit: "%"
|
|
231
|
+
},
|
|
232
|
+
native: {}
|
|
233
|
+
}));
|
|
234
|
+
await (adapter == null ? void 0 : adapter.extendObjectAsync(`${productKey}.${deviceKey}.minSoc`, {
|
|
235
|
+
type: "state",
|
|
236
|
+
common: {
|
|
237
|
+
name: { de: "Min. SOC", en: "min. SOC" },
|
|
238
|
+
type: "number",
|
|
239
|
+
desc: "minSoc",
|
|
240
|
+
role: "value.battery",
|
|
241
|
+
read: true,
|
|
242
|
+
write: false,
|
|
243
|
+
unit: "%"
|
|
244
|
+
},
|
|
245
|
+
native: {}
|
|
246
|
+
}));
|
|
286
247
|
await (0, import_createControlStates.createControlStates)(adapter, productKey, deviceKey);
|
|
287
248
|
if (adapter.config.useCalculation) {
|
|
288
249
|
await (0, import_createCalculationStates.createCalculationStates)(adapter, productKey, deviceKey);
|