foxesscloud 2.8.1__tar.gz → 2.8.2__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.8.1
3
+ Version: 2.8.2
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
@@ -620,6 +620,17 @@ Plunge pricing allows for the automatic configuration of charging periods when A
620
620
  # PV Output
621
621
  These functions produce CSV data for upload to [pvoutput.org](https://pvoutput.org) including PV generation, Export, Load and Grid consumption by day in Wh. The functions use the energy estimates created from the raw power data (see above). The estimates include PV energy generation that are not otherwise available from the Fox Cloud. Typically, the energy results are within 3% of the values reported by the meters built into the inverter.
622
622
 
623
+ ## Calibration
624
+ PV generation data is created using the Riemann sum of the PV power and CT2 power as the history of the stats provided by the Fox cloud can be unreliable. You can change the calibration factors used:
625
+
626
+ ```
627
+ f.pv_calibration = 0.98
628
+ f.ct2_calibration = 0.92
629
+ ```
630
+ * pv_calibration is a DC calibration factor and is multiplied by the Riemann sum. The default calibration factor of 0.98 was derrived by comparing the total solar production calculated against the inverter generation data provided via Modbus over 12 months
631
+
632
+ * ct2_calibration is an AC calibration factor and is the divisor for the Riemann sum. CT2 measures the AC power output by the inverter and this factor converts this back to the DC power coming from the solar panels into the inverter, assuming an MPPT efficiency of 95% and DC-AC conversion efficiency of 97%. This aligns the solar panel generation with PV power, allowing the total solar generation from both primary (connected to the hybrid inverter) and secondary (connected via a separate solar inverter) panels to be combined correctly.
633
+
623
634
 
624
635
  ## Get PV Output Data
625
636
 
@@ -809,6 +820,10 @@ This setting can be:
809
820
 
810
821
  # Version Info
811
822
 
823
+ 2.8.2<br>
824
+ Fix forecast.solar (after change to start parameter processing).
825
+ Change logic around battery status so 0 is offline and others values are online.
826
+
812
827
  2.8.1<br>
813
828
  Update from v0 to v1 for scheduler API.
814
829
  PVEnergyTotal added to report variables.
@@ -1,17 +1,3 @@
1
- Metadata-Version: 2.1
2
- Name: foxesscloud
3
- Version: 2.8.1
4
- Summary: library for accessing Fox ESS cloud data using Open API
5
- Author-email: Tony Matthews <tony@quasair.co.uk>
6
- Project-URL: Homepage, https://github.com/TonyM1958/FoxESS-Cloud
7
- Project-URL: Bug Tracker, https://github.com/TonyM1958/FoxESS-Cloud/issues
8
- Classifier: Programming Language :: Python :: 3
9
- Classifier: License :: OSI Approved :: MIT License
10
- Classifier: Operating System :: OS Independent
11
- Requires-Python: >=3.7
12
- Description-Content-Type: text/markdown
13
- License-File: LICENCE
14
-
15
1
  # FoxESS-Cloud
16
2
 
17
3
  <a href="https://www.buymeacoffee.com/tonym1958" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" height="41" width="174" align="right"></a>
@@ -620,6 +606,17 @@ Plunge pricing allows for the automatic configuration of charging periods when A
620
606
  # PV Output
621
607
  These functions produce CSV data for upload to [pvoutput.org](https://pvoutput.org) including PV generation, Export, Load and Grid consumption by day in Wh. The functions use the energy estimates created from the raw power data (see above). The estimates include PV energy generation that are not otherwise available from the Fox Cloud. Typically, the energy results are within 3% of the values reported by the meters built into the inverter.
622
608
 
609
+ ## Calibration
610
+ PV generation data is created using the Riemann sum of the PV power and CT2 power as the history of the stats provided by the Fox cloud can be unreliable. You can change the calibration factors used:
611
+
612
+ ```
613
+ f.pv_calibration = 0.98
614
+ f.ct2_calibration = 0.92
615
+ ```
616
+ * pv_calibration is a DC calibration factor and is multiplied by the Riemann sum. The default calibration factor of 0.98 was derrived by comparing the total solar production calculated against the inverter generation data provided via Modbus over 12 months
617
+
618
+ * ct2_calibration is an AC calibration factor and is the divisor for the Riemann sum. CT2 measures the AC power output by the inverter and this factor converts this back to the DC power coming from the solar panels into the inverter, assuming an MPPT efficiency of 95% and DC-AC conversion efficiency of 97%. This aligns the solar panel generation with PV power, allowing the total solar generation from both primary (connected to the hybrid inverter) and secondary (connected via a separate solar inverter) panels to be combined correctly.
619
+
623
620
 
624
621
  ## Get PV Output Data
625
622
 
@@ -809,6 +806,10 @@ This setting can be:
809
806
 
810
807
  # Version Info
811
808
 
809
+ 2.8.2<br>
810
+ Fix forecast.solar (after change to start parameter processing).
811
+ Change logic around battery status so 0 is offline and others values are online.
812
+
812
813
  2.8.1<br>
813
814
  Update from v0 to v1 for scheduler API.
814
815
  PVEnergyTotal added to report variables.
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "foxesscloud"
7
- version = "2.8.1"
7
+ version = "2.8.2"
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: 12 March 2025
4
+ Updated: 09 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.3"
13
+ version = "1.9.4"
14
14
  print(f"FoxESS-Cloud version {version}")
15
15
 
16
16
  debug_setting = 1
@@ -657,11 +657,10 @@ def get_battery(info=1, rated=None, count=None):
657
657
  battery['soh'] = None
658
658
  battery['soh_supported'] = False
659
659
  if battery.get('status') is None:
660
- battery['status'] = 0 if battery.get('volt') is None or battery['volt'] <= 0 else 1
661
- if battery.get('status') is None or battery['status'] != 1:
660
+ battery['status'] = 0 if battery.get('volt') is None or battery['volt'] <= 10 else 1
661
+ if battery.get('status') is None or battery['status'] == 0:
662
662
  output(f"** get_battery(): battery status not available")
663
663
  return None
664
- battery['status'] = 1
665
664
  if battery.get('residual') is not None:
666
665
  battery['residual'] *= residual_scale / 10
667
666
  if battery['residual_handling'] == 2:
@@ -736,7 +735,7 @@ def get_batteries(info=1, rated=None, count=None):
736
735
  while len(count) < len(batteries):
737
736
  count.append(None)
738
737
  for i,b in enumerate(batteries):
739
- if b.get('status') is None or b['status'] != 1:
738
+ if b.get('status') is None or b['status'] == 0:
740
739
  output(f"** get_batteries(): battery {i+1} status not available")
741
740
  continue
742
741
  b['residual_handling'] = residual_handling
@@ -755,7 +754,7 @@ def get_batteries(info=1, rated=None, count=None):
755
754
  b['soh'] = int(soh) if soh.isnumeric() and int(soh) > 10 else None
756
755
  b['soh_supported'] = b['soh'] is not None
757
756
  for i, b in enumerate(batteries):
758
- if b.get('status') is None or b['status'] != 1:
757
+ if b.get('status') is None or b['status'] == 0:
759
758
  continue
760
759
  if i == 0:
761
760
  residual_handling = b['residual_handling']
@@ -973,6 +972,7 @@ merge_settings = { # keys to add
973
972
  'h116__': 'operation_mode__work_mode',
974
973
  'h117__': 'operation_mode__work_mode',
975
974
  # 'k106__': 'operation_mode__work_mode',
975
+ # 'k110__': 'operation_mode__work_mode',
976
976
  },
977
977
  'values': ['SelfUse', 'Feedin', 'Backup']},
978
978
  'ExportLimit': {'keys': {
@@ -980,6 +980,7 @@ merge_settings = { # keys to add
980
980
  'h116__': 'basic2__05',
981
981
  'h117__': 'basic2__05',
982
982
  # 'k106__': 'basic2__05',
983
+ # 'k1110__': 'basic2__05',
983
984
  },
984
985
  'valueType': 'int'},
985
986
  'BatteryVolt': {'keys': {
@@ -987,6 +988,7 @@ merge_settings = { # keys to add
987
988
  'h116__': ['h116__15', 'h116__16', 'h116__17'],
988
989
  'h117__': ['h117__15', 'h117__16', 'h117__17'],
989
990
  # 'k106__': ['k106__xx', 'k106__xx', 'k106__xx'],
991
+ # 'k110__': ['k110__xx', 'k110__xx', 'k110__xx'],
990
992
  },
991
993
  'type': 'list',
992
994
  'valueType': 'float',
@@ -996,6 +998,7 @@ merge_settings = { # keys to add
996
998
  'h116__': 'h116__18',
997
999
  'h117__': 'h117__18',
998
1000
  # 'k106__': 'k106__xx',
1001
+ # 'k110__': 'k110__xx',
999
1002
  },
1000
1003
  'type': 'list',
1001
1004
  'valueType': 'int',
@@ -3089,7 +3092,7 @@ def charge_needed(forecast=None, consumption=None, update_settings=0, timed_mode
3089
3092
  else:
3090
3093
  # get device and battery info from inverter
3091
3094
  get_battery()
3092
- if battery is None or battery['status'] != 1:
3095
+ if battery is None or battery['status'] == 0:
3093
3096
  return None
3094
3097
  current_soc = battery['soc']
3095
3098
  bat_volt = battery['volt']
@@ -4485,7 +4488,7 @@ class Solar :
4485
4488
  if debug_setting > 0 and not quiet:
4486
4489
  print(f"Getting data for {name} array")
4487
4490
  path = f"{a['lat']}/{a['lon']}/{a['dec']}/{a['az']}/{a['kwp']}"
4488
- params = {'start': '00:00', 'no_sun': 1, 'damping': a['dam'], 'inverter': a['inv'], 'horizon': a['hor']}
4491
+ params = {'no_sun': 1, 'damping': a['dam'], 'inverter': a['inv'], 'horizon': a['hor']}
4489
4492
  response = requests.get(solar_url + self.api_key + 'estimate/' + path, params = params)
4490
4493
  if response.status_code != 200:
4491
4494
  if response.status_code == 429:
@@ -1,7 +1,7 @@
1
1
  ##################################################################################################
2
2
  """
3
3
  Module: Fox ESS Cloud using Open API
4
- Updated: 12 March 2025
4
+ Updated: 09 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.1"
13
+ version = "2.8.2"
14
14
  print(f"FoxESS-Cloud Open API version {version}")
15
15
 
16
16
  debug_setting = 1
@@ -597,11 +597,10 @@ def get_battery(info=0, v=None, rated=None, count=None):
597
597
  battery['soh'] = None
598
598
  battery['soh_supported'] = False
599
599
  if battery.get('status') is None:
600
- battery['status'] = 0 if battery.get('volt') is None or battery['volt'] <= 0 else 1
601
- if battery['status'] != 1:
600
+ battery['status'] = 0 if battery.get('volt') is None or battery['volt'] <= 10 else 1
601
+ if battery['status'] == 0:
602
602
  output(f"** get_battery(): battery status not available")
603
603
  return None
604
- battery['status'] = 1
605
604
  if battery['residual_handling'] == 2:
606
605
  capacity = battery.get('residual')
607
606
  soc = battery.get('soc')
@@ -628,7 +627,6 @@ def get_battery(info=0, v=None, rated=None, count=None):
628
627
  battery['ratedCapacity'] = rated
629
628
  battery['capacity'] = round(capacity, 3)
630
629
  battery['residual'] = round(residual, 3)
631
- battery['status'] = 1
632
630
  battery['charge_rate'] = None
633
631
  params = battery_params[battery['residual_handling']]
634
632
  battery['charge_loss'] = params['charge_loss']
@@ -2756,7 +2754,7 @@ def charge_needed(forecast=None, consumption=None, update_settings=0, timed_mode
2756
2754
  else:
2757
2755
  # get device and battery info from inverter
2758
2756
  get_battery()
2759
- if battery is None or battery['status'] != 1:
2757
+ if battery is None or battery['status'] == 0:
2760
2758
  return None
2761
2759
  current_soc = battery['soc']
2762
2760
  bat_volt = battery['volt']
@@ -4153,7 +4151,7 @@ class Solar :
4153
4151
  if debug_setting > 0 and not quiet:
4154
4152
  print(f"Getting data for {name} array")
4155
4153
  path = f"{a['lat']}/{a['lon']}/{a['dec']}/{a['az']}/{a['kwp']}"
4156
- params = {'start': '00:00', 'no_sun': 1, 'damping': a['dam'], 'inverter': a['inv'], 'horizon': a['hor']}
4154
+ params = {'no_sun': 1, 'damping': a['dam'], 'inverter': a['inv'], 'horizon': a['hor']}
4157
4155
  response = requests.get(solar_url + self.api_key + 'estimate/' + path, params = params)
4158
4156
  if response.status_code != 200:
4159
4157
  if response.status_code == 429:
@@ -1,3 +1,17 @@
1
+ Metadata-Version: 2.1
2
+ Name: foxesscloud
3
+ Version: 2.8.2
4
+ Summary: library for accessing Fox ESS cloud data using Open API
5
+ Author-email: Tony Matthews <tony@quasair.co.uk>
6
+ Project-URL: Homepage, https://github.com/TonyM1958/FoxESS-Cloud
7
+ Project-URL: Bug Tracker, https://github.com/TonyM1958/FoxESS-Cloud/issues
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Operating System :: OS Independent
11
+ Requires-Python: >=3.7
12
+ Description-Content-Type: text/markdown
13
+ License-File: LICENCE
14
+
1
15
  # FoxESS-Cloud
2
16
 
3
17
  <a href="https://www.buymeacoffee.com/tonym1958" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" height="41" width="174" align="right"></a>
@@ -606,6 +620,17 @@ Plunge pricing allows for the automatic configuration of charging periods when A
606
620
  # PV Output
607
621
  These functions produce CSV data for upload to [pvoutput.org](https://pvoutput.org) including PV generation, Export, Load and Grid consumption by day in Wh. The functions use the energy estimates created from the raw power data (see above). The estimates include PV energy generation that are not otherwise available from the Fox Cloud. Typically, the energy results are within 3% of the values reported by the meters built into the inverter.
608
622
 
623
+ ## Calibration
624
+ PV generation data is created using the Riemann sum of the PV power and CT2 power as the history of the stats provided by the Fox cloud can be unreliable. You can change the calibration factors used:
625
+
626
+ ```
627
+ f.pv_calibration = 0.98
628
+ f.ct2_calibration = 0.92
629
+ ```
630
+ * pv_calibration is a DC calibration factor and is multiplied by the Riemann sum. The default calibration factor of 0.98 was derrived by comparing the total solar production calculated against the inverter generation data provided via Modbus over 12 months
631
+
632
+ * ct2_calibration is an AC calibration factor and is the divisor for the Riemann sum. CT2 measures the AC power output by the inverter and this factor converts this back to the DC power coming from the solar panels into the inverter, assuming an MPPT efficiency of 95% and DC-AC conversion efficiency of 97%. This aligns the solar panel generation with PV power, allowing the total solar generation from both primary (connected to the hybrid inverter) and secondary (connected via a separate solar inverter) panels to be combined correctly.
633
+
609
634
 
610
635
  ## Get PV Output Data
611
636
 
@@ -795,6 +820,10 @@ This setting can be:
795
820
 
796
821
  # Version Info
797
822
 
823
+ 2.8.2<br>
824
+ Fix forecast.solar (after change to start parameter processing).
825
+ Change logic around battery status so 0 is offline and others values are online.
826
+
798
827
  2.8.1<br>
799
828
  Update from v0 to v1 for scheduler API.
800
829
  PVEnergyTotal added to report variables.
File without changes
File without changes