foxesscloud 2.6.3__tar.gz → 2.6.4__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.3/src/foxesscloud.egg-info → foxesscloud-2.6.4}/PKG-INFO +2 -2
- {foxesscloud-2.6.3 → foxesscloud-2.6.4}/README.md +1 -1
- {foxesscloud-2.6.3 → foxesscloud-2.6.4}/pyproject.toml +1 -1
- {foxesscloud-2.6.3 → foxesscloud-2.6.4}/src/foxesscloud/foxesscloud.py +13 -16
- {foxesscloud-2.6.3 → foxesscloud-2.6.4}/src/foxesscloud/openapi.py +2 -2
- {foxesscloud-2.6.3 → foxesscloud-2.6.4/src/foxesscloud.egg-info}/PKG-INFO +2 -2
- {foxesscloud-2.6.3 → foxesscloud-2.6.4}/LICENCE +0 -0
- {foxesscloud-2.6.3 → foxesscloud-2.6.4}/setup.cfg +0 -0
- {foxesscloud-2.6.3 → foxesscloud-2.6.4}/src/foxesscloud.egg-info/SOURCES.txt +0 -0
- {foxesscloud-2.6.3 → foxesscloud-2.6.4}/src/foxesscloud.egg-info/dependency_links.txt +0 -0
- {foxesscloud-2.6.3 → foxesscloud-2.6.4}/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.6.
|
3
|
+
Version: 2.6.4
|
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
|
@@ -787,7 +787,7 @@ This setting can be:
|
|
787
787
|
|
788
788
|
# Version Info
|
789
789
|
|
790
|
-
2.6.
|
790
|
+
2.6.4<br>
|
791
791
|
Increase default plungs_slots from 6 to 8.
|
792
792
|
Correct battery capacity in get_batteries().
|
793
793
|
|
@@ -10,7 +10,7 @@ By: Tony Matthews
|
|
10
10
|
# ALL RIGHTS ARE RESERVED © Tony Matthews 2023
|
11
11
|
##################################################################################################
|
12
12
|
|
13
|
-
version = "1.7.
|
13
|
+
version = "1.7.6"
|
14
14
|
print(f"FoxESS-Cloud version {version}")
|
15
15
|
|
16
16
|
debug_setting = 1
|
@@ -690,29 +690,26 @@ def get_batteries(info=1):
|
|
690
690
|
b['residual_handling'] = residual_handling
|
691
691
|
if b.get('info') is not None and b['info']['masterVersion'] >= '1.014' and b['info']['masterSN'][:7] == '60BBHV2':
|
692
692
|
b['residual_handling'] = 2
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
else
|
697
|
-
|
698
|
-
b['soh'] = None
|
699
|
-
b['soh_supported'] = False
|
693
|
+
rated_capacity = b.get('ratedCapacity')
|
694
|
+
b['ratedCapacity'] = rated_capacity if rated_capacity is not None and rated_capacity > 100 else None
|
695
|
+
soh = b.get('soh')
|
696
|
+
b['soh'] = int(soh) if soh.isnumeric() and int(soh) > 10 else None
|
697
|
+
b['soh_supported'] = b['soh'] is not None
|
700
698
|
for i, b in enumerate(batteries):
|
701
699
|
if i == 0:
|
702
700
|
residual_handling = b['residual_handling']
|
703
701
|
get_battery(info=0)
|
704
|
-
battery['ratedCapacity'] = b.get('ratedCapacity')
|
705
702
|
b['capacity'] = battery.get('capacity')
|
706
703
|
b['residual'] = battery.get('residual')
|
707
704
|
b['soc'] = battery.get('soc')
|
708
|
-
if b.get('capacity') is None and b.get('soh') is not None:
|
709
|
-
capacity = (b['ratedCapacity'] / 1000 * b['soh'] / 100)
|
705
|
+
if b.get('capacity') is None and b.get('ratedCapacity') is not None and b.get('soh') is not None:
|
706
|
+
b['capacity'] = round(b['ratedCapacity'] / 1000 * b['soh'] / 100, 3)
|
707
|
+
if b.get('residual') is None and b.get('capacity') is not None and b.get('soc') is not None:
|
710
708
|
soc = b.get('soc')
|
711
|
-
residual = capacity * soc / 100
|
712
|
-
b['capacity'] = round(capacity, 3)
|
709
|
+
residual = b['capacity'] * b['soc'] / 100
|
713
710
|
b['residual'] = round(residual, 3)
|
714
711
|
if b.get('capacity') is not None and b.get('ratedCapacity') is not None:
|
715
|
-
b['soh'] = round(b['capacity'] / b['ratedCapacity'] *
|
712
|
+
b['soh'] = round(b['capacity'] * 1000 / b['ratedCapacity'] * 100, 1)
|
716
713
|
b['charge_rate'] = 50
|
717
714
|
params = battery_params[b['residual_handling']]
|
718
715
|
b['charge_loss'] = params['charge_loss']
|
@@ -2418,9 +2415,9 @@ def get_agile_times(tariff=agile_octopus, d=None):
|
|
2418
2415
|
plunge = []
|
2419
2416
|
plunge_price = tariff_config['plunge_price'] if tariff_config.get('plunge_price') is not None else 2
|
2420
2417
|
plunge_price = [plunge_price] if type(plunge_price) is not list else plunge_price
|
2421
|
-
plunge_slots = tariff_config['plunge_slots'] if tariff_config.get('plunge_slots') is not None else
|
2418
|
+
plunge_slots = tariff_config['plunge_slots'] if tariff_config.get('plunge_slots') is not None else 8
|
2422
2419
|
for i in range(0, len(prices)):
|
2423
|
-
# hour relative index into list of plunge prices, starting at 7am
|
2420
|
+
# hour relative index into list of plunge prices and slots, starting at 7am
|
2424
2421
|
x = int(((now.hour - 7 + i / 2) % 24) * len(plunge_price) / 24)
|
2425
2422
|
if prices[i] is not None and prices[i]['price'] < plunge_price[x]:
|
2426
2423
|
plunge.append(i)
|
@@ -10,7 +10,7 @@ By: Tony Matthews
|
|
10
10
|
# ALL RIGHTS ARE RESERVED © Tony Matthews 2024
|
11
11
|
##################################################################################################
|
12
12
|
|
13
|
-
version = "2.6.
|
13
|
+
version = "2.6.4"
|
14
14
|
print(f"FoxESS-Cloud Open API version {version}")
|
15
15
|
|
16
16
|
debug_setting = 1
|
@@ -2219,7 +2219,7 @@ def get_agile_times(tariff=agile_octopus, d=None):
|
|
2219
2219
|
plunge = []
|
2220
2220
|
plunge_price = tariff_config['plunge_price'] if tariff_config.get('plunge_price') is not None else 2
|
2221
2221
|
plunge_price = [plunge_price] if type(plunge_price) is not list else plunge_price
|
2222
|
-
plunge_slots = tariff_config['plunge_slots'] if tariff_config.get('plunge_slots') is not None else
|
2222
|
+
plunge_slots = tariff_config['plunge_slots'] if tariff_config.get('plunge_slots') is not None else 8
|
2223
2223
|
for i in range(0, len(prices)):
|
2224
2224
|
# hour relative index into list of plunge prices, starting at 7am
|
2225
2225
|
x = int(((now.hour - 7 + i / 2) % 24) * len(plunge_price) / 24)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: foxesscloud
|
3
|
-
Version: 2.6.
|
3
|
+
Version: 2.6.4
|
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
|
@@ -787,7 +787,7 @@ This setting can be:
|
|
787
787
|
|
788
788
|
# Version Info
|
789
789
|
|
790
|
-
2.6.
|
790
|
+
2.6.4<br>
|
791
791
|
Increase default plungs_slots from 6 to 8.
|
792
792
|
Correct battery capacity in get_batteries().
|
793
793
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|