foxesscloud 2.7.6__tar.gz → 2.7.7__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.6 → foxesscloud-2.7.7}/LICENCE +1 -1
- {foxesscloud-2.7.6/src/foxesscloud.egg-info → foxesscloud-2.7.7}/PKG-INFO +7 -3
- {foxesscloud-2.7.6 → foxesscloud-2.7.7}/README.md +6 -2
- {foxesscloud-2.7.6 → foxesscloud-2.7.7}/pyproject.toml +1 -1
- {foxesscloud-2.7.6 → foxesscloud-2.7.7}/src/foxesscloud/foxesscloud.py +16 -10
- {foxesscloud-2.7.6 → foxesscloud-2.7.7}/src/foxesscloud/openapi.py +16 -10
- {foxesscloud-2.7.6 → foxesscloud-2.7.7/src/foxesscloud.egg-info}/PKG-INFO +7 -3
- {foxesscloud-2.7.6 → foxesscloud-2.7.7}/setup.cfg +0 -0
- {foxesscloud-2.7.6 → foxesscloud-2.7.7}/src/foxesscloud.egg-info/SOURCES.txt +0 -0
- {foxesscloud-2.7.6 → foxesscloud-2.7.7}/src/foxesscloud.egg-info/dependency_links.txt +0 -0
- {foxesscloud-2.7.6 → foxesscloud-2.7.7}/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.7
|
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
|
@@ -629,7 +629,7 @@ f.get_pvoutput(d, tou)
|
|
629
629
|
```
|
630
630
|
|
631
631
|
+ d is the date or a list of dates, to get data for. The default is yesterday.
|
632
|
-
+ tou:
|
632
|
+
+ tou: the default, tou=0, does not split data and is more accurate. Setting tou=1 uploads data with time of use. Setting tou=2 integrates all values and allows set_pvoutput() to work with pv inverters that do not provide energy stats.
|
633
633
|
+ setting integrate_load_power to 1 will calculate load energy by integrating the load power instead of using data from Fox. This tries to overcome the limitation where the inverter does not track load power / energy correctly when there is secondary generation. When set to 0 (default), the Fox load energy is used.
|
634
634
|
|
635
635
|
You can copy and paste the output data to the pvoutput data CSV Loader, using the following settings:
|
@@ -652,7 +652,7 @@ f.set_pvoutput(d, system_id, tou, push, run_after)
|
|
652
652
|
|
653
653
|
+ d is optional and is the date, or a list of dates, to upload
|
654
654
|
+ system_id is optional and allow you to select where data is uploaded to (where you have more than 1 registered system)
|
655
|
-
+ tou:
|
655
|
+
+ tou: the default, tou=0, does not split data and is more accurate. Setting tou=1 uploads data with time of use. Setting tou=2 integrates all values and allows set_pvoutput() to work with pv inverters that do not provide energy stats.
|
656
656
|
+ push: optional. 0 = do not sent to pushover, 1 = send summary to pushover, 2 = send first day summary only
|
657
657
|
+ run_after: optional. Only generate data on or after this hour. Default 0.
|
658
658
|
|
@@ -807,6 +807,10 @@ This setting can be:
|
|
807
807
|
|
808
808
|
# Version Info
|
809
809
|
|
810
|
+
2.7.7<br>
|
811
|
+
Updates to get_pvoutput() to support solar inverters that don't provide grid energy by setting tou=2.
|
812
|
+
Default tariff changed to None.
|
813
|
+
|
810
814
|
2.7.6<br>
|
811
815
|
Updates to support F, G, R and S series inverters.
|
812
816
|
Updates to set_named_settings() to load metadata if not already done and save new value.
|
@@ -615,7 +615,7 @@ f.get_pvoutput(d, tou)
|
|
615
615
|
```
|
616
616
|
|
617
617
|
+ d is the date or a list of dates, to get data for. The default is yesterday.
|
618
|
-
+ tou:
|
618
|
+
+ tou: the default, tou=0, does not split data and is more accurate. Setting tou=1 uploads data with time of use. Setting tou=2 integrates all values and allows set_pvoutput() to work with pv inverters that do not provide energy stats.
|
619
619
|
+ setting integrate_load_power to 1 will calculate load energy by integrating the load power instead of using data from Fox. This tries to overcome the limitation where the inverter does not track load power / energy correctly when there is secondary generation. When set to 0 (default), the Fox load energy is used.
|
620
620
|
|
621
621
|
You can copy and paste the output data to the pvoutput data CSV Loader, using the following settings:
|
@@ -638,7 +638,7 @@ f.set_pvoutput(d, system_id, tou, push, run_after)
|
|
638
638
|
|
639
639
|
+ d is optional and is the date, or a list of dates, to upload
|
640
640
|
+ system_id is optional and allow you to select where data is uploaded to (where you have more than 1 registered system)
|
641
|
-
+ tou:
|
641
|
+
+ tou: the default, tou=0, does not split data and is more accurate. Setting tou=1 uploads data with time of use. Setting tou=2 integrates all values and allows set_pvoutput() to work with pv inverters that do not provide energy stats.
|
642
642
|
+ push: optional. 0 = do not sent to pushover, 1 = send summary to pushover, 2 = send first day summary only
|
643
643
|
+ run_after: optional. Only generate data on or after this hour. Default 0.
|
644
644
|
|
@@ -793,6 +793,10 @@ This setting can be:
|
|
793
793
|
|
794
794
|
# Version Info
|
795
795
|
|
796
|
+
2.7.7<br>
|
797
|
+
Updates to get_pvoutput() to support solar inverters that don't provide grid energy by setting tou=2.
|
798
|
+
Default tariff changed to None.
|
799
|
+
|
796
800
|
2.7.6<br>
|
797
801
|
Updates to support F, G, R and S series inverters.
|
798
802
|
Updates to set_named_settings() to load metadata if not already done and save new value.
|
@@ -1,7 +1,7 @@
|
|
1
1
|
##################################################################################################
|
2
2
|
"""
|
3
3
|
Module: Fox ESS Cloud
|
4
|
-
Updated:
|
4
|
+
Updated: 11 January 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.8.
|
13
|
+
version = "1.8.8"
|
14
14
|
print(f"FoxESS-Cloud version {version}")
|
15
15
|
|
16
16
|
debug_setting = 1
|
@@ -2380,7 +2380,7 @@ custom_periods = {'name': 'Custom',
|
|
2380
2380
|
}
|
2381
2381
|
|
2382
2382
|
tariff_list = [octopus_flux, intelligent_octopus, octopus_cosy, octopus_go, agile_octopus, bg_driver, eon_drive, economy_7, custom_periods]
|
2383
|
-
tariff =
|
2383
|
+
tariff = None
|
2384
2384
|
|
2385
2385
|
##################################################################################################
|
2386
2386
|
# Strategy - schedule templates
|
@@ -3857,18 +3857,19 @@ integrate_load_power = 0
|
|
3857
3857
|
##################################################################################################
|
3858
3858
|
|
3859
3859
|
# get pvoutput data for upload to pvoutput api or via Bulk Loader
|
3860
|
-
# tou: 0 = no time of use, 1 = use time of use periods if available
|
3860
|
+
# tou: 0 = no time of use, 1 = use time of use periods if available, 2 = integrate all values
|
3861
3861
|
|
3862
3862
|
def get_pvoutput(d = None, tou = 0):
|
3863
3863
|
global tariff, pv_calibration, ct2_calibration, integrate_load_power
|
3864
3864
|
if d is None:
|
3865
3865
|
d = date_list()[0]
|
3866
|
-
tou = 0 if tariff is None else 1 if tou == 1 or tou == True else 0
|
3867
3866
|
if type(d) is list:
|
3868
3867
|
print(f"---------------- get_pvoutput ------------------")
|
3869
3868
|
print(f"Date range {d[0]} to {d[-1]} has {len(d)} days")
|
3870
3869
|
if tou == 1:
|
3871
3870
|
print(f"Time of use: {tariff['name']}")
|
3871
|
+
elif tou == 2:
|
3872
|
+
print(f"All values integrated from power")
|
3872
3873
|
if integrate_load_power == 1:
|
3873
3874
|
print(f"Consumption integrated from Load Power")
|
3874
3875
|
print(f"------------------------------------------------")
|
@@ -3882,12 +3883,15 @@ def get_pvoutput(d = None, tou = 0):
|
|
3882
3883
|
v = ['feedin', 'gridConsumption']
|
3883
3884
|
if integrate_load_power == 0:
|
3884
3885
|
v.append('loads')
|
3885
|
-
|
3886
|
-
|
3887
|
-
|
3886
|
+
if tou == 2:
|
3887
|
+
report_data = []
|
3888
|
+
else:
|
3889
|
+
report_data = get_report('day', d=d, v=v, summary=2)
|
3890
|
+
if report_data is None:
|
3891
|
+
return None
|
3888
3892
|
# get raw power data for the day
|
3889
|
-
v = ['pvPower', 'meterPower2', 'feedinPower', 'gridConsumptionPower'] if tou
|
3890
|
-
if integrate_load_power == 1:
|
3893
|
+
v = ['pvPower', 'meterPower2', 'feedinPower', 'gridConsumptionPower'] if tou > 0 else ['pvPower', 'meterPower2']
|
3894
|
+
if integrate_load_power == 1 or tou == 2:
|
3891
3895
|
v.append('loadsPower')
|
3892
3896
|
raw_data = get_raw('day', d=d + ' 00:00:00', v=v , summary=1)
|
3893
3897
|
if raw_data is None or len(raw_data) == 0 or raw_data[0].get('kwh') is None or raw_data[0].get('max') is None:
|
@@ -3937,10 +3941,12 @@ def get_pvoutput(d = None, tou = 0):
|
|
3937
3941
|
generate = f"{wh},"
|
3938
3942
|
power = f"{int(var['max'] * 1000)},{var['max_time']},"
|
3939
3943
|
elif var['variable'] == 'feedinPower':
|
3944
|
+
export_wh = wh if tou == 2 else export_wh
|
3940
3945
|
calibrate = export_wh / wh if wh > 0.0 else 1.0
|
3941
3946
|
export = f","
|
3942
3947
|
export_tou = f"{int(peak * calibrate)},{int(off_peak * calibrate)},{int((wh - peak - off_peak) * calibrate)},0"
|
3943
3948
|
elif var['variable'] == 'gridConsumptionPower':
|
3949
|
+
grid_wh = wh if tou == 2 else grid_wh
|
3944
3950
|
calibrate = grid_wh / wh if wh > 0.0 else 1.0
|
3945
3951
|
grid = f"{int(peak * calibrate)},{int(off_peak * calibrate)},{int((wh - peak - off_peak) * calibrate)},0,"
|
3946
3952
|
elif var['variable'] == 'loadsPower':
|
@@ -1,7 +1,7 @@
|
|
1
1
|
##################################################################################################
|
2
2
|
"""
|
3
3
|
Module: Fox ESS Cloud using Open API
|
4
|
-
Updated:
|
4
|
+
Updated: 11 January 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.7.
|
13
|
+
version = "2.7.7"
|
14
14
|
print(f"FoxESS-Cloud Open API version {version}")
|
15
15
|
|
16
16
|
debug_setting = 1
|
@@ -2052,7 +2052,7 @@ custom_periods = {'name': 'Custom',
|
|
2052
2052
|
}
|
2053
2053
|
|
2054
2054
|
tariff_list = [octopus_flux, intelligent_octopus, octopus_cosy, octopus_go, agile_octopus, bg_driver, eon_drive, economy_7, custom_periods]
|
2055
|
-
tariff =
|
2055
|
+
tariff = None
|
2056
2056
|
|
2057
2057
|
##################################################################################################
|
2058
2058
|
# Strategy - schedule templates
|
@@ -3529,18 +3529,19 @@ integrate_load_power = 0
|
|
3529
3529
|
##################################################################################################
|
3530
3530
|
|
3531
3531
|
# get pvoutput data for upload to pvoutput api or via Bulk Loader
|
3532
|
-
# tou: 0 = no time of use, 1 = use time of use periods if available
|
3532
|
+
# tou: 0 = no time of use, 1 = use time of use periods if available, 2 = integrate all values
|
3533
3533
|
|
3534
3534
|
def get_pvoutput(d = None, tou = 0):
|
3535
3535
|
global tariff, pv_calibration, ct2_calibration, integrate_load_power
|
3536
3536
|
if d is None:
|
3537
3537
|
d = date_list()[0]
|
3538
|
-
tou = 0 if tariff is None else 1 if tou == 1 or tou == True else 0
|
3539
3538
|
if type(d) is list:
|
3540
3539
|
print(f"---------------- get_pvoutput ------------------")
|
3541
3540
|
print(f"Date range {d[0]} to {d[-1]} has {len(d)} days")
|
3542
3541
|
if tou == 1:
|
3543
3542
|
print(f"Time of use: {tariff['name']}")
|
3543
|
+
elif tou == 2:
|
3544
|
+
print(f"All values integrated from power")
|
3544
3545
|
if integrate_load_power == 1:
|
3545
3546
|
print(f"Consumption integrated from Load Power")
|
3546
3547
|
print(f"------------------------------------------------")
|
@@ -3554,12 +3555,15 @@ def get_pvoutput(d = None, tou = 0):
|
|
3554
3555
|
v = ['feedin', 'gridConsumption']
|
3555
3556
|
if integrate_load_power == 0:
|
3556
3557
|
v.append('loads')
|
3557
|
-
|
3558
|
-
|
3559
|
-
|
3558
|
+
if tou == 2:
|
3559
|
+
report_data = []
|
3560
|
+
else:
|
3561
|
+
report_data = get_report('day', d=d, v=v, summary=2)
|
3562
|
+
if report_data is None:
|
3563
|
+
return None
|
3560
3564
|
# get raw power data for the day
|
3561
|
-
v = ['pvPower', 'meterPower2', 'feedinPower', 'gridConsumptionPower'] if tou
|
3562
|
-
if integrate_load_power == 1:
|
3565
|
+
v = ['pvPower', 'meterPower2', 'feedinPower', 'gridConsumptionPower'] if tou > 0 else ['pvPower', 'meterPower2']
|
3566
|
+
if integrate_load_power == 1 or tou == 2:
|
3563
3567
|
v.append('loadsPower')
|
3564
3568
|
raw_data = get_raw('day', d=d + ' 00:00:00', v=v , summary=1)
|
3565
3569
|
if raw_data is None or len(raw_data) == 0 or raw_data[0].get('kwh') is None or raw_data[0].get('max') is None:
|
@@ -3609,10 +3613,12 @@ def get_pvoutput(d = None, tou = 0):
|
|
3609
3613
|
generate = f"{wh},"
|
3610
3614
|
power = f"{int(var['max'] * 1000)},{var['max_time']},"
|
3611
3615
|
elif var['variable'] == 'feedinPower':
|
3616
|
+
export_wh = wh if tou == 2 else export_wh
|
3612
3617
|
calibrate = export_wh / wh if wh > 0.0 else 1.0
|
3613
3618
|
export = f","
|
3614
3619
|
export_tou = f"{int(peak * calibrate)},{int(off_peak * calibrate)},{int((wh - peak - off_peak) * calibrate)},0"
|
3615
3620
|
elif var['variable'] == 'gridConsumptionPower':
|
3621
|
+
grid_wh = wh if tou == 2 else grid_wh
|
3616
3622
|
calibrate = grid_wh / wh if wh > 0.0 else 1.0
|
3617
3623
|
grid = f"{int(peak * calibrate)},{int(off_peak * calibrate)},{int((wh - peak - off_peak) * calibrate)},0,"
|
3618
3624
|
elif var['variable'] == 'loadsPower':
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: foxesscloud
|
3
|
-
Version: 2.7.
|
3
|
+
Version: 2.7.7
|
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
|
@@ -629,7 +629,7 @@ f.get_pvoutput(d, tou)
|
|
629
629
|
```
|
630
630
|
|
631
631
|
+ d is the date or a list of dates, to get data for. The default is yesterday.
|
632
|
-
+ tou:
|
632
|
+
+ tou: the default, tou=0, does not split data and is more accurate. Setting tou=1 uploads data with time of use. Setting tou=2 integrates all values and allows set_pvoutput() to work with pv inverters that do not provide energy stats.
|
633
633
|
+ setting integrate_load_power to 1 will calculate load energy by integrating the load power instead of using data from Fox. This tries to overcome the limitation where the inverter does not track load power / energy correctly when there is secondary generation. When set to 0 (default), the Fox load energy is used.
|
634
634
|
|
635
635
|
You can copy and paste the output data to the pvoutput data CSV Loader, using the following settings:
|
@@ -652,7 +652,7 @@ f.set_pvoutput(d, system_id, tou, push, run_after)
|
|
652
652
|
|
653
653
|
+ d is optional and is the date, or a list of dates, to upload
|
654
654
|
+ system_id is optional and allow you to select where data is uploaded to (where you have more than 1 registered system)
|
655
|
-
+ tou:
|
655
|
+
+ tou: the default, tou=0, does not split data and is more accurate. Setting tou=1 uploads data with time of use. Setting tou=2 integrates all values and allows set_pvoutput() to work with pv inverters that do not provide energy stats.
|
656
656
|
+ push: optional. 0 = do not sent to pushover, 1 = send summary to pushover, 2 = send first day summary only
|
657
657
|
+ run_after: optional. Only generate data on or after this hour. Default 0.
|
658
658
|
|
@@ -807,6 +807,10 @@ This setting can be:
|
|
807
807
|
|
808
808
|
# Version Info
|
809
809
|
|
810
|
+
2.7.7<br>
|
811
|
+
Updates to get_pvoutput() to support solar inverters that don't provide grid energy by setting tou=2.
|
812
|
+
Default tariff changed to None.
|
813
|
+
|
810
814
|
2.7.6<br>
|
811
815
|
Updates to support F, G, R and S series inverters.
|
812
816
|
Updates to set_named_settings() to load metadata if not already done and save new value.
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|