foxesscloud 2.9.4__tar.gz → 2.9.5__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: foxesscloud
3
- Version: 2.9.4
3
+ Version: 2.9.5
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
@@ -139,6 +139,7 @@ get_settings() will return the battery settings and is equivalent to get_charge(
139
139
  get_peakshaving() will return the current peak shaving settings for inverters that support this work mode.
140
140
 
141
141
  get_flag() returns the current scheduler enable / support / maxsoc flags. By default support for Max Soc is set to False.
142
+ + f.max_periods / schedule['maxGroupCount'] gives the maximum number of time periods that are supported.
142
143
 
143
144
  get_schedule() returns the current work mode / soc schedule settings. The result is stored in f.schedule.
144
145
  + 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().
@@ -496,7 +497,7 @@ This is an example of the output from battery_info():
496
497
  ## Date Ranges
497
498
 
498
499
  ```
499
- f.date_list(s, e, limit, span, today)
500
+ f.date_list(s, e, limit, span, today, step)
500
501
  ```
501
502
 
502
503
  Returns a list of dates in the format 'YYYY-MM-DD'. This function will not return dates in the future. The last date will be yesterday or today (if today is True). All parameters are optional:
@@ -506,6 +507,7 @@ Returns a list of dates in the format 'YYYY-MM-DD'. This function will not retur
506
507
  + limit: maximum number of days. The default is 200
507
508
  + span: the range of dates. One of 'day', 'week', 'month' or 'year', '2days' or 'weekday'
508
509
  + today: 1 allows today to be included, 2 allows future dates to be included. Default is 0, date list will stop at yesterday
510
+ + step: optional days to add (default is 1)
509
511
 
510
512
  You can use 'span' as follows:
511
513
  + 'day' provides a single day
@@ -830,6 +832,10 @@ This setting can be:
830
832
 
831
833
  # Version Info
832
834
 
835
+ 2.9.5 - 2026/02/27<br>
836
+ Add step parameter to date_list().
837
+ Get maxGroupCount from v3 scheduler and update f.max_periods with maximum number of time periods supported.
838
+
833
839
  2.9.4 - 2026/01/22<br>
834
840
  Rename get_battery_heating(), set_battery_heating() to get_heating() and set_heating().
835
841
  Update get_heating() to return a dictionary to simplify parameter access.
@@ -125,6 +125,7 @@ get_settings() will return the battery settings and is equivalent to get_charge(
125
125
  get_peakshaving() will return the current peak shaving settings for inverters that support this work mode.
126
126
 
127
127
  get_flag() returns the current scheduler enable / support / maxsoc flags. By default support for Max Soc is set to False.
128
+ + f.max_periods / schedule['maxGroupCount'] gives the maximum number of time periods that are supported.
128
129
 
129
130
  get_schedule() returns the current work mode / soc schedule settings. The result is stored in f.schedule.
130
131
  + 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().
@@ -482,7 +483,7 @@ This is an example of the output from battery_info():
482
483
  ## Date Ranges
483
484
 
484
485
  ```
485
- f.date_list(s, e, limit, span, today)
486
+ f.date_list(s, e, limit, span, today, step)
486
487
  ```
487
488
 
488
489
  Returns a list of dates in the format 'YYYY-MM-DD'. This function will not return dates in the future. The last date will be yesterday or today (if today is True). All parameters are optional:
@@ -492,6 +493,7 @@ Returns a list of dates in the format 'YYYY-MM-DD'. This function will not retur
492
493
  + limit: maximum number of days. The default is 200
493
494
  + span: the range of dates. One of 'day', 'week', 'month' or 'year', '2days' or 'weekday'
494
495
  + today: 1 allows today to be included, 2 allows future dates to be included. Default is 0, date list will stop at yesterday
496
+ + step: optional days to add (default is 1)
495
497
 
496
498
  You can use 'span' as follows:
497
499
  + 'day' provides a single day
@@ -816,6 +818,10 @@ This setting can be:
816
818
 
817
819
  # Version Info
818
820
 
821
+ 2.9.5 - 2026/02/27<br>
822
+ Add step parameter to date_list().
823
+ Get maxGroupCount from v3 scheduler and update f.max_periods with maximum number of time periods supported.
824
+
819
825
  2.9.4 - 2026/01/22<br>
820
826
  Rename get_battery_heating(), set_battery_heating() to get_heating() and set_heating().
821
827
  Update get_heating() to return a dictionary to simplify parameter access.
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "foxesscloud"
7
- version = "2.9.4"
7
+ version = "2.9.5"
8
8
  authors = [
9
9
  {name="Tony Matthews", email="tony@quasair.co.uk"},
10
10
  ]
@@ -1,7 +1,7 @@
1
1
  ##################################################################################################
2
2
  """
3
3
  Module: Fox ESS Cloud
4
- Updated: 18 January 2026
4
+ Updated: 11 February 2026
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.11.0"
13
+ version = "1.11.1"
14
14
  print(f"FoxESS-Cloud version {version}")
15
15
 
16
16
  debug_setting = 1
@@ -3821,7 +3821,7 @@ def battery_monitor(interval=30, run=48, log=1, count=None, save=None, overwrite
3821
3821
  # span: 'week', 'month' or 'year' generated dates that span a week, month or year
3822
3822
  # quiet: do not print results if True
3823
3823
 
3824
- def date_list(s = None, e = None, limit = None, span = None, today = 0, quiet = True):
3824
+ def date_list(s = None, e = None, limit = None, span = None, today = 0, quiet = True, step=1):
3825
3825
  global debug_setting
3826
3826
  latest_date = datetime.date(datetime.now())
3827
3827
  today = 0 if today == False else 1 if today == True else today
@@ -3830,7 +3830,6 @@ def date_list(s = None, e = None, limit = None, span = None, today = 0, quiet =
3830
3830
  first = datetime.date(datetime.strptime(s, '%Y-%m-%d')) if type(s) is str else s.date() if s is not None else None
3831
3831
  last = datetime.date(datetime.strptime(e, '%Y-%m-%d')) if type(e) is str else e.date() if e is not None else None
3832
3832
  last = latest_date if last is not None and last > latest_date and today != 2 else last
3833
- step = 1
3834
3833
  if first is None and last is None:
3835
3834
  last = latest_date
3836
3835
  if span is not None:
@@ -1,7 +1,7 @@
1
1
  ##################################################################################################
2
2
  """
3
3
  Module: Fox ESS Cloud using Open API
4
- Updated: 19 January 2025
4
+ Updated: 27 February 2026
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.9.4"
13
+ version = "2.9.5"
14
14
  print(f"FoxESS-Cloud Open API version {version}")
15
15
 
16
16
  debug_setting = 1
@@ -1151,7 +1151,7 @@ max_periods = 8
1151
1151
 
1152
1152
  # get the current switch status
1153
1153
  def get_flag():
1154
- global device_sn, schedule, debug_setting
1154
+ global device_sn, schedule, debug_setting, max_periods
1155
1155
  if get_device() is None:
1156
1156
  return None
1157
1157
  output(f"getting flag", 2)
@@ -1169,6 +1169,17 @@ def get_flag():
1169
1169
  schedule['support'] = result.get('support')
1170
1170
  if device.get('function') is not None and device['function'].get('scheduler') is not None:
1171
1171
  device['function']['scheduler'] = schedule['support']
1172
+ if schedule.get('maxGroupCount') is None:
1173
+ output(f"getting maxGroupCount", 2)
1174
+ body = {'deviceSN': device_sn}
1175
+ response = signed_post(path="/op/v3/device/scheduler/get", body=body)
1176
+ if response.status_code != 200:
1177
+ output(f"** get_flag() got response code getting maxGroupCount {response.status_code}: {response.reason}")
1178
+ return None
1179
+ result = response.json().get('result')
1180
+ if result is not None:
1181
+ schedule['maxGroupCount'] = result.get('maxGroupCount')
1182
+ max_periods = schedule['maxGroupCount']
1172
1183
  return schedule
1173
1184
 
1174
1185
  ##################################################################################################
@@ -3620,7 +3631,7 @@ def battery_monitor(interval=30, run=48, log=1, count=None, save=None, overwrite
3620
3631
  # span: 'week', 'month' or 'year' generated dates that span a week, month or year
3621
3632
  # quiet: do not print results if True
3622
3633
 
3623
- def date_list(s = None, e = None, limit = None, span = None, today = 0, quiet = True):
3634
+ def date_list(s = None, e = None, limit = None, span = None, today = 0, quiet = True, step=1):
3624
3635
  global debug_setting
3625
3636
  latest_date = datetime.date(datetime.now())
3626
3637
  today = 0 if today == False else 1 if today == True else today
@@ -3629,7 +3640,6 @@ def date_list(s = None, e = None, limit = None, span = None, today = 0, quiet =
3629
3640
  first = datetime.date(datetime.strptime(s, '%Y-%m-%d')) if type(s) is str else s.date() if s is not None else None
3630
3641
  last = datetime.date(datetime.strptime(e, '%Y-%m-%d')) if type(e) is str else e.date() if e is not None else None
3631
3642
  last = latest_date if last is not None and last > latest_date and today != 2 else last
3632
- step = 1
3633
3643
  if first is None and last is None:
3634
3644
  last = latest_date
3635
3645
  if span is not None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: foxesscloud
3
- Version: 2.9.4
3
+ Version: 2.9.5
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
@@ -139,6 +139,7 @@ get_settings() will return the battery settings and is equivalent to get_charge(
139
139
  get_peakshaving() will return the current peak shaving settings for inverters that support this work mode.
140
140
 
141
141
  get_flag() returns the current scheduler enable / support / maxsoc flags. By default support for Max Soc is set to False.
142
+ + f.max_periods / schedule['maxGroupCount'] gives the maximum number of time periods that are supported.
142
143
 
143
144
  get_schedule() returns the current work mode / soc schedule settings. The result is stored in f.schedule.
144
145
  + 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().
@@ -496,7 +497,7 @@ This is an example of the output from battery_info():
496
497
  ## Date Ranges
497
498
 
498
499
  ```
499
- f.date_list(s, e, limit, span, today)
500
+ f.date_list(s, e, limit, span, today, step)
500
501
  ```
501
502
 
502
503
  Returns a list of dates in the format 'YYYY-MM-DD'. This function will not return dates in the future. The last date will be yesterday or today (if today is True). All parameters are optional:
@@ -506,6 +507,7 @@ Returns a list of dates in the format 'YYYY-MM-DD'. This function will not retur
506
507
  + limit: maximum number of days. The default is 200
507
508
  + span: the range of dates. One of 'day', 'week', 'month' or 'year', '2days' or 'weekday'
508
509
  + today: 1 allows today to be included, 2 allows future dates to be included. Default is 0, date list will stop at yesterday
510
+ + step: optional days to add (default is 1)
509
511
 
510
512
  You can use 'span' as follows:
511
513
  + 'day' provides a single day
@@ -830,6 +832,10 @@ This setting can be:
830
832
 
831
833
  # Version Info
832
834
 
835
+ 2.9.5 - 2026/02/27<br>
836
+ Add step parameter to date_list().
837
+ Get maxGroupCount from v3 scheduler and update f.max_periods with maximum number of time periods supported.
838
+
833
839
  2.9.4 - 2026/01/22<br>
834
840
  Rename get_battery_heating(), set_battery_heating() to get_heating() and set_heating().
835
841
  Update get_heating() to return a dictionary to simplify parameter access.
File without changes
File without changes