foxesscloud 2.8.2__tar.gz → 2.8.3__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.8.2/src/foxesscloud.egg-info → foxesscloud-2.8.3}/PKG-INFO +10 -6
- {foxesscloud-2.8.2 → foxesscloud-2.8.3}/README.md +9 -5
- {foxesscloud-2.8.2 → foxesscloud-2.8.3}/pyproject.toml +1 -1
- {foxesscloud-2.8.2 → foxesscloud-2.8.3}/src/foxesscloud/foxesscloud.py +22 -13
- {foxesscloud-2.8.2 → foxesscloud-2.8.3}/src/foxesscloud/openapi.py +6 -4
- {foxesscloud-2.8.2 → foxesscloud-2.8.3/src/foxesscloud.egg-info}/PKG-INFO +10 -6
- {foxesscloud-2.8.2 → foxesscloud-2.8.3}/LICENCE +0 -0
- {foxesscloud-2.8.2 → foxesscloud-2.8.3}/setup.cfg +0 -0
- {foxesscloud-2.8.2 → foxesscloud-2.8.3}/src/foxesscloud.egg-info/SOURCES.txt +0 -0
- {foxesscloud-2.8.2 → foxesscloud-2.8.3}/src/foxesscloud.egg-info/dependency_links.txt +0 -0
- {foxesscloud-2.8.2 → foxesscloud-2.8.3}/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.8.
|
3
|
+
Version: 2.8.3
|
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
|
@@ -132,13 +132,14 @@ Additional battery attributes provided include:
|
|
132
132
|
|
133
133
|
get_settings() will return the battery settings and is equivalent to get_charge() and get_min(). The results are stored in f.battery_settings. The settings include minSoc, minSocOnGrid, enable charge from grid and the charge times.
|
134
134
|
|
135
|
-
get_flag() returns the current scheduler enable / support / maxsoc flags
|
135
|
+
get_flag() returns the current scheduler enable / support / maxsoc flags. By default support for Max Soc is set to False.
|
136
136
|
|
137
137
|
get_schedule() returns the current work mode / soc schedule settings. The result is stored in f.schedule.
|
138
|
+
+ if the schedule returned contains any values for 'maxSoc', the f.schedule['maxsoc'] is set to True to indicate that the current inverter supports setting Max Soc in schedules and Max Soc values are set by set_schedule().
|
138
139
|
|
139
140
|
get_named_settings() returns the value of a named setting. If 'name' is a list, it returns a list of values.
|
140
|
-
+ f.named_settings is updated. This is dictionary of information and current value, indexed by 'name.
|
141
|
-
+
|
141
|
+
+ f.named_settings is updated. This is dictionary of information and current value, indexed by 'name'.
|
142
|
+
+ named_settings current supported include: ExportLimit, MinSoc, MinSocOnGrid, MaxSoc, GridCode
|
142
143
|
|
143
144
|
|
144
145
|
## Inverter Settings
|
@@ -194,8 +195,8 @@ set_schedule() configures a list of scheduled work mode / soc changes with enabl
|
|
194
195
|
set_named_settings() sets the 'name' setting to 'value'.
|
195
196
|
+ 'name' may also be a list of (name, value) pairs.
|
196
197
|
+ 'force': setting to 1 will disable Mode Scheduler, if enabled. Default is 0.
|
197
|
-
+
|
198
|
-
+
|
198
|
+
+ a return value of 1 is success. 0 means setting failed. None is another error e.g. device not found, invalid name or value.
|
199
|
+
+ named_settings current supported include: ExportLimit, MinSoc, MinSocOnGrid, MaxSoc, GridCode
|
199
200
|
|
200
201
|
|
201
202
|
## Real Time Data
|
@@ -820,6 +821,9 @@ This setting can be:
|
|
820
821
|
|
821
822
|
# Version Info
|
822
823
|
|
824
|
+
2.8.3<br>
|
825
|
+
Update to support setting Max Soc in schedules now this is supported by Fox using Open API.
|
826
|
+
|
823
827
|
2.8.2<br>
|
824
828
|
Fix forecast.solar (after change to start parameter processing).
|
825
829
|
Change logic around battery status so 0 is offline and others values are online.
|
@@ -118,13 +118,14 @@ Additional battery attributes provided include:
|
|
118
118
|
|
119
119
|
get_settings() will return the battery settings and is equivalent to get_charge() and get_min(). The results are stored in f.battery_settings. The settings include minSoc, minSocOnGrid, enable charge from grid and the charge times.
|
120
120
|
|
121
|
-
get_flag() returns the current scheduler enable / support / maxsoc flags
|
121
|
+
get_flag() returns the current scheduler enable / support / maxsoc flags. By default support for Max Soc is set to False.
|
122
122
|
|
123
123
|
get_schedule() returns the current work mode / soc schedule settings. The result is stored in f.schedule.
|
124
|
+
+ if the schedule returned contains any values for 'maxSoc', the f.schedule['maxsoc'] is set to True to indicate that the current inverter supports setting Max Soc in schedules and Max Soc values are set by set_schedule().
|
124
125
|
|
125
126
|
get_named_settings() returns the value of a named setting. If 'name' is a list, it returns a list of values.
|
126
|
-
+ f.named_settings is updated. This is dictionary of information and current value, indexed by 'name.
|
127
|
-
+
|
127
|
+
+ f.named_settings is updated. This is dictionary of information and current value, indexed by 'name'.
|
128
|
+
+ named_settings current supported include: ExportLimit, MinSoc, MinSocOnGrid, MaxSoc, GridCode
|
128
129
|
|
129
130
|
|
130
131
|
## Inverter Settings
|
@@ -180,8 +181,8 @@ set_schedule() configures a list of scheduled work mode / soc changes with enabl
|
|
180
181
|
set_named_settings() sets the 'name' setting to 'value'.
|
181
182
|
+ 'name' may also be a list of (name, value) pairs.
|
182
183
|
+ 'force': setting to 1 will disable Mode Scheduler, if enabled. Default is 0.
|
183
|
-
+
|
184
|
-
+
|
184
|
+
+ a return value of 1 is success. 0 means setting failed. None is another error e.g. device not found, invalid name or value.
|
185
|
+
+ named_settings current supported include: ExportLimit, MinSoc, MinSocOnGrid, MaxSoc, GridCode
|
185
186
|
|
186
187
|
|
187
188
|
## Real Time Data
|
@@ -806,6 +807,9 @@ This setting can be:
|
|
806
807
|
|
807
808
|
# Version Info
|
808
809
|
|
810
|
+
2.8.3<br>
|
811
|
+
Update to support setting Max Soc in schedules now this is supported by Fox using Open API.
|
812
|
+
|
809
813
|
2.8.2<br>
|
810
814
|
Fix forecast.solar (after change to start parameter processing).
|
811
815
|
Change logic around battery status so 0 is offline and others values are online.
|
@@ -1,7 +1,7 @@
|
|
1
1
|
##################################################################################################
|
2
2
|
"""
|
3
3
|
Module: Fox ESS Cloud
|
4
|
-
Updated:
|
4
|
+
Updated: 16 April 2025
|
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.9.
|
13
|
+
version = "1.9.5"
|
14
14
|
print(f"FoxESS-Cloud version {version}")
|
15
15
|
|
16
16
|
debug_setting = 1
|
@@ -1005,6 +1005,13 @@ merge_settings = { # keys to add
|
|
1005
1005
|
'unit': '℃'},
|
1006
1006
|
}
|
1007
1007
|
|
1008
|
+
# change named settings, if required, so names match between Fox API and Open API
|
1009
|
+
translate_names = {
|
1010
|
+
'MaxSoc': 'MaximumSoC',
|
1011
|
+
'MinSoc': 'MinimumSoC',
|
1012
|
+
'MinSocOnGrid': 'MinimumSoC-OnGrid'
|
1013
|
+
}
|
1014
|
+
|
1008
1015
|
def get_ui():
|
1009
1016
|
global device_id, debug_setting, messages, remote_settings, named_settings, merge_settings
|
1010
1017
|
if get_device() is None:
|
@@ -1069,7 +1076,7 @@ def get_ui():
|
|
1069
1076
|
return remote_settings
|
1070
1077
|
|
1071
1078
|
def get_remote_settings(key):
|
1072
|
-
global device_id, debug_setting, messages
|
1079
|
+
global device_id, debug_setting, messages, translate_settings
|
1073
1080
|
if get_device() is None:
|
1074
1081
|
return None
|
1075
1082
|
output(f"getting remote settings", 2)
|
@@ -1101,7 +1108,7 @@ def get_remote_settings(key):
|
|
1101
1108
|
return values
|
1102
1109
|
|
1103
1110
|
def get_named_settings(name):
|
1104
|
-
global named_settings
|
1111
|
+
global named_settings, translate_names
|
1105
1112
|
if get_device() is None:
|
1106
1113
|
return None
|
1107
1114
|
if type(name) is list:
|
@@ -1109,10 +1116,11 @@ def get_named_settings(name):
|
|
1109
1116
|
for n in name:
|
1110
1117
|
result.append(get_named_settings(n))
|
1111
1118
|
return result
|
1112
|
-
|
1119
|
+
key_name = translate_names[name] if translate_names.get(name) is not None else name
|
1120
|
+
if named_settings is None or named_settings.get(key_name) is None:
|
1113
1121
|
output(f"** get_named_settings(): {name} was not recognised")
|
1114
1122
|
return None
|
1115
|
-
keys = named_settings[
|
1123
|
+
keys = named_settings[key_name].get('keys')
|
1116
1124
|
if keys is None:
|
1117
1125
|
output(f"** get_named_settings(): no keys for name: {name}")
|
1118
1126
|
return None
|
@@ -1121,8 +1129,8 @@ def get_named_settings(name):
|
|
1121
1129
|
if result is None:
|
1122
1130
|
output(f"** get_named_settings(): no result for {name} using key: {keys}")
|
1123
1131
|
return None
|
1124
|
-
result_type = named_settings[
|
1125
|
-
value_type = named_settings[
|
1132
|
+
result_type = named_settings[key_name].get('type')
|
1133
|
+
value_type = named_settings[key_name].get('valueType')
|
1126
1134
|
if result_type is None:
|
1127
1135
|
v = result.get([k for k in result.keys()][0])
|
1128
1136
|
return v if value_type is None else c_float(v) if value_type == 'float' else c_int(v)
|
@@ -1134,7 +1142,7 @@ def get_named_settings(name):
|
|
1134
1142
|
return result
|
1135
1143
|
|
1136
1144
|
def set_named_settings(name, value, force=0):
|
1137
|
-
global named_settings
|
1145
|
+
global named_settings, translate_names
|
1138
1146
|
if get_device() is None:
|
1139
1147
|
return None
|
1140
1148
|
if force == 1 and get_schedule().get('enable'):
|
@@ -1144,18 +1152,19 @@ def set_named_settings(name, value, force=0):
|
|
1144
1152
|
for (n, v) in name:
|
1145
1153
|
result.append(set_named_settings(name=n, value=v))
|
1146
1154
|
return result
|
1147
|
-
|
1155
|
+
key_name = translate_names[name] if translate_names.get(name) is not None else name
|
1156
|
+
if named_settings is None or named_settings.get(key_name) is None:
|
1148
1157
|
output(f"** set_named_settings(): {name} was not recognised")
|
1149
1158
|
return None
|
1150
|
-
keys = named_settings[
|
1159
|
+
keys = named_settings[key_name].get('keys')
|
1151
1160
|
if keys is None:
|
1152
1161
|
output(f"** set_named_settings(): no keys for name: {name}")
|
1153
1162
|
return None
|
1154
|
-
item_type = named_settings[
|
1163
|
+
item_type = named_settings[key_name].get('type')
|
1155
1164
|
if item_type is None:
|
1156
1165
|
values = {keys: str(value)}
|
1157
1166
|
elif item_type == 'block':
|
1158
|
-
items = named_setting[
|
1167
|
+
items = named_setting[key_name]['items']
|
1159
1168
|
n = len(items)
|
1160
1169
|
if type(value) is not list or n != len(value):
|
1161
1170
|
output(f"** set_named_settings(): {name} requires list of {n} values")
|
@@ -1,7 +1,7 @@
|
|
1
1
|
##################################################################################################
|
2
2
|
"""
|
3
3
|
Module: Fox ESS Cloud using Open API
|
4
|
-
Updated:
|
4
|
+
Updated: 16 April 2025
|
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.8.
|
13
|
+
version = "2.8.3"
|
14
14
|
print(f"FoxESS-Cloud Open API version {version}")
|
15
15
|
|
16
16
|
debug_setting = 1
|
@@ -861,6 +861,7 @@ def get_remote_settings(name):
|
|
861
861
|
values[x] = v[x]
|
862
862
|
return values
|
863
863
|
body = {'sn': device_sn, 'key': name}
|
864
|
+
setting_delay()
|
864
865
|
response = signed_post(path="/op/v0/device/setting/get", body=body)
|
865
866
|
if response.status_code != 200:
|
866
867
|
output(f"** get_remote_settings() got response code {response.status_code}: {response.reason}")
|
@@ -1016,10 +1017,9 @@ def get_flag():
|
|
1016
1017
|
if result is None:
|
1017
1018
|
return None
|
1018
1019
|
if schedule is None:
|
1019
|
-
schedule = {'enable': None, 'support': None, 'periods': None}
|
1020
|
+
schedule = {'enable': None, 'support': None, 'periods': None, 'maxsoc': False}
|
1020
1021
|
schedule['enable'] = result.get('enable')
|
1021
1022
|
schedule['support'] = result.get('support')
|
1022
|
-
schedule['maxsoc'] = False
|
1023
1023
|
if device.get('function') is not None and device['function'].get('scheduler') is not None:
|
1024
1024
|
device['function']['scheduler'] = schedule['support']
|
1025
1025
|
return schedule
|
@@ -1055,6 +1055,8 @@ def get_schedule():
|
|
1055
1055
|
for g in result['groups']:
|
1056
1056
|
if g['enable'] == 1 and g['workMode'] in work_modes:
|
1057
1057
|
schedule['periods'].append(g)
|
1058
|
+
if g.get('maxSoc') is not None:
|
1059
|
+
schedule['maxsoc'] = True
|
1058
1060
|
return schedule
|
1059
1061
|
|
1060
1062
|
# build strategy using current schedule
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: foxesscloud
|
3
|
-
Version: 2.8.
|
3
|
+
Version: 2.8.3
|
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
|
@@ -132,13 +132,14 @@ Additional battery attributes provided include:
|
|
132
132
|
|
133
133
|
get_settings() will return the battery settings and is equivalent to get_charge() and get_min(). The results are stored in f.battery_settings. The settings include minSoc, minSocOnGrid, enable charge from grid and the charge times.
|
134
134
|
|
135
|
-
get_flag() returns the current scheduler enable / support / maxsoc flags
|
135
|
+
get_flag() returns the current scheduler enable / support / maxsoc flags. By default support for Max Soc is set to False.
|
136
136
|
|
137
137
|
get_schedule() returns the current work mode / soc schedule settings. The result is stored in f.schedule.
|
138
|
+
+ if the schedule returned contains any values for 'maxSoc', the f.schedule['maxsoc'] is set to True to indicate that the current inverter supports setting Max Soc in schedules and Max Soc values are set by set_schedule().
|
138
139
|
|
139
140
|
get_named_settings() returns the value of a named setting. If 'name' is a list, it returns a list of values.
|
140
|
-
+ f.named_settings is updated. This is dictionary of information and current value, indexed by 'name.
|
141
|
-
+
|
141
|
+
+ f.named_settings is updated. This is dictionary of information and current value, indexed by 'name'.
|
142
|
+
+ named_settings current supported include: ExportLimit, MinSoc, MinSocOnGrid, MaxSoc, GridCode
|
142
143
|
|
143
144
|
|
144
145
|
## Inverter Settings
|
@@ -194,8 +195,8 @@ set_schedule() configures a list of scheduled work mode / soc changes with enabl
|
|
194
195
|
set_named_settings() sets the 'name' setting to 'value'.
|
195
196
|
+ 'name' may also be a list of (name, value) pairs.
|
196
197
|
+ 'force': setting to 1 will disable Mode Scheduler, if enabled. Default is 0.
|
197
|
-
+
|
198
|
-
+
|
198
|
+
+ a return value of 1 is success. 0 means setting failed. None is another error e.g. device not found, invalid name or value.
|
199
|
+
+ named_settings current supported include: ExportLimit, MinSoc, MinSocOnGrid, MaxSoc, GridCode
|
199
200
|
|
200
201
|
|
201
202
|
## Real Time Data
|
@@ -820,6 +821,9 @@ This setting can be:
|
|
820
821
|
|
821
822
|
# Version Info
|
822
823
|
|
824
|
+
2.8.3<br>
|
825
|
+
Update to support setting Max Soc in schedules now this is supported by Fox using Open API.
|
826
|
+
|
823
827
|
2.8.2<br>
|
824
828
|
Fix forecast.solar (after change to start parameter processing).
|
825
829
|
Change logic around battery status so 0 is offline and others values are online.
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|