foxesscloud 2.6.8__tar.gz → 2.7.0__tar.gz
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.
- {foxesscloud-2.6.8 → foxesscloud-2.7.0}/PKG-INFO +30 -7
- foxesscloud-2.6.8/src/foxesscloud.egg-info/PKG-INFO → foxesscloud-2.7.0/README.md +29 -20
- {foxesscloud-2.6.8 → foxesscloud-2.7.0}/pyproject.toml +1 -1
- {foxesscloud-2.6.8 → foxesscloud-2.7.0}/src/foxesscloud/foxesscloud.py +195 -134
- {foxesscloud-2.6.8 → foxesscloud-2.7.0}/src/foxesscloud/openapi.py +95 -69
- foxesscloud-2.6.8/README.md → foxesscloud-2.7.0/src/foxesscloud.egg-info/PKG-INFO +43 -6
- {foxesscloud-2.6.8 → foxesscloud-2.7.0}/LICENCE +0 -0
- {foxesscloud-2.6.8 → foxesscloud-2.7.0}/setup.cfg +0 -0
- {foxesscloud-2.6.8 → foxesscloud-2.7.0}/src/foxesscloud.egg-info/SOURCES.txt +0 -0
- {foxesscloud-2.6.8 → foxesscloud-2.7.0}/src/foxesscloud.egg-info/dependency_links.txt +0 -0
- {foxesscloud-2.6.8 → foxesscloud-2.7.0}/src/foxesscloud.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: foxesscloud
|
3
|
-
Version: 2.
|
3
|
+
Version: 2.7.0
|
4
4
|
Summary: library for accessing Fox ESS cloud data using Open API
|
5
5
|
Author-email: Tony Matthews <tony@quasair.co.uk>
|
6
6
|
Project-URL: Homepage, https://github.com/TonyM1958/FoxESS-Cloud
|
@@ -104,8 +104,8 @@ Once an inverter is selected, you can make other calls to get information:
|
|
104
104
|
|
105
105
|
```
|
106
106
|
f.get_generation()
|
107
|
-
f.get_battery()
|
108
|
-
f.get_batteries()
|
107
|
+
f.get_battery(info, rated, count)
|
108
|
+
f.get_batteries(info, rated, count)
|
109
109
|
f.get_settings()
|
110
110
|
f.get_charge()
|
111
111
|
f.get_min()
|
@@ -119,7 +119,12 @@ Each of these calls will return a dictionary or list containing the relevant inf
|
|
119
119
|
get_generation() will return the latest generation information for the device. The results are also stored in f.device as 'generationToday', 'generationMonth' and 'generationTotal'.
|
120
120
|
|
121
121
|
get_battery() / get_batteries() returns the current battery status, including 'soc', 'volt', 'current', 'power', 'temperature' and 'residual'. The result also updates f.battery / f.batteries.
|
122
|
-
get_batteries() returns multiple batteries (if available) as a list. get_battery() returns the first battery.
|
122
|
+
get_batteries() returns multiple batteries (if available) as a list. get_battery() returns the first battery. Parameters:
|
123
|
+
+ 'info': get battery serial number info, if available. Default 0 (not available via Open API)
|
124
|
+
+ 'rated': optional rated capacity for the battery in Wh to work out SoH. If not provided, it will try to work this out.
|
125
|
+
+ 'count': optional battery count. If not provided, it will try to work this out.
|
126
|
+
|
127
|
+
Additional battery attributes provided include:
|
123
128
|
+ 'capacity': the estimated battery capacity, derrived from 'residual' and 'soc'
|
124
129
|
+ 'charge_rate': the estimated BMS charge rate available, based on the current 'temperature' of the BMS
|
125
130
|
+ 'charge_loss': the ratio of the kWh added to the battery for each kWh applied during charging
|
@@ -145,7 +150,7 @@ f.set_charge(ch1, st1, en1, ch2, st2, en2, enable)
|
|
145
150
|
f.set_period(start, end, mode, min_soc, max_soc, fdsoc, fdpwr, price, segment)
|
146
151
|
f.charge_periods(st0, en0, st1, en1, st2, en2, min_soc, target_soc, start_soc)
|
147
152
|
f.set_schedule(periods, enable)
|
148
|
-
f.set_named_settings(name, value)
|
153
|
+
f.set_named_settings(name, value, force)
|
149
154
|
```
|
150
155
|
|
151
156
|
set_min() applies new SoC settings to the inverter. The parameters update battery_settings:
|
@@ -188,7 +193,9 @@ set_schedule() configures a list of scheduled work mode / soc changes with enabl
|
|
188
193
|
|
189
194
|
set_named_settings() sets the 'name' setting to 'value'.
|
190
195
|
+ 'name' may also be a list of (name, value) pairs.
|
191
|
-
+
|
196
|
+
+ 'force': setting to 1 will disable Mode Scheduler, if enabled. Default is 0.
|
197
|
+
+ A return value of 1 is success. 0 means setting failed. None is another error e.g. device not found, invalid name or value.
|
198
|
+
+ the only 'name' currently supported is 'ExportLimit'
|
192
199
|
|
193
200
|
|
194
201
|
## Real Time Data
|
@@ -334,7 +341,7 @@ The previous section provides functions that can be used to access and control y
|
|
334
341
|
Uses forecast PV yield for tomorrow to work out if charging from grid is needed tonight to deliver the expected consumption for tomorrow. If charging is needed, the charge times are configured. If charging is not needed, the charge times are cleared. The results are sent to the inverter.
|
335
342
|
|
336
343
|
```
|
337
|
-
f.charge_needed(forecast, force_charge, forecast_selection, forecast_times, update_setings, show_data, show_plot)
|
344
|
+
f.charge_needed(forecast, force_charge, forecast_selection, forecast_times, update_setings, show_data, show_plot, timed_mode)
|
338
345
|
```
|
339
346
|
|
340
347
|
All the parameters are optional:
|
@@ -345,6 +352,7 @@ All the parameters are optional:
|
|
345
352
|
+ update_settings: 0 no changes, 1 update charge settings. The default is 0
|
346
353
|
+ show_data: 1 show battery SoC data, 2 show battery Residual data, 3 show timed data. The default is 1.
|
347
354
|
+ show_plot: 1 plot battery SoC data. 2 plot battery Residual, Generation and Consumption. 3 plot 2 + Charge and Discharge The default is 3
|
355
|
+
+ timed_mode: 0 use charge times, 1 use charge times and follow strategy, 2 use Mode Scheduler
|
348
356
|
|
349
357
|
### Modelling
|
350
358
|
|
@@ -387,6 +395,8 @@ export_limit: None # maximum export power in kW. None uses the inver
|
|
387
395
|
dc_ac_loss: 0.970 # loss converting battery DC power to AC grid power
|
388
396
|
pv_loss: 0.950 # loss converting PV power to DC battery charge power
|
389
397
|
ac_dc_loss: 0.960 # loss converting AC grid power to DC battery charge power
|
398
|
+
charge_loss: None # loss converting charge energy to stored energy
|
399
|
+
discharge_loss: None # loss converting stored energy to discharge energy
|
390
400
|
inverter_power: None # inverter power consumption in W (dynamically set)
|
391
401
|
bms_power: 50 # BMS power consumption in W
|
392
402
|
force_charge_power: 5.00 # power used when Force Charge is scheduled
|
@@ -797,6 +807,19 @@ This setting can be:
|
|
797
807
|
|
798
808
|
# Version Info
|
799
809
|
|
810
|
+
2.7.0<br>
|
811
|
+
Allow charge_loss / discharge_loss to be configured for charge_needed().
|
812
|
+
Change 'Force Charge' to 'Battery Hold' in charge times to avoid confusion with Force Charge work mode.
|
813
|
+
Correct problem with missing periods of actual data in forecast.compare()
|
814
|
+
|
815
|
+
2.6.9<br>
|
816
|
+
Add get and set_named_settings() (for WorkMode and ExportLimit).
|
817
|
+
If a list of named settings is provided, the return value is a list indicating which settings succeeded (1) or failed (0).
|
818
|
+
Updates to get_battery() / get_batteries() to add optional rated and count parameters.
|
819
|
+
Updates to charge_needed() to end prediction at start of next charge period.
|
820
|
+
Correct charge time for Octopus Go tariff.
|
821
|
+
Update charge_needed() to show contingency achieved rather than requested.
|
822
|
+
|
800
823
|
2.6.8<br>
|
801
824
|
Add residual_handling=3 for Mira BMS with firmware 1.014 or later that returns residual capacity per battery.
|
802
825
|
Calculate 'ratedCapacity' in get_battery() and 'soh' for HV2600 and Mira.
|
@@ -1,17 +1,3 @@
|
|
1
|
-
Metadata-Version: 2.1
|
2
|
-
Name: foxesscloud
|
3
|
-
Version: 2.6.8
|
4
|
-
Summary: library for accessing Fox ESS cloud data using Open API
|
5
|
-
Author-email: Tony Matthews <tony@quasair.co.uk>
|
6
|
-
Project-URL: Homepage, https://github.com/TonyM1958/FoxESS-Cloud
|
7
|
-
Project-URL: Bug Tracker, https://github.com/TonyM1958/FoxESS-Cloud/issues
|
8
|
-
Classifier: Programming Language :: Python :: 3
|
9
|
-
Classifier: License :: OSI Approved :: MIT License
|
10
|
-
Classifier: Operating System :: OS Independent
|
11
|
-
Requires-Python: >=3.7
|
12
|
-
Description-Content-Type: text/markdown
|
13
|
-
License-File: LICENCE
|
14
|
-
|
15
1
|
# FoxESS-Cloud
|
16
2
|
|
17
3
|
<a href="https://www.buymeacoffee.com/tonym1958" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" height="41" width="174" align="right"></a>
|
@@ -104,8 +90,8 @@ Once an inverter is selected, you can make other calls to get information:
|
|
104
90
|
|
105
91
|
```
|
106
92
|
f.get_generation()
|
107
|
-
f.get_battery()
|
108
|
-
f.get_batteries()
|
93
|
+
f.get_battery(info, rated, count)
|
94
|
+
f.get_batteries(info, rated, count)
|
109
95
|
f.get_settings()
|
110
96
|
f.get_charge()
|
111
97
|
f.get_min()
|
@@ -119,7 +105,12 @@ Each of these calls will return a dictionary or list containing the relevant inf
|
|
119
105
|
get_generation() will return the latest generation information for the device. The results are also stored in f.device as 'generationToday', 'generationMonth' and 'generationTotal'.
|
120
106
|
|
121
107
|
get_battery() / get_batteries() returns the current battery status, including 'soc', 'volt', 'current', 'power', 'temperature' and 'residual'. The result also updates f.battery / f.batteries.
|
122
|
-
get_batteries() returns multiple batteries (if available) as a list. get_battery() returns the first battery.
|
108
|
+
get_batteries() returns multiple batteries (if available) as a list. get_battery() returns the first battery. Parameters:
|
109
|
+
+ 'info': get battery serial number info, if available. Default 0 (not available via Open API)
|
110
|
+
+ 'rated': optional rated capacity for the battery in Wh to work out SoH. If not provided, it will try to work this out.
|
111
|
+
+ 'count': optional battery count. If not provided, it will try to work this out.
|
112
|
+
|
113
|
+
Additional battery attributes provided include:
|
123
114
|
+ 'capacity': the estimated battery capacity, derrived from 'residual' and 'soc'
|
124
115
|
+ 'charge_rate': the estimated BMS charge rate available, based on the current 'temperature' of the BMS
|
125
116
|
+ 'charge_loss': the ratio of the kWh added to the battery for each kWh applied during charging
|
@@ -145,7 +136,7 @@ f.set_charge(ch1, st1, en1, ch2, st2, en2, enable)
|
|
145
136
|
f.set_period(start, end, mode, min_soc, max_soc, fdsoc, fdpwr, price, segment)
|
146
137
|
f.charge_periods(st0, en0, st1, en1, st2, en2, min_soc, target_soc, start_soc)
|
147
138
|
f.set_schedule(periods, enable)
|
148
|
-
f.set_named_settings(name, value)
|
139
|
+
f.set_named_settings(name, value, force)
|
149
140
|
```
|
150
141
|
|
151
142
|
set_min() applies new SoC settings to the inverter. The parameters update battery_settings:
|
@@ -188,7 +179,9 @@ set_schedule() configures a list of scheduled work mode / soc changes with enabl
|
|
188
179
|
|
189
180
|
set_named_settings() sets the 'name' setting to 'value'.
|
190
181
|
+ 'name' may also be a list of (name, value) pairs.
|
191
|
-
+
|
182
|
+
+ 'force': setting to 1 will disable Mode Scheduler, if enabled. Default is 0.
|
183
|
+
+ A return value of 1 is success. 0 means setting failed. None is another error e.g. device not found, invalid name or value.
|
184
|
+
+ the only 'name' currently supported is 'ExportLimit'
|
192
185
|
|
193
186
|
|
194
187
|
## Real Time Data
|
@@ -334,7 +327,7 @@ The previous section provides functions that can be used to access and control y
|
|
334
327
|
Uses forecast PV yield for tomorrow to work out if charging from grid is needed tonight to deliver the expected consumption for tomorrow. If charging is needed, the charge times are configured. If charging is not needed, the charge times are cleared. The results are sent to the inverter.
|
335
328
|
|
336
329
|
```
|
337
|
-
f.charge_needed(forecast, force_charge, forecast_selection, forecast_times, update_setings, show_data, show_plot)
|
330
|
+
f.charge_needed(forecast, force_charge, forecast_selection, forecast_times, update_setings, show_data, show_plot, timed_mode)
|
338
331
|
```
|
339
332
|
|
340
333
|
All the parameters are optional:
|
@@ -345,6 +338,7 @@ All the parameters are optional:
|
|
345
338
|
+ update_settings: 0 no changes, 1 update charge settings. The default is 0
|
346
339
|
+ show_data: 1 show battery SoC data, 2 show battery Residual data, 3 show timed data. The default is 1.
|
347
340
|
+ show_plot: 1 plot battery SoC data. 2 plot battery Residual, Generation and Consumption. 3 plot 2 + Charge and Discharge The default is 3
|
341
|
+
+ timed_mode: 0 use charge times, 1 use charge times and follow strategy, 2 use Mode Scheduler
|
348
342
|
|
349
343
|
### Modelling
|
350
344
|
|
@@ -387,6 +381,8 @@ export_limit: None # maximum export power in kW. None uses the inver
|
|
387
381
|
dc_ac_loss: 0.970 # loss converting battery DC power to AC grid power
|
388
382
|
pv_loss: 0.950 # loss converting PV power to DC battery charge power
|
389
383
|
ac_dc_loss: 0.960 # loss converting AC grid power to DC battery charge power
|
384
|
+
charge_loss: None # loss converting charge energy to stored energy
|
385
|
+
discharge_loss: None # loss converting stored energy to discharge energy
|
390
386
|
inverter_power: None # inverter power consumption in W (dynamically set)
|
391
387
|
bms_power: 50 # BMS power consumption in W
|
392
388
|
force_charge_power: 5.00 # power used when Force Charge is scheduled
|
@@ -797,6 +793,19 @@ This setting can be:
|
|
797
793
|
|
798
794
|
# Version Info
|
799
795
|
|
796
|
+
2.7.0<br>
|
797
|
+
Allow charge_loss / discharge_loss to be configured for charge_needed().
|
798
|
+
Change 'Force Charge' to 'Battery Hold' in charge times to avoid confusion with Force Charge work mode.
|
799
|
+
Correct problem with missing periods of actual data in forecast.compare()
|
800
|
+
|
801
|
+
2.6.9<br>
|
802
|
+
Add get and set_named_settings() (for WorkMode and ExportLimit).
|
803
|
+
If a list of named settings is provided, the return value is a list indicating which settings succeeded (1) or failed (0).
|
804
|
+
Updates to get_battery() / get_batteries() to add optional rated and count parameters.
|
805
|
+
Updates to charge_needed() to end prediction at start of next charge period.
|
806
|
+
Correct charge time for Octopus Go tariff.
|
807
|
+
Update charge_needed() to show contingency achieved rather than requested.
|
808
|
+
|
800
809
|
2.6.8<br>
|
801
810
|
Add residual_handling=3 for Mira BMS with firmware 1.014 or later that returns residual capacity per battery.
|
802
811
|
Calculate 'ratedCapacity' in get_battery() and 'soh' for HV2600 and Mira.
|