iobroker.zendure-solarflow 1.9.2 → 1.9.3
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 +121 -118
- package/build/services/adapterService.js +1 -1
- package/build/services/adapterService.js.map +1 -1
- package/io-package.json +14 -14
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -47,139 +47,142 @@ If you find the adapter useful for you and want to support my work, feel free to
|
|
|
47
47
|
|
|
48
48
|
[](https://www.paypal.com/paypalme/PeterFrommert)
|
|
49
49
|
|
|
50
|
-
## Changelog
|
|
50
|
+
## Changelog
|
|
51
|
+
### 1.9.3 (2024-11-22)
|
|
51
52
|
|
|
53
|
+
- Fix for Low Voltage Block not deactivated.
|
|
54
|
+
|
|
52
55
|
### 1.9.2 (2024-11-21)
|
|
53
56
|
|
|
54
|
-
- Fix some state definitions
|
|
55
|
-
|
|
57
|
+
- Fix some state definitions
|
|
58
|
+
|
|
56
59
|
### 1.9.1 (2024-11-21)
|
|
57
60
|
|
|
58
61
|
- Improvement for 'Low Voltage Block'.
|
|
59
|
-
- Changed the state "hubState" a an option value.
|
|
60
|
-
|
|
62
|
+
- Changed the state "hubState" a an option value.
|
|
63
|
+
|
|
61
64
|
### 1.9.0 (2024-11-20)
|
|
62
65
|
|
|
63
|
-
- New option to force Solarflow device to go offline when "Low Voltage Block"-option is used.
|
|
64
|
-
|
|
66
|
+
- New option to force Solarflow device to go offline when "Low Voltage Block"-option is used.
|
|
67
|
+
|
|
65
68
|
### 1.8.8 (2024-09-20)
|
|
66
69
|
|
|
67
70
|
- Improve connection retry, expand the time with every retry attempt.
|
|
68
71
|
- Start "restart adapter job" regardless of connection.
|
|
69
|
-
- Fix Hyper setInputLimit with step
|
|
70
|
-
|
|
72
|
+
- Fix Hyper setInputLimit with step
|
|
73
|
+
|
|
71
74
|
### 1.8.7 (2024-09-09)
|
|
72
75
|
|
|
73
|
-
- Fix missing control states for AIO
|
|
74
|
-
|
|
76
|
+
- Fix missing control states for AIO
|
|
77
|
+
|
|
75
78
|
### 1.8.6 (2024-09-06)
|
|
76
79
|
|
|
77
|
-
- Change login method: Added a retry loop for connecting to Zendure Cloud, if the Cloud Service "hangs" or is not available it will retry the connection 3 times.
|
|
78
|
-
|
|
80
|
+
- Change login method: Added a retry loop for connecting to Zendure Cloud, if the Cloud Service "hangs" or is not available it will retry the connection 3 times.
|
|
81
|
+
|
|
79
82
|
### 1.8.5 (2024-08-26)
|
|
80
83
|
|
|
81
84
|
- Fix missing states for new HUB Firmware when connected to ACE
|
|
82
|
-
- Fix correct max value for AIO
|
|
83
|
-
|
|
85
|
+
- Fix correct max value for AIO
|
|
86
|
+
|
|
84
87
|
### 1.8.4 (2024-08-16)
|
|
85
88
|
|
|
86
89
|
- Add support for Smart Plug, but only Power is available at the moment - unstable as often data is not updated by MQTT
|
|
87
|
-
- Some code improvements
|
|
88
|
-
|
|
90
|
+
- Some code improvements
|
|
91
|
+
|
|
89
92
|
### 1.8.3 (2024-08-12)
|
|
90
93
|
|
|
91
94
|
- Fix SOC and energyWhMax Value (counted by type of attached batteries)
|
|
92
95
|
- Add Calculation for Grid Input (only for Ace 1500 and Hyper 2000)
|
|
93
|
-
- Fix suggestions by ioBroker repository checker
|
|
94
|
-
|
|
96
|
+
- Fix suggestions by ioBroker repository checker
|
|
97
|
+
|
|
95
98
|
### 1.7.7 (2024-08-02)
|
|
96
99
|
|
|
97
|
-
- Fix Input and Output limit for Hyper 2000
|
|
98
|
-
|
|
100
|
+
- Fix Input and Output limit for Hyper 2000
|
|
101
|
+
|
|
99
102
|
### 1.7.6 (2024-08-01)
|
|
100
103
|
|
|
101
104
|
- Fix support for 'Hyper_Test' devices
|
|
102
|
-
- Improved code for state creation
|
|
103
|
-
|
|
105
|
+
- Improved code for state creation
|
|
106
|
+
|
|
104
107
|
### 1.7.5 (2024-07-31)
|
|
105
108
|
|
|
106
109
|
- Fix controlling AC mode for Hyper 2000 (set acMode to 1: Charge by AC, 2: Output to AC)
|
|
107
110
|
- Show product name in channel name
|
|
108
111
|
- Show battery type as state in packData
|
|
109
|
-
- Show Hyper Temperature in States
|
|
110
|
-
|
|
112
|
+
- Show Hyper Temperature in States
|
|
113
|
+
|
|
111
114
|
### 1.7.4 (2024-07-31)
|
|
112
115
|
|
|
113
|
-
- Set max value and step for setInputLimit
|
|
114
|
-
|
|
116
|
+
- Set max value and step for setInputLimit
|
|
117
|
+
|
|
115
118
|
### 1.7.3 (2024-07-30)
|
|
116
119
|
|
|
117
120
|
- Fix AC input value for Hyper to max. 1200W
|
|
118
|
-
- Fix dcSwitch and acSwitch value
|
|
119
|
-
|
|
121
|
+
- Fix dcSwitch and acSwitch value
|
|
122
|
+
|
|
120
123
|
### 1.7.2 (2024-07-29)
|
|
121
124
|
|
|
122
|
-
- Fix acSwitch for ACE and Hyper
|
|
123
|
-
|
|
125
|
+
- Fix acSwitch for ACE and Hyper
|
|
126
|
+
|
|
124
127
|
### 1.7.1 (2024-07-29)
|
|
125
128
|
|
|
126
129
|
- Fix missing ACE 1500 when connected with HUB1200 / HUB2000
|
|
127
|
-
- Fix some missing states
|
|
128
|
-
|
|
130
|
+
- Fix some missing states
|
|
131
|
+
|
|
129
132
|
### 1.7.0 (2024-07-26)
|
|
130
133
|
|
|
131
134
|
- Add support for Hyper 2000 and ACE 1500. Maybe not all states and control parameter are available. Still need to do some investigation.
|
|
132
|
-
- Some minor bugfixes.
|
|
133
|
-
|
|
135
|
+
- Some minor bugfixes.
|
|
136
|
+
|
|
134
137
|
### 1.6.7 (2024-06-23)
|
|
135
138
|
|
|
136
|
-
- Fix reconnect again. Adapter will now restart every 3 hours to cleanup fully.
|
|
137
|
-
|
|
139
|
+
- Fix reconnect again. Adapter will now restart every 3 hours to cleanup fully.
|
|
140
|
+
|
|
138
141
|
### 1.6.6 (2024-06-21)
|
|
139
142
|
|
|
140
|
-
- Tweaked recurring refresh of access token.
|
|
141
|
-
|
|
143
|
+
- Tweaked recurring refresh of access token.
|
|
144
|
+
|
|
142
145
|
### 1.6.5 (2024-06-20)
|
|
143
146
|
|
|
144
|
-
- Fix reconnect issue. Adapter will now restart if connection semms to be broken.
|
|
145
|
-
|
|
147
|
+
- Fix reconnect issue. Adapter will now restart if connection semms to be broken.
|
|
148
|
+
|
|
146
149
|
### 1.6.4 (2024-06-03)
|
|
147
150
|
|
|
148
|
-
- Fix services
|
|
149
|
-
|
|
151
|
+
- Fix services
|
|
152
|
+
|
|
150
153
|
### 1.6.3 (2024-06-03)
|
|
151
154
|
|
|
152
|
-
- Fixed reconnect when connection seems to be dead.
|
|
153
|
-
|
|
155
|
+
- Fixed reconnect when connection seems to be dead.
|
|
156
|
+
|
|
154
157
|
### 1.6.2 (2024-05-21)
|
|
155
158
|
|
|
156
|
-
- Changed standby usage to 10W
|
|
157
|
-
|
|
159
|
+
- Changed standby usage to 10W
|
|
160
|
+
|
|
158
161
|
### 1.6.1 (2024-05-13)
|
|
159
162
|
|
|
160
163
|
- Fix issue that sometime data is not updated
|
|
161
|
-
- Add standby usage of HUB (20W) when solarinput is low
|
|
162
|
-
|
|
164
|
+
- Add standby usage of HUB (20W) when solarinput is low
|
|
165
|
+
|
|
163
166
|
### 1.5.3 (2024-04-19)
|
|
164
167
|
|
|
165
|
-
- Fix autoRecover datatype issue
|
|
166
|
-
|
|
168
|
+
- Fix autoRecover datatype issue
|
|
169
|
+
|
|
167
170
|
### 1.5.2 (2024-04-17)
|
|
168
171
|
|
|
169
|
-
- Minor bugfixes and improvements
|
|
170
|
-
|
|
172
|
+
- Minor bugfixes and improvements
|
|
173
|
+
|
|
171
174
|
### 1.5.0 (2024-04-12)
|
|
172
175
|
|
|
173
|
-
- Add the possibility to connect to the 'Fallback' MQTT server known as 'Developer MQTT'. This server is read-only - so no control is possible!
|
|
174
|
-
|
|
176
|
+
- Add the possibility to connect to the 'Fallback' MQTT server known as 'Developer MQTT'. This server is read-only - so no control is possible!
|
|
177
|
+
|
|
175
178
|
### 1.4.0 (2024-04-03)
|
|
176
179
|
|
|
177
180
|
- Add calculation states for solar input 1 & 2
|
|
178
181
|
- Add states for wifiState, hubState, pvBrand and inverseMaxPower
|
|
179
182
|
- Rename missleading title for input field 'Username' in settings to 'E-Mail'
|
|
180
183
|
- Fix energyWh, energyWhMax and SOC in calculations if "Low Voltage Check" is not used, it will set the calculation soc to 0 if minSoc (discharge limit) is reached
|
|
181
|
-
- Fix password input in settings
|
|
182
|
-
|
|
184
|
+
- Fix password input in settings
|
|
185
|
+
|
|
183
186
|
### 1.3.0 (2024-03-26)
|
|
184
187
|
|
|
185
188
|
- Fix calculation for outputPackEnergy and packInputEnergy
|
|
@@ -188,149 +191,149 @@ If you find the adapter useful for you and want to support my work, feel free to
|
|
|
188
191
|
- Add state and control for bypass mode and automatic reset of bypass mode next day
|
|
189
192
|
- Add states for pass (Bypass on/off), autoRecover (auto-mode for Bypass next day) and passMode (current bypass mode)
|
|
190
193
|
- Add efficiency factor for calculations (96% charging, 92%-98%\* for discharging - based on measuring from VoltAmpereLux Youtube channel - THANKS!)
|
|
191
|
-
- Changed calculations timeframe from 10secs to 30secs (performance related)
|
|
192
|
-
|
|
194
|
+
- Changed calculations timeframe from 10secs to 30secs (performance related)
|
|
195
|
+
|
|
193
196
|
### 1.2.5 (2024-03-19)
|
|
194
197
|
|
|
195
|
-
- Fix error "Read-only" state written without ack-flag
|
|
196
|
-
|
|
198
|
+
- Fix error "Read-only" state written without ack-flag
|
|
199
|
+
|
|
197
200
|
### 1.2.4 (2024-03-18)
|
|
198
201
|
|
|
199
|
-
- Use setInterval instead of cronjob for refreshing access token
|
|
200
|
-
|
|
202
|
+
- Use setInterval instead of cronjob for refreshing access token
|
|
203
|
+
|
|
201
204
|
### 1.2.3 (2024-03-15)
|
|
202
205
|
|
|
203
206
|
- Fix ACK on onStateChange
|
|
204
|
-
- Update Readme
|
|
205
|
-
|
|
207
|
+
- Update Readme
|
|
208
|
+
|
|
206
209
|
### 1.2.2 (2024-03-14)
|
|
207
210
|
|
|
208
211
|
- Fix issue that renamed devices could not be found.
|
|
209
212
|
- Add states for name, product name, serial ID and configured server.
|
|
210
213
|
- Make "energyWhMax" State writable, so you can adjust the max Value.
|
|
211
|
-
- Sent a warning if a device is configured for a server not in use.
|
|
212
|
-
|
|
214
|
+
- Sent a warning if a device is configured for a server not in use.
|
|
215
|
+
|
|
213
216
|
### 1.2.1 (2024-03-13)
|
|
214
217
|
|
|
215
218
|
- Fix calculation of soc: Set energyMaxWh to current energyWh if Zendures SOC is 100%
|
|
216
|
-
- Round SOC to max 1 digit after comma.
|
|
217
|
-
|
|
219
|
+
- Round SOC to max 1 digit after comma.
|
|
220
|
+
|
|
218
221
|
### 1.2.0 (2024-03-13)
|
|
219
222
|
|
|
220
223
|
- EU server is working now.
|
|
221
224
|
- Fix calculation errors in log when calculation is not used
|
|
222
225
|
- More Debug Output
|
|
223
226
|
- Filter SolarFlow devices, so no other devices (e.g. SmartPlugs) will be added.
|
|
224
|
-
- Clear password when settings loaded, as encrypted password is loaded into input and leads to a wrong password.
|
|
225
|
-
|
|
227
|
+
- Clear password when settings loaded, as encrypted password is loaded into input and leads to a wrong password.
|
|
228
|
+
|
|
226
229
|
### 1.1.23 (2024-03-11)
|
|
227
230
|
|
|
228
231
|
- Fix calculation of "energy in batteries"
|
|
229
|
-
- Try to implement EU server - untested -
|
|
230
|
-
|
|
232
|
+
- Try to implement EU server - untested -
|
|
233
|
+
|
|
231
234
|
### 1.1.22 (2024-03-09)
|
|
232
235
|
|
|
233
|
-
- Try to fix reset values at midnight
|
|
234
|
-
|
|
236
|
+
- Try to fix reset values at midnight
|
|
237
|
+
|
|
235
238
|
### 1.1.21 (2024-03-08)
|
|
236
239
|
|
|
237
|
-
- Fix calculation timeframe
|
|
238
|
-
|
|
240
|
+
- Fix calculation timeframe
|
|
241
|
+
|
|
239
242
|
### 1.1.17 (2024-03-08)
|
|
240
243
|
|
|
241
244
|
- Improve calculations
|
|
242
|
-
- No autocomplete on settings
|
|
243
|
-
|
|
245
|
+
- No autocomplete on settings
|
|
246
|
+
|
|
244
247
|
### 1.1.15 (2024-03-06)
|
|
245
248
|
|
|
246
249
|
- Calculations improved
|
|
247
|
-
- Stop energy input on low voltage is now an option in settings
|
|
248
|
-
|
|
250
|
+
- Stop energy input on low voltage is now an option in settings
|
|
251
|
+
|
|
249
252
|
### 1.1.14 (2024-03-04)
|
|
250
253
|
|
|
251
254
|
- Reorganize Code
|
|
252
255
|
- Calculations are now optional and have to be enabled in settings
|
|
253
256
|
- Calculation of SOC from voltage and energy go in and out of batteries
|
|
254
|
-
- Stop energy feed if voltage drops under limit
|
|
255
|
-
|
|
257
|
+
- Stop energy feed if voltage drops under limit
|
|
258
|
+
|
|
256
259
|
### 1.1.11 (2024-03-01)
|
|
257
260
|
|
|
258
261
|
- Fix Solar Input 1 and 2 from the new Zendure firmware
|
|
259
262
|
- Fix remaining charging time
|
|
260
|
-
- Fix calculations overwritten when data with 0 value comes in.
|
|
261
|
-
|
|
263
|
+
- Fix calculations overwritten when data with 0 value comes in.
|
|
264
|
+
|
|
262
265
|
### 1.1.8 (2024-02-29)
|
|
263
266
|
|
|
264
|
-
- Fix calculation error
|
|
265
|
-
|
|
267
|
+
- Fix calculation error
|
|
268
|
+
|
|
266
269
|
### 1.1.7 (2024-02-29)
|
|
267
270
|
|
|
268
271
|
- Add energy calculations for 'today'
|
|
269
|
-
- Fix minutes display bug for remaining charge and discharge time
|
|
270
|
-
|
|
272
|
+
- Fix minutes display bug for remaining charge and discharge time
|
|
273
|
+
|
|
271
274
|
### 1.1.4 (2024-02-28)
|
|
272
275
|
|
|
273
|
-
- Fix timeout issues
|
|
274
|
-
|
|
276
|
+
- Fix timeout issues
|
|
277
|
+
|
|
275
278
|
### 1.1.0 (2024-02-27)
|
|
276
279
|
|
|
277
280
|
- Switched solar input 1 und 2 to adjust the behavior like the offical app
|
|
278
281
|
- Added Calculations folder, remaining charge and discharge time is now available as formatted time
|
|
279
|
-
- Added a note in the settings that this adapter only works with the global server
|
|
280
|
-
|
|
282
|
+
- Added a note in the settings that this adapter only works with the global server
|
|
283
|
+
|
|
281
284
|
### 1.0.7 (2024-01-16)
|
|
282
285
|
|
|
283
286
|
- Add control for charge and discharge limit
|
|
284
|
-
- Update Readme Screenshot
|
|
285
|
-
|
|
287
|
+
- Update Readme Screenshot
|
|
288
|
+
|
|
286
289
|
### 1.0.6 (2024-01-16)
|
|
287
290
|
|
|
288
|
-
- Update Readme
|
|
289
|
-
|
|
291
|
+
- Update Readme
|
|
292
|
+
|
|
290
293
|
### 1.0.5 (2024-01-15)
|
|
291
294
|
|
|
292
|
-
- Added state for both Solarflow PV inputs
|
|
293
|
-
|
|
295
|
+
- Added state for both Solarflow PV inputs
|
|
296
|
+
|
|
294
297
|
### 1.0.4 (2023-12-16)
|
|
295
298
|
|
|
296
|
-
- Added Timeout for axios
|
|
297
|
-
|
|
299
|
+
- Added Timeout for axios
|
|
300
|
+
|
|
298
301
|
### 1.0.3 (2023-12-12)
|
|
299
302
|
|
|
300
|
-
- Password is now encrypted. NOTE: You have to re-enter the password after adapter update!
|
|
301
|
-
|
|
303
|
+
- Password is now encrypted. NOTE: You have to re-enter the password after adapter update!
|
|
304
|
+
|
|
302
305
|
### 1.0.2 (2023-12-12)
|
|
303
306
|
|
|
304
307
|
- Adapter improvements suggested by iobroker team
|
|
305
|
-
- Fixed battery pack temperature (data is in kelvin, so now converting to celcius)
|
|
306
|
-
|
|
308
|
+
- Fixed battery pack temperature (data is in kelvin, so now converting to celcius)
|
|
309
|
+
|
|
307
310
|
### 1.0.1 (2023-11-03)
|
|
308
311
|
|
|
309
312
|
- Fix translationscd so
|
|
310
313
|
- Use 'extendObject' instead of 'setObjectNotExistsAsync'
|
|
311
|
-
- First official release version
|
|
312
|
-
|
|
314
|
+
- First official release version
|
|
315
|
+
|
|
313
316
|
### 0.1.0-alpha.2 (2023-10-27)
|
|
314
317
|
|
|
315
|
-
- Don't stop the adapter when no login information is provided!
|
|
316
|
-
|
|
318
|
+
- Don't stop the adapter when no login information is provided!
|
|
319
|
+
|
|
317
320
|
### 0.1.0-alpha.1 (2023-10-27)
|
|
318
321
|
|
|
319
|
-
- Fix Typescript typos
|
|
320
|
-
|
|
322
|
+
- Fix Typescript typos
|
|
323
|
+
|
|
321
324
|
### 0.1.0-alpha.0 (2023-10-26)
|
|
322
325
|
|
|
323
326
|
- Get battery information
|
|
324
|
-
- Reset states if no new data comes in (e.g. when Hub goes offline). Currently the last value still persist when Hub goes offline, so you may have 'pseudo' data in your states.
|
|
325
|
-
|
|
327
|
+
- Reset states if no new data comes in (e.g. when Hub goes offline). Currently the last value still persist when Hub goes offline, so you may have 'pseudo' data in your states.
|
|
328
|
+
|
|
326
329
|
### 0.0.2 (2023-10-25)
|
|
327
330
|
|
|
328
|
-
- Initital Release, retrieving Hub data, telemetry and setting the output limit works!
|
|
329
|
-
|
|
331
|
+
- Initital Release, retrieving Hub data, telemetry and setting the output limit works!
|
|
332
|
+
|
|
330
333
|
### 0.0.1 (2023-10-24)
|
|
331
334
|
|
|
332
|
-
- First test
|
|
333
|
-
|
|
335
|
+
- First test
|
|
336
|
+
|
|
334
337
|
## License
|
|
335
338
|
|
|
336
339
|
MIT License
|
|
@@ -353,4 +356,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
353
356
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
354
357
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
355
358
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
356
|
-
SOFTWARE.
|
|
359
|
+
SOFTWARE.
|
|
@@ -73,7 +73,7 @@ const checkVoltage = async (adapter, productKey, deviceKey, voltage) => {
|
|
|
73
73
|
} else if (voltage >= 47.5) {
|
|
74
74
|
if (adapter.config.useLowVoltageBlock) {
|
|
75
75
|
const lowVoltageBlock = await adapter.getStateAsync(
|
|
76
|
-
`${productKey}.${deviceKey}.lowVoltageBlock`
|
|
76
|
+
`${productKey}.${deviceKey}.control.lowVoltageBlock`
|
|
77
77
|
);
|
|
78
78
|
if (lowVoltageBlock && lowVoltageBlock.val == true) {
|
|
79
79
|
await (adapter == null ? void 0 : adapter.setState(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/services/adapterService.ts"],
|
|
4
|
-
"sourcesContent": ["import { ZendureSolarflow } from \"../main\";\r\nimport { setSocToZero } from \"./calculationService\";\r\nimport { setDischargeLimit, setOutputLimit } from \"./mqttService\";\r\n\r\n/* eslint-disable @typescript-eslint/indent */\r\n\r\nexport const updateSolarFlowState = async (\r\n adapter: ZendureSolarflow,\r\n productKey: string,\r\n deviceKey: string,\r\n state: string,\r\n val: number | string | boolean\r\n): Promise<void> => {\r\n await adapter?.setState(`${productKey}.${deviceKey}.${state}`, val, true);\r\n};\r\n\r\nexport const updateSolarFlowControlState = async (\r\n adapter: ZendureSolarflow,\r\n productKey: string,\r\n deviceKey: string,\r\n state: string,\r\n val: number | string | boolean\r\n): Promise<void> => {\r\n await adapter?.setState(\r\n `${productKey}.${deviceKey}.control.${state}`,\r\n val,\r\n true\r\n );\r\n};\r\n\r\nexport const checkVoltage = async (\r\n adapter: ZendureSolarflow,\r\n productKey: string,\r\n deviceKey: string,\r\n voltage: number\r\n): Promise<void> => {\r\n if (voltage < 46.1) {\r\n if (adapter.config.useCalculation) {\r\n setSocToZero(adapter, productKey, deviceKey);\r\n }\r\n\r\n if (adapter.config.useLowVoltageBlock) {\r\n // Activate Low Voltage Block\r\n await adapter?.setState(\r\n `${productKey}.${deviceKey}.control.lowVoltageBlock`,\r\n true,\r\n true\r\n );\r\n\r\n // Low Voltage Block activated, stop power input immediately\r\n setOutputLimit(adapter, productKey, deviceKey, 0);\r\n\r\n if (adapter.config.forceShutdownOnLowVoltage) {\r\n const currentSoc = await adapter.getStateAsync(\r\n `${productKey}.${deviceKey}.electricLevel`\r\n );\r\n\r\n if (currentSoc && currentSoc.val) {\r\n setDischargeLimit(\r\n adapter,\r\n productKey,\r\n deviceKey,\r\n Number(currentSoc.val)\r\n );\r\n }\r\n\r\n // Check if device setting is correct\r\n const hubState = await adapter.getStateAsync(\r\n `${productKey}.${deviceKey}.hubState`\r\n );\r\n\r\n if (!hubState || Number(hubState.val) != 1) {\r\n adapter.log.warn(\r\n `[checkVoltage] hubState is not set to 'Stop output and shut down', device will NOT go offline!`\r\n );\r\n }\r\n }\r\n }\r\n } else if (voltage >= 47.5) {\r\n if (adapter.config.useLowVoltageBlock) {\r\n // Deactivate Low Voltage Block\r\n const lowVoltageBlock = await adapter.getStateAsync(\r\n `${productKey}.${deviceKey}.lowVoltageBlock`\r\n );\r\n\r\n if (lowVoltageBlock && lowVoltageBlock.val == true) {\r\n await adapter?.setState(\r\n `${productKey}.${deviceKey}.control.lowVoltageBlock`,\r\n false,\r\n true\r\n );\r\n\r\n setDischargeLimit(\r\n adapter,\r\n productKey,\r\n deviceKey,\r\n adapter.config.dischargeLimit ? adapter.config.dischargeLimit : 10\r\n );\r\n }\r\n }\r\n }\r\n};\r\n\r\nexport const checkDevicesServer = async (\r\n adapter: ZendureSolarflow\r\n): Promise<void> => {\r\n const channels = await adapter.getChannelsAsync();\r\n\r\n channels.forEach(async (channel) => {\r\n if (channel._id) {\r\n const splitted = channel._id.split(\".\");\r\n if (splitted.length == 4) {\r\n const productKey = splitted[2];\r\n const deviceKey = splitted[3];\r\n\r\n const currentServerState = await adapter.getStateAsync(\r\n `${productKey}.${deviceKey}.registeredServer`\r\n );\r\n\r\n if (\r\n currentServerState &&\r\n currentServerState.val &&\r\n currentServerState.val != adapter.config.server\r\n ) {\r\n adapter.log.warn(\r\n `Device with ProductKey '${productKey}' and DeviceKey '${deviceKey}' was configured on server '${currentServerState.val}', but adapter is configured to use server '${adapter.config.server}'! No data will be available!`\r\n );\r\n }\r\n }\r\n }\r\n });\r\n};\r\n"],
|
|
4
|
+
"sourcesContent": ["import { ZendureSolarflow } from \"../main\";\r\nimport { setSocToZero } from \"./calculationService\";\r\nimport { setDischargeLimit, setOutputLimit } from \"./mqttService\";\r\n\r\n/* eslint-disable @typescript-eslint/indent */\r\n\r\nexport const updateSolarFlowState = async (\r\n adapter: ZendureSolarflow,\r\n productKey: string,\r\n deviceKey: string,\r\n state: string,\r\n val: number | string | boolean\r\n): Promise<void> => {\r\n await adapter?.setState(`${productKey}.${deviceKey}.${state}`, val, true);\r\n};\r\n\r\nexport const updateSolarFlowControlState = async (\r\n adapter: ZendureSolarflow,\r\n productKey: string,\r\n deviceKey: string,\r\n state: string,\r\n val: number | string | boolean\r\n): Promise<void> => {\r\n await adapter?.setState(\r\n `${productKey}.${deviceKey}.control.${state}`,\r\n val,\r\n true\r\n );\r\n};\r\n\r\nexport const checkVoltage = async (\r\n adapter: ZendureSolarflow,\r\n productKey: string,\r\n deviceKey: string,\r\n voltage: number\r\n): Promise<void> => {\r\n if (voltage < 46.1) {\r\n if (adapter.config.useCalculation) {\r\n setSocToZero(adapter, productKey, deviceKey);\r\n }\r\n\r\n if (adapter.config.useLowVoltageBlock) {\r\n // Activate Low Voltage Block\r\n await adapter?.setState(\r\n `${productKey}.${deviceKey}.control.lowVoltageBlock`,\r\n true,\r\n true\r\n );\r\n\r\n // Low Voltage Block activated, stop power input immediately\r\n setOutputLimit(adapter, productKey, deviceKey, 0);\r\n\r\n if (adapter.config.forceShutdownOnLowVoltage) {\r\n const currentSoc = await adapter.getStateAsync(\r\n `${productKey}.${deviceKey}.electricLevel`\r\n );\r\n\r\n if (currentSoc && currentSoc.val) {\r\n setDischargeLimit(\r\n adapter,\r\n productKey,\r\n deviceKey,\r\n Number(currentSoc.val)\r\n );\r\n }\r\n\r\n // Check if device setting is correct\r\n const hubState = await adapter.getStateAsync(\r\n `${productKey}.${deviceKey}.hubState`\r\n );\r\n\r\n if (!hubState || Number(hubState.val) != 1) {\r\n adapter.log.warn(\r\n `[checkVoltage] hubState is not set to 'Stop output and shut down', device will NOT go offline!`\r\n );\r\n }\r\n }\r\n }\r\n } else if (voltage >= 47.5) {\r\n if (adapter.config.useLowVoltageBlock) {\r\n // Deactivate Low Voltage Block\r\n const lowVoltageBlock = await adapter.getStateAsync(\r\n `${productKey}.${deviceKey}.control.lowVoltageBlock`\r\n );\r\n\r\n if (lowVoltageBlock && lowVoltageBlock.val == true) {\r\n await adapter?.setState(\r\n `${productKey}.${deviceKey}.control.lowVoltageBlock`,\r\n false,\r\n true\r\n );\r\n\r\n setDischargeLimit(\r\n adapter,\r\n productKey,\r\n deviceKey,\r\n adapter.config.dischargeLimit ? adapter.config.dischargeLimit : 10\r\n );\r\n }\r\n }\r\n }\r\n};\r\n\r\nexport const checkDevicesServer = async (\r\n adapter: ZendureSolarflow\r\n): Promise<void> => {\r\n const channels = await adapter.getChannelsAsync();\r\n\r\n channels.forEach(async (channel) => {\r\n if (channel._id) {\r\n const splitted = channel._id.split(\".\");\r\n if (splitted.length == 4) {\r\n const productKey = splitted[2];\r\n const deviceKey = splitted[3];\r\n\r\n const currentServerState = await adapter.getStateAsync(\r\n `${productKey}.${deviceKey}.registeredServer`\r\n );\r\n\r\n if (\r\n currentServerState &&\r\n currentServerState.val &&\r\n currentServerState.val != adapter.config.server\r\n ) {\r\n adapter.log.warn(\r\n `Device with ProductKey '${productKey}' and DeviceKey '${deviceKey}' was configured on server '${currentServerState.val}', but adapter is configured to use server '${adapter.config.server}'! No data will be available!`\r\n );\r\n }\r\n }\r\n }\r\n });\r\n};\r\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,gCAA6B;AAC7B,yBAAkD;AAI3C,MAAM,uBAAuB,OAClC,SACA,YACA,WACA,OACA,QACkB;AAClB,SAAM,mCAAS,SAAS,GAAG,UAAU,IAAI,SAAS,IAAI,KAAK,IAAI,KAAK;AACtE;AAEO,MAAM,8BAA8B,OACzC,SACA,YACA,WACA,OACA,QACkB;AAClB,SAAM,mCAAS;AAAA,IACb,GAAG,UAAU,IAAI,SAAS,YAAY,KAAK;AAAA,IAC3C;AAAA,IACA;AAAA;AAEJ;AAEO,MAAM,eAAe,OAC1B,SACA,YACA,WACA,YACkB;AAClB,MAAI,UAAU,MAAM;AAClB,QAAI,QAAQ,OAAO,gBAAgB;AACjC,kDAAa,SAAS,YAAY,SAAS;AAAA,IAC7C;AAEA,QAAI,QAAQ,OAAO,oBAAoB;AAErC,aAAM,mCAAS;AAAA,QACb,GAAG,UAAU,IAAI,SAAS;AAAA,QAC1B;AAAA,QACA;AAAA;AAIF,6CAAe,SAAS,YAAY,WAAW,CAAC;AAEhD,UAAI,QAAQ,OAAO,2BAA2B;AAC5C,cAAM,aAAa,MAAM,QAAQ;AAAA,UAC/B,GAAG,UAAU,IAAI,SAAS;AAAA,QAC5B;AAEA,YAAI,cAAc,WAAW,KAAK;AAChC;AAAA,YACE;AAAA,YACA;AAAA,YACA;AAAA,YACA,OAAO,WAAW,GAAG;AAAA,UACvB;AAAA,QACF;AAGA,cAAM,WAAW,MAAM,QAAQ;AAAA,UAC7B,GAAG,UAAU,IAAI,SAAS;AAAA,QAC5B;AAEA,YAAI,CAAC,YAAY,OAAO,SAAS,GAAG,KAAK,GAAG;AAC1C,kBAAQ,IAAI;AAAA,YACV;AAAA,UACF;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF,WAAW,WAAW,MAAM;AAC1B,QAAI,QAAQ,OAAO,oBAAoB;AAErC,YAAM,kBAAkB,MAAM,QAAQ;AAAA,QACpC,GAAG,UAAU,IAAI,SAAS;AAAA,MAC5B;AAEA,UAAI,mBAAmB,gBAAgB,OAAO,MAAM;AAClD,eAAM,mCAAS;AAAA,UACb,GAAG,UAAU,IAAI,SAAS;AAAA,UAC1B;AAAA,UACA;AAAA;AAGF;AAAA,UACE;AAAA,UACA;AAAA,UACA;AAAA,UACA,QAAQ,OAAO,iBAAiB,QAAQ,OAAO,iBAAiB;AAAA,QAClE;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;AAEO,MAAM,qBAAqB,OAChC,YACkB;AAClB,QAAM,WAAW,MAAM,QAAQ,iBAAiB;AAEhD,WAAS,QAAQ,OAAO,YAAY;AAClC,QAAI,QAAQ,KAAK;AACf,YAAM,WAAW,QAAQ,IAAI,MAAM,GAAG;AACtC,UAAI,SAAS,UAAU,GAAG;AACxB,cAAM,aAAa,SAAS,CAAC;AAC7B,cAAM,YAAY,SAAS,CAAC;AAE5B,cAAM,qBAAqB,MAAM,QAAQ;AAAA,UACvC,GAAG,UAAU,IAAI,SAAS;AAAA,QAC5B;AAEA,YACE,sBACA,mBAAmB,OACnB,mBAAmB,OAAO,QAAQ,OAAO,QACzC;AACA,kBAAQ,IAAI;AAAA,YACV,2BAA2B,UAAU,oBAAoB,SAAS,+BAA+B,mBAAmB,GAAG,+CAA+C,QAAQ,OAAO,MAAM;AAAA,UAC7L;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF,CAAC;AACH;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/io-package.json
CHANGED
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "zendure-solarflow",
|
|
4
|
-
"version": "1.9.
|
|
4
|
+
"version": "1.9.3",
|
|
5
5
|
"news": {
|
|
6
|
+
"1.9.3": {
|
|
7
|
+
"en": "Fix for Low Voltage Block not deactivated.",
|
|
8
|
+
"de": "Fix für Niederspannung Block nicht deaktiviert.",
|
|
9
|
+
"ru": "Fix для низкого напряжения Блок не отключен.",
|
|
10
|
+
"pt": "Fix para baixa tensão Bloquear não desativado.",
|
|
11
|
+
"nl": "Fix voor lage spanning Blok niet gedeactiveerd.",
|
|
12
|
+
"fr": "Correction pour basse tension Bloc non désactivé.",
|
|
13
|
+
"it": "Fissaggio per bassa tensione Blocco non disattivato.",
|
|
14
|
+
"es": "Fijación para baja tensión Bloque no desactivado.",
|
|
15
|
+
"pl": "Napraw dla niskiego napięcia Blok nie wyłączony.",
|
|
16
|
+
"uk": "Фіксація для низького напруги Блок не деактивований.",
|
|
17
|
+
"zh-cn": "低电压修复 屏蔽未关闭 ."
|
|
18
|
+
},
|
|
6
19
|
"1.9.2": {
|
|
7
20
|
"en": "Fix state some definitions",
|
|
8
21
|
"de": "Einige Definitionen festlegen",
|
|
@@ -80,19 +93,6 @@
|
|
|
80
93
|
"pl": "Zmień metodę logowania: Dodano pętlę ponowną do podłączenia do Zharb Cloud, jeśli Cloud Service \"zawiśnie\" lub nie jest dostępna, ponownie wypróbuje połączenie 3 razy.",
|
|
81
94
|
"uk": "Спосіб зміни логіки: Додана птиця петля для підключення до Zendure Cloud, якщо Хмарна служба \"хвишки\" або не доступна вона буде переробляти з'єднання 3 рази.",
|
|
82
95
|
"zh-cn": "更改登录方法 : 添加了连接到 Zendure 云的重试循环, 如果云服务“ hangs” 或无法使用, 它将重试连接三次 ."
|
|
83
|
-
},
|
|
84
|
-
"1.8.5": {
|
|
85
|
-
"en": "Fix missing states for new HUB Firmware when connected to ACE\nFix corrent max value for AIO",
|
|
86
|
-
"de": "Fix fehlende Zustände für neue HUB Firmware, wenn mit ACE verbunden\nKorrent max Wert für AIO festsetzen",
|
|
87
|
-
"ru": "Исправление недостающих состояний для нового HUB Firmware при подключении к ACE\nМакс. значение для AIO",
|
|
88
|
-
"pt": "Corrigir estados ausentes para novo HUB Firmware quando conectado à ACE\nCorrigir o valor máximo correspondente para AIO",
|
|
89
|
-
"nl": "Fix ontbrekende toestanden voor nieuwe HUB Firmware wanneer aangesloten op ACE\nFix corresponderende maximale waarde voor AIO",
|
|
90
|
-
"fr": "Correction des états manquants pour le nouveau micrologiciel HUB lorsqu'il est connecté à ACE\nFixe la valeur maximale corrente pour AIO",
|
|
91
|
-
"it": "Fissare gli stati mancanti per il nuovo firmware HUB quando collegato ad ACE\nCorrente di fissaggio del valore massimo per AIO",
|
|
92
|
-
"es": "Fijar estados perdidos para el nuevo HUB Firmware cuando conectado a ACE\nValor máximo corregido para AIO",
|
|
93
|
-
"pl": "Naprawianie brakujących stanów dla nowego oprogramowania HUB po podłączeniu do ACE\nPopraw maksymalną wartość corrent dla AIO",
|
|
94
|
-
"uk": "Виправлення відсутніх штатів для прошивки HUB при підключенні до ACE\nФіксувати коструктивне значення для AIO",
|
|
95
|
-
"zh-cn": "连接到 ACE 时将新 HUB 固件状态修复为缺失状态\n修正 AIO 的最大同位素值"
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
"titleLang": {
|