foxesscloud 2.7.3__tar.gz → 2.7.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.7.3/src/foxesscloud.egg-info → foxesscloud-2.7.4}/PKG-INFO +4 -1
- {foxesscloud-2.7.3 → foxesscloud-2.7.4}/README.md +3 -0
- {foxesscloud-2.7.3 → foxesscloud-2.7.4}/pyproject.toml +1 -1
- {foxesscloud-2.7.3 → foxesscloud-2.7.4}/src/foxesscloud/foxesscloud.py +13 -13
- {foxesscloud-2.7.3 → foxesscloud-2.7.4}/src/foxesscloud/openapi.py +13 -8
- {foxesscloud-2.7.3 → foxesscloud-2.7.4/src/foxesscloud.egg-info}/PKG-INFO +4 -1
- {foxesscloud-2.7.3 → foxesscloud-2.7.4}/LICENCE +0 -0
- {foxesscloud-2.7.3 → foxesscloud-2.7.4}/setup.cfg +0 -0
- {foxesscloud-2.7.3 → foxesscloud-2.7.4}/src/foxesscloud.egg-info/SOURCES.txt +0 -0
- {foxesscloud-2.7.3 → foxesscloud-2.7.4}/src/foxesscloud.egg-info/dependency_links.txt +0 -0
- {foxesscloud-2.7.3 → foxesscloud-2.7.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.7.
|
3
|
+
Version: 2.7.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
|
@@ -807,6 +807,9 @@ This setting can be:
|
|
807
807
|
|
808
808
|
# Version Info
|
809
809
|
|
810
|
+
2.7.4<br>
|
811
|
+
Update to support T series inverters.
|
812
|
+
|
810
813
|
2.7.3<br>
|
811
814
|
Fix divide by zero error if get_report() returns no data.
|
812
815
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
##################################################################################################
|
2
2
|
"""
|
3
3
|
Module: Fox ESS Cloud
|
4
|
-
Updated:
|
4
|
+
Updated: 13 December 2024
|
5
5
|
By: Tony Matthews
|
6
6
|
"""
|
7
7
|
##################################################################################################
|
@@ -10,7 +10,7 @@ By: Tony Matthews
|
|
10
10
|
# ALL RIGHTS ARE RESERVED © Tony Matthews 2023
|
11
11
|
##################################################################################################
|
12
12
|
|
13
|
-
version = "1.8.
|
13
|
+
version = "1.8.5"
|
14
14
|
print(f"FoxESS-Cloud version {version}")
|
15
15
|
|
16
16
|
debug_setting = 1
|
@@ -491,15 +491,16 @@ def get_device(sn=None):
|
|
491
491
|
remote_settings = get_ui()
|
492
492
|
# parse the model code to work out attributes
|
493
493
|
model_code = device['deviceType'].upper()
|
494
|
-
|
495
|
-
|
494
|
+
if model_code[:1] == 'T':
|
495
|
+
model_code = 'T3-' + model_code[1:]
|
496
|
+
elif model_code[:2] == 'KH':
|
496
497
|
model_code = 'KH-' + model_code[2:]
|
497
498
|
elif model_code[:4] == 'AIO-':
|
498
499
|
model_code = 'AIO' + model_code[4:]
|
499
500
|
device['eps'] = 'E' in model_code
|
500
501
|
parts = model_code.split('-')
|
501
502
|
model = parts[0]
|
502
|
-
if model not in ['KH', 'H1', 'AC1', 'H3', 'AC3', 'AIOH1', 'AIOH3']:
|
503
|
+
if model not in ['T3', 'KH', 'H1', 'AC1', 'H3', 'AC3', 'AIOH1', 'AIOH3']:
|
503
504
|
output(f"** device model not recognised for deviceType: {device['deviceType']}")
|
504
505
|
return device
|
505
506
|
device['model'] = model
|
@@ -507,13 +508,15 @@ def get_device(sn=None):
|
|
507
508
|
for p in parts[1:]:
|
508
509
|
if p.replace('.','').isnumeric():
|
509
510
|
power = float(p)
|
510
|
-
if power >= 1.0 and power <
|
511
|
+
if power >= 1.0 and power < 50.0:
|
511
512
|
device['power'] = float(p)
|
512
513
|
break
|
513
514
|
if device.get('power') is None:
|
514
515
|
output(f"** device power not found for deviceType: {device['deviceType']}")
|
515
516
|
# set max charge current
|
516
|
-
if model in ['
|
517
|
+
if model in ['T3']:
|
518
|
+
device['max_charge_current'] = None
|
519
|
+
elif model in ['KH']:
|
517
520
|
device['max_charge_current'] = 50
|
518
521
|
elif model in ['H1', 'AC1']:
|
519
522
|
device['max_charge_current'] = 35
|
@@ -809,7 +812,7 @@ def time_period(t):
|
|
809
812
|
return result
|
810
813
|
|
811
814
|
def set_charge(ch1=True, st1=0, en1=0, ch2=True, st2=0, en2=0, force=0, enable=1):
|
812
|
-
global device_sn, battery_settings, debug_setting, messages
|
815
|
+
global device_sn, battery_settings, debug_setting, messages
|
813
816
|
if get_device() is None:
|
814
817
|
return None
|
815
818
|
if battery_settings is None:
|
@@ -818,9 +821,8 @@ def set_charge(ch1=True, st1=0, en1=0, ch2=True, st2=0, en2=0, force=0, enable=1
|
|
818
821
|
battery_settings['times'] = []
|
819
822
|
battery_settings['times'].append({'tip': '', 'enableCharge': True, 'enableGrid': False, 'startTime': {'hour': 0, 'minute': 0}, 'endTime': {'hour': 0, 'minute': 0}})
|
820
823
|
battery_settings['times'].append({'tip': '', 'enableCharge': True, 'enableGrid': False, 'startTime': {'hour': 0, 'minute': 0}, 'endTime': {'hour': 0, 'minute': 0}})
|
821
|
-
|
822
|
-
|
823
|
-
if schedule.get('enable') == True:
|
824
|
+
flag = get_flag()
|
825
|
+
if flag is not None and flag.get('enable') == True:
|
824
826
|
if force == 0:
|
825
827
|
output(f"** set_charge(): cannot set charge when a schedule is enabled")
|
826
828
|
return None
|
@@ -1250,8 +1252,6 @@ def get_flag():
|
|
1250
1252
|
errno = response.json().get('errno')
|
1251
1253
|
if errno == 40256:
|
1252
1254
|
output(f"** get_flag(), not suported on this device")
|
1253
|
-
else:
|
1254
|
-
output(f"** get_flag()), no result data, {errno_message(errno)}")
|
1255
1255
|
return None
|
1256
1256
|
if schedule is None:
|
1257
1257
|
schedule = {'enable': None, 'support': None, 'pollcy': None}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
##################################################################################################
|
2
2
|
"""
|
3
3
|
Module: Fox ESS Cloud using Open API
|
4
|
-
Updated:
|
4
|
+
Updated: 13 December 2024
|
5
5
|
By: Tony Matthews
|
6
6
|
"""
|
7
7
|
##################################################################################################
|
@@ -10,7 +10,7 @@ By: Tony Matthews
|
|
10
10
|
# ALL RIGHTS ARE RESERVED © Tony Matthews 2024
|
11
11
|
##################################################################################################
|
12
12
|
|
13
|
-
version = "2.7.
|
13
|
+
version = "2.7.4"
|
14
14
|
print(f"FoxESS-Cloud Open API version {version}")
|
15
15
|
|
16
16
|
debug_setting = 1
|
@@ -481,7 +481,8 @@ def get_device(sn=None):
|
|
481
481
|
# remote_settings = get_ui()
|
482
482
|
# parse the model code to work out attributes
|
483
483
|
model_code = device['deviceType'].upper()
|
484
|
-
|
484
|
+
if model_code[:1] == 'T':
|
485
|
+
model_code = 'T3-' + model_code[1:]
|
485
486
|
if model_code[:2] == 'KH':
|
486
487
|
model_code = 'KH-' + model_code[2:]
|
487
488
|
elif model_code[:4] == 'AIO-':
|
@@ -489,7 +490,7 @@ def get_device(sn=None):
|
|
489
490
|
device['eps'] = 'E' in model_code
|
490
491
|
parts = model_code.split('-')
|
491
492
|
model = parts[0]
|
492
|
-
if model not in ['KH', 'H1', 'AC1', 'H3', 'AC3', 'AIOH1', 'AIOH3']:
|
493
|
+
if model not in ['T3', 'KH', 'H1', 'AC1', 'H3', 'AC3', 'AIOH1', 'AIOH3']:
|
493
494
|
output(f"** device model not recognised for deviceType: {device['deviceType']}")
|
494
495
|
return device
|
495
496
|
device['model'] = model
|
@@ -497,13 +498,15 @@ def get_device(sn=None):
|
|
497
498
|
for p in parts[1:]:
|
498
499
|
if p.replace('.','').isnumeric():
|
499
500
|
power = float(p)
|
500
|
-
if power >= 1.0 and power <
|
501
|
+
if power >= 1.0 and power < 50.0:
|
501
502
|
device['power'] = float(p)
|
502
503
|
break
|
503
504
|
if device.get('power') is None:
|
504
505
|
output(f"** device power not found for deviceType: {device['deviceType']}")
|
505
506
|
# set max charge current
|
506
|
-
if model in ['
|
507
|
+
if model in ['T3']:
|
508
|
+
device['max_charge_current'] = None
|
509
|
+
elif model in ['KH']:
|
507
510
|
device['max_charge_current'] = 50
|
508
511
|
elif model in ['H1', 'AC1']:
|
509
512
|
device['max_charge_current'] = 35
|
@@ -693,7 +696,8 @@ def set_charge(ch1=True, st1=0, en1=0, ch2=True, st2=0, en2=0, force = 0, enable
|
|
693
696
|
battery_settings['times']['enable2'] = False
|
694
697
|
battery_settings['times']['startTime2'] = {'hour': 0, 'minute': 0}
|
695
698
|
battery_settings['times']['endTime2'] = {'hour': 0, 'minute': 0}
|
696
|
-
|
699
|
+
flag = get_flag()
|
700
|
+
if flag is not None and flag.get('enable') == 1:
|
697
701
|
if force == 0:
|
698
702
|
output(f"** set_charge(): cannot set charge when a schedule is enabled")
|
699
703
|
return None
|
@@ -1002,7 +1006,8 @@ def get_flag():
|
|
1002
1006
|
return None
|
1003
1007
|
result = response.json().get('result')
|
1004
1008
|
if result is None:
|
1005
|
-
|
1009
|
+
if errno == 40256:
|
1010
|
+
output(f"** get_flag(), not suported on this device")
|
1006
1011
|
return None
|
1007
1012
|
if schedule is None:
|
1008
1013
|
schedule = {'enable': None, 'support': None, 'periods': None}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: foxesscloud
|
3
|
-
Version: 2.7.
|
3
|
+
Version: 2.7.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
|
@@ -807,6 +807,9 @@ This setting can be:
|
|
807
807
|
|
808
808
|
# Version Info
|
809
809
|
|
810
|
+
2.7.4<br>
|
811
|
+
Update to support T series inverters.
|
812
|
+
|
810
813
|
2.7.3<br>
|
811
814
|
Fix divide by zero error if get_report() returns no data.
|
812
815
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|