foxesscloud 2.8.7__py3-none-any.whl → 2.8.8__py3-none-any.whl

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.
@@ -1,7 +1,7 @@
1
1
  ##################################################################################################
2
2
  """
3
3
  Module: Fox ESS Cloud
4
- Updated: 15 September 2025
4
+ Updated: 2 October 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.7"
13
+ version = "1.9.8"
14
14
  print(f"FoxESS-Cloud version {version}")
15
15
 
16
16
  debug_setting = 1
@@ -912,14 +912,14 @@ def get_min():
912
912
  output(f"** get_min(), no result data, {errno_message(errno)}")
913
913
  return None
914
914
  battery_settings['minSoc'] = result.get('minSoc')
915
- battery_settings['minGridSoc'] = result.get('minGridSoc')
915
+ battery_settings['minSocOnGrid'] = result.get('minGridSoc')
916
916
  return battery_settings
917
917
 
918
918
  ##################################################################################################
919
919
  # set min soc from battery_settings or parameters
920
920
  ##################################################################################################
921
921
 
922
- def set_min(minGridSoc = None, minSoc = None, force = 0):
922
+ def set_min(minSocOnGrid = None, minSoc = None, force = 0):
923
923
  global device_sn, battery_settings, debug_setting, messages
924
924
  if get_device() is None:
925
925
  return None
@@ -928,16 +928,24 @@ def set_min(minGridSoc = None, minSoc = None, force = 0):
928
928
  output(f"** set_min(): cannot set min SoC mode when a schedule is enabled")
929
929
  return None
930
930
  set_schedule(enable=0)
931
- data = {'sn': device_sn}
932
931
  if battery_settings is None:
933
932
  battery_settings = {}
934
- if minGridSoc is not None:
935
- data['minGridSoc'] = minGridSoc
936
- battery_settings['minGridSoc'] = minGridSoc
933
+ if minSocOnGrid is not None:
934
+ if minSocOnGrid < 0 or minSocOnGrid > 100:
935
+ output(f"** set_min(): invalid minSocOnGrid = {minSocOnGrid}. Must be between 0 and 100")
936
+ return None
937
+ battery_settings['minSocOnGrid'] = minSocOnGrid
937
938
  if minSoc is not None:
938
- data['minSoc'] = minSoc
939
+ if minSoc < 0 or minSoc > 100:
940
+ output(f"** set_min(): invalid minSoc = {minSoc}. Must be between 0 and 100")
941
+ return None
939
942
  battery_settings['minSoc'] = minSoc
940
- output(f"\nSetting minSoc = {battery_settings.get('minSoc')}, minGridSoc = {battery_settings.get('minGridSoc')}", 1)
943
+ data = {'sn': device_sn}
944
+ if battery_settings.get('minSocOnGrid') is not None:
945
+ data['minGridSoc'] = battery_settings['minSocOnGrid']
946
+ if battery_settings.get('minSoc') is not None:
947
+ data['minSoc'] = battery_settings['minSoc']
948
+ output(f"\nSetting minSocOnGrid = {battery_settings.get('minSocOnGrid')}, minSoc = {battery_settings.get('minSoc')}", 1)
941
949
  setting_delay()
942
950
  response = signed_post(path="/c/v0/device/battery/soc/set", data=data)
943
951
  if response.status_code != 200:
foxesscloud/openapi.py CHANGED
@@ -1,7 +1,7 @@
1
1
  ##################################################################################################
2
2
  """
3
3
  Module: Fox ESS Cloud using Open API
4
- Updated: 15 September 2025
4
+ Updated: 2 October 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.7"
13
+ version = "2.8.8"
14
14
  print(f"FoxESS-Cloud Open API version {version}")
15
15
 
16
16
  debug_setting = 1
@@ -823,13 +823,13 @@ def set_min(minSocOnGrid = None, minSoc = None, force = 0):
823
823
  if battery_settings is None:
824
824
  battery_settings = {}
825
825
  if minSocOnGrid is not None:
826
- if minSocOnGrid < 10 or minSocOnGrid > 100:
827
- output(f"** set_min(): invalid minSocOnGrid = {minSocOnGrid}. Must be between 10 and 100")
826
+ if minSocOnGrid < 0 or minSocOnGrid > 100:
827
+ output(f"** set_min(): invalid minSocOnGrid = {minSocOnGrid}. Must be between 0 and 100")
828
828
  return None
829
829
  battery_settings['minSocOnGrid'] = minSocOnGrid
830
830
  if minSoc is not None:
831
- if minSoc < 10 or minSoc > 100:
832
- output(f"** set_min(): invalid minSoc = {minSoc}. Must be between 10 and 100")
831
+ if minSoc < 0 or minSoc > 100:
832
+ output(f"** set_min(): invalid minSoc = {minSoc}. Must be between 0 and 100")
833
833
  return None
834
834
  battery_settings['minSoc'] = minSoc
835
835
  body = {'sn': device_sn}
@@ -837,7 +837,7 @@ def set_min(minSocOnGrid = None, minSoc = None, force = 0):
837
837
  body['minSocOnGrid'] = battery_settings['minSocOnGrid']
838
838
  if battery_settings.get('minSoc') is not None:
839
839
  body['minSoc'] = battery_settings['minSoc']
840
- output(f"\nSetting minSoc = {battery_settings.get('minSoc')}, minSocOnGrid = {battery_settings.get('minSocOnGrid')}", 1)
840
+ output(f"\nSetting minSocOnGrid = {battery_settings.get('minSocOnGrid')}, minSoc = {battery_settings.get('minSoc')}", 1)
841
841
  setting_delay()
842
842
  response = signed_post(path="/op/v0/device/battery/soc/set", body=body)
843
843
  if response.status_code != 200:
@@ -1665,6 +1665,10 @@ def get_report(dimension='day', d=None, v=None, summary=1, save=None, load=None,
1665
1665
  if errno > 0 or result is None or len(result) == 0:
1666
1666
  output(f"** get_report(), no report data available, {errno_message(response)}")
1667
1667
  return None
1668
+ # correct variables in year report (AP 19/09/2025):
1669
+ if dimension == 'year':
1670
+ for i, var in enumerate(result):
1671
+ var['variable'] = v[i]
1668
1672
  # correct errors in report values:
1669
1673
  if fix_values == 1:
1670
1674
  for var in result:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: foxesscloud
3
- Version: 2.8.7
3
+ Version: 2.8.8
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
@@ -163,6 +163,7 @@ f.set_named_settings(name, value, force)
163
163
  set_min() applies new SoC settings to the inverter. The parameters update battery_settings:
164
164
  + minSocOnGrid: min Soc on Grid setting e.g. 15 = 15%
165
165
  + minSoc: min Soc setting e.g. 10 = 10%
166
+ + force: setting to 1 will disable Mode Scheduler, if enabled. Default is 0.
166
167
 
167
168
  set_charge() takes the charge times from the battery_settings and applies these to the inverter. The parameters are optional and will update battery_settings. You should specify all 3 parameter for a time period:
168
169
  + ch1: enable charge from grid for period 1 (default True)
@@ -191,7 +192,7 @@ set_schedule() configures a list of scheduled work mode / soc changes with enabl
191
192
 
192
193
  set_named_settings() sets the 'name' setting to 'value'.
193
194
  + 'name' may also be a list of (name, value) pairs.
194
- + 'force': setting to 1 will disable Mode Scheduler, if enabled. Default is 0.
195
+ + force: setting to 1 will disable Mode Scheduler, if enabled. Default is 0.
195
196
  + a return value of 1 is success. 0 means setting failed. None is another error e.g. device not found, invalid name or value.
196
197
  + named_settings currently supported include: ExportLimit, MinSoc, MinSocOnGrid, MaxSoc, GridCode, WorkMode
197
198
 
@@ -820,6 +821,11 @@ This setting can be:
820
821
 
821
822
  # Version Info
822
823
 
824
+ 2.8.8<br>
825
+ Fix problem where Open API returns conflicting variable names when reporting stats by year.
826
+ Update daily template for Saturn Cloud to new YAML format.
827
+ Update set_min() to accept 0 instead of 10.
828
+
823
829
  2.8.7<br>
824
830
  Added f.get_signal().
825
831
  Updated set_period so you don't have to call get_schedule before.
@@ -0,0 +1,7 @@
1
+ foxesscloud/foxesscloud.py,sha256=vd3nBwhrqxkRmKMRa6iOXOiFq8Eg4czmv9_NNghiSq0,225903
2
+ foxesscloud/openapi.py,sha256=pgn4e_bVjTr_IWjHoeNFWM1GI3vlpD9dOOCkmpy4Yqg,211084
3
+ foxesscloud-2.8.8.dist-info/LICENCE,sha256=8JF-24QkE8UfdII-g6RaIEvM-PZ9zwaEcxlwYUDMt-4,1079
4
+ foxesscloud-2.8.8.dist-info/METADATA,sha256=zPZSZtAiAyBJPfe93ZsOVTWSFVrIYOYlvkw4Icxil4Y,66133
5
+ foxesscloud-2.8.8.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
6
+ foxesscloud-2.8.8.dist-info/top_level.txt,sha256=IWOrKSNZCLU6IDXSX_b4_bqCfbZoWAT4CC0w0Lg7PuU,12
7
+ foxesscloud-2.8.8.dist-info/RECORD,,
@@ -1,7 +0,0 @@
1
- foxesscloud/foxesscloud.py,sha256=fUB4O3p4UvnHAU2YMzUYh5eunMYjqJu9FpIfE9mPtVE,225412
2
- foxesscloud/openapi.py,sha256=ZpVcrpMU11FI8oAQlrbhoXCiFGP-ooD6me7D37CbkkE,210915
3
- foxesscloud-2.8.7.dist-info/LICENCE,sha256=8JF-24QkE8UfdII-g6RaIEvM-PZ9zwaEcxlwYUDMt-4,1079
4
- foxesscloud-2.8.7.dist-info/METADATA,sha256=XqyaBg9PXtXn82IkUJmvRQ59GFOCgUKUyqtxfvfr1xk,65846
5
- foxesscloud-2.8.7.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
6
- foxesscloud-2.8.7.dist-info/top_level.txt,sha256=IWOrKSNZCLU6IDXSX_b4_bqCfbZoWAT4CC0w0Lg7PuU,12
7
- foxesscloud-2.8.7.dist-info/RECORD,,