foxesscloud 2.5.8__tar.gz → 2.6.0__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.5.8
3
+ Version: 2.6.0
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
@@ -116,7 +116,12 @@ Each of these calls will return a dictionary or list containing the relevant inf
116
116
 
117
117
  get_generation() will return the latest generation information for the device. The results are also stored in f.device as 'generationToday', 'generationMonth' and 'generationTotal'.
118
118
 
119
- get_battery() returns the current battery status, including 'soc', 'volt', 'current', 'power', 'temperature' and 'residual'. The result also updates f.battery.
119
+ get_battery() returns the current battery status, including 'soc', 'volt', 'current', 'power', 'temperature' and 'residual'. The result also updates f.battery. Additional battery attributes include:
120
+ + 'info': a list of BMS and battery serial numbers and firmware versions
121
+ + 'capacity': the estimated battery capacity, derrived from 'residual' and 'soc'
122
+ + 'charge_rate': the estimated BMS charge rate available, based on the current 'temperature' of the BMS
123
+ + 'charge_loss': the ratio of the kWh added to the battery for each kWh applied during charging
124
+ + 'discharge_loss': the ratio of the kWh available for each kWh removed from the battery during during discharging
120
125
 
121
126
  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.
122
127
 
@@ -363,44 +368,41 @@ Given the data available, the modelling works as follows:
363
368
 
364
369
  The following parameters and default values are used to configure charge_needed and may be updated if required using name=value:
365
370
  ```
366
- contingency: [20,10,5,10] # % of consumption. Single or [winter, spring, summer, autumn] values
367
- capacity: None # Battery capacity in kWh (over-rides generated value if set)
368
- charge_current: None # max battery charge current setting in A. None uses a value derrived from the inverter model
369
- discharge_current: None # max battery discharge current setting in A. None uses a value derrived from the inverter model
370
- export_limit: None # maximum export power in kW. None uses the inverter power rating
371
- discharge_loss: 0.98 # loss converting battery discharge power to grid power
372
- pv_loss: 0.95 # loss converting PV power to battery charge power
373
- grid_loss: 0.975 # loss converting grid power to battery charge power
374
- inverter_power: None # inverter power consumption in W (dynamically set)
375
- bms_power: 50 # BMS power consumption in W
376
- force_charge_power: 5.00 # power used when Force Charge is scheduled
377
- allowed_drain: 4, # % tolerance below min_soc before float charge starts
378
- float_current: 4, # BMS float charge current in A
379
- bat_resistance: 0.070 # internal resistance of a battery in ohms
380
- volt_curve: lifepo4_curve # battery OCV from 0% to 100% SoC
381
- nominal_soc: 55 # SoC for nominal open circuit voltage
382
- generation_days: 3 # number of days to use for average generation (1-7)
383
- consumption_days: 3 # number of days to use for average consumption (1-7)
384
- consumption_span: 'week' # 'week' = last 7 days or 'weekday' = last 7 weekdays e.g. Saturdays
385
- use_today: 21.0 # hour when today's generation and consumption data will be used
386
- min_hours: 0.25 # minimum charge time to set (in decimal hours)
387
- min_kwh: 0.5 # minimum charge to add in kwh
388
- solcast_adjust: 100 # % adjustment to make to Solcast forecast
389
- solar_adjust: 100 # % adjustment to make to Solar forecast
390
- forecast_selection: 1 # 1 = only update charge times if forecast is available, 0 = use best available data. Default is 1.
391
- annual_consumption: None # optional annual consumption in kWh. If set, this replaces consumption history
392
- timed_mode: 0 # 0 = None, 1 = use timed work mode, 2 = strategy mode
393
- special_contingency: 30 # contingency for special days when consumption might be higher
371
+ contingency: [20,10,5,10] # % of consumption. Single or [winter, spring, summer, autumn] values
372
+ capacity: None # Battery capacity in kWh (over-rides generated value if set)
373
+ charge_current: None # max battery charge current setting in A. None uses a value derrived from the inverter model
374
+ discharge_current: None # max battery discharge current setting in A. None uses a value derrived from the inverter model
375
+ export_limit: None # maximum export power in kW. None uses the inverter power rating
376
+ dc_ac_loss: 0.970 # loss converting battery DC power to AC grid power
377
+ pv_loss: 0.950 # loss converting PV power to DC battery charge power
378
+ ac_dc_loss: 0.960 # loss converting AC grid power to DC battery charge power
379
+ inverter_power: None # inverter power consumption in W (dynamically set)
380
+ bms_power: 50 # BMS power consumption in W
381
+ force_charge_power: 5.00 # power used when Force Charge is scheduled
382
+ allowed_drain: 4, # % tolerance below min_soc before float charge starts
383
+ float_current: 4, # BMS float charge current in A
384
+ bat_resistance: 0.070 # internal resistance of a battery in ohms
385
+ volt_curve: lifepo4_curve # battery OCV from 0% to 100% SoC
386
+ nominal_soc: 55 # SoC for nominal open circuit voltage
387
+ generation_days: 3 # number of days to use for average generation (1-7)
388
+ consumption_days: 3 # number of days to use for average consumption (1-7)
389
+ consumption_span: 'week' # 'week' = last 7 days or 'weekday' = last 7 weekdays e.g. Saturdays
390
+ use_today: 21.0 # hour when today's generation and consumption data will be used
391
+ min_hours: 0.25 # minimum charge time to set (in decimal hours)
392
+ min_kwh: 0.5 # minimum charge to add in kwh
393
+ solcast_adjust: 100 # % adjustment to make to Solcast forecast
394
+ solar_adjust: 100 # % adjustment to make to Solar forecast
395
+ forecast_selection: 1 # 1 = only update charge times if forecast is available, 0 = use best available data. Default is 1.
396
+ annual_consumption: None # optional annual consumption in kWh. If set, this replaces consumption history
397
+ timed_mode: 0 # 0 = None, 1 = use timed work mode, 2 = strategy mode
398
+ special_contingency: 30 # contingency for special days when consumption might be higher
394
399
  special_days: ['12-25', '12-26', '01-01']
395
- full_charge: None # day of month (1-28) to do full charge or 'daily' or day of week: 'Mon', 'Tue' etc
396
- derate_temp: 21 # battery temperature in C when derating charge current is applied
397
- derate_step: 5 # step size for derating e.g. 21, 16, 11
398
- derating: [24, 15, 10, 2] # derated charge current for each temperature step e.g. 21C, 16C, 11C, 6C
399
- force: 1 # 1 = disable strategy periods when setting charge. 0 = fail if strategy period has been set.
400
- data_wrap: 6 # data items to show per line
401
- target_soc: None # target soc for charging
402
- shading: {} # effect of shading on Solcast / Solar (see below)
403
- save: 'charge_needed.txt' # where to save calculation data for charge_compare(). '###' gets replaced with todays date.
400
+ full_charge: None # day of month (1-28) to do full charge or 'daily' or day of week: 'Mon', 'Tue' etc
401
+ force: 1 # 1 = disable strategy periods when setting charge. 0 = fail if strategy period has been set.
402
+ data_wrap: 6 # data items to show per line
403
+ target_soc: None # target soc for charging (over-rides calculated value)
404
+ shading: {} # effect of shading on Solcast / Solar (see below)
405
+ save: 'charge_needed.txt' # where to save calculation data for charge_compare(). '###' gets replaced with todays date.
404
406
  ```
405
407
 
406
408
  These values are stored / available in f.charge_config.
@@ -784,6 +786,14 @@ This setting can be:
784
786
 
785
787
  # Version Info
786
788
 
789
+ 2.6.0<br>
790
+ Rework charge de-rating with temperature, losses and other info provided by get_battery() to take new BMS behaviour into account.
791
+
792
+ 2.5.9<br>
793
+ Change loss parameters to separate AC/DC, DC/AC conversion losses and battery charge / discharge losses.
794
+ Update charge calibration for new BMS firmware.
795
+ Increase de-rating temperature from 21C to 28C for new BMS firmware.
796
+
787
797
  2.5.8<br>
788
798
  Fix incorrect charging setup when force_charge=1.
789
799
  Rework charge_periods() to consolidate charge periods to reduce number of time segments when timed_mode=2.
@@ -102,7 +102,12 @@ Each of these calls will return a dictionary or list containing the relevant inf
102
102
 
103
103
  get_generation() will return the latest generation information for the device. The results are also stored in f.device as 'generationToday', 'generationMonth' and 'generationTotal'.
104
104
 
105
- get_battery() returns the current battery status, including 'soc', 'volt', 'current', 'power', 'temperature' and 'residual'. The result also updates f.battery.
105
+ get_battery() returns the current battery status, including 'soc', 'volt', 'current', 'power', 'temperature' and 'residual'. The result also updates f.battery. Additional battery attributes include:
106
+ + 'info': a list of BMS and battery serial numbers and firmware versions
107
+ + 'capacity': the estimated battery capacity, derrived from 'residual' and 'soc'
108
+ + 'charge_rate': the estimated BMS charge rate available, based on the current 'temperature' of the BMS
109
+ + 'charge_loss': the ratio of the kWh added to the battery for each kWh applied during charging
110
+ + 'discharge_loss': the ratio of the kWh available for each kWh removed from the battery during during discharging
106
111
 
107
112
  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.
108
113
 
@@ -349,44 +354,41 @@ Given the data available, the modelling works as follows:
349
354
 
350
355
  The following parameters and default values are used to configure charge_needed and may be updated if required using name=value:
351
356
  ```
352
- contingency: [20,10,5,10] # % of consumption. Single or [winter, spring, summer, autumn] values
353
- capacity: None # Battery capacity in kWh (over-rides generated value if set)
354
- charge_current: None # max battery charge current setting in A. None uses a value derrived from the inverter model
355
- discharge_current: None # max battery discharge current setting in A. None uses a value derrived from the inverter model
356
- export_limit: None # maximum export power in kW. None uses the inverter power rating
357
- discharge_loss: 0.98 # loss converting battery discharge power to grid power
358
- pv_loss: 0.95 # loss converting PV power to battery charge power
359
- grid_loss: 0.975 # loss converting grid power to battery charge power
360
- inverter_power: None # inverter power consumption in W (dynamically set)
361
- bms_power: 50 # BMS power consumption in W
362
- force_charge_power: 5.00 # power used when Force Charge is scheduled
363
- allowed_drain: 4, # % tolerance below min_soc before float charge starts
364
- float_current: 4, # BMS float charge current in A
365
- bat_resistance: 0.070 # internal resistance of a battery in ohms
366
- volt_curve: lifepo4_curve # battery OCV from 0% to 100% SoC
367
- nominal_soc: 55 # SoC for nominal open circuit voltage
368
- generation_days: 3 # number of days to use for average generation (1-7)
369
- consumption_days: 3 # number of days to use for average consumption (1-7)
370
- consumption_span: 'week' # 'week' = last 7 days or 'weekday' = last 7 weekdays e.g. Saturdays
371
- use_today: 21.0 # hour when today's generation and consumption data will be used
372
- min_hours: 0.25 # minimum charge time to set (in decimal hours)
373
- min_kwh: 0.5 # minimum charge to add in kwh
374
- solcast_adjust: 100 # % adjustment to make to Solcast forecast
375
- solar_adjust: 100 # % adjustment to make to Solar forecast
376
- forecast_selection: 1 # 1 = only update charge times if forecast is available, 0 = use best available data. Default is 1.
377
- annual_consumption: None # optional annual consumption in kWh. If set, this replaces consumption history
378
- timed_mode: 0 # 0 = None, 1 = use timed work mode, 2 = strategy mode
379
- special_contingency: 30 # contingency for special days when consumption might be higher
357
+ contingency: [20,10,5,10] # % of consumption. Single or [winter, spring, summer, autumn] values
358
+ capacity: None # Battery capacity in kWh (over-rides generated value if set)
359
+ charge_current: None # max battery charge current setting in A. None uses a value derrived from the inverter model
360
+ discharge_current: None # max battery discharge current setting in A. None uses a value derrived from the inverter model
361
+ export_limit: None # maximum export power in kW. None uses the inverter power rating
362
+ dc_ac_loss: 0.970 # loss converting battery DC power to AC grid power
363
+ pv_loss: 0.950 # loss converting PV power to DC battery charge power
364
+ ac_dc_loss: 0.960 # loss converting AC grid power to DC battery charge power
365
+ inverter_power: None # inverter power consumption in W (dynamically set)
366
+ bms_power: 50 # BMS power consumption in W
367
+ force_charge_power: 5.00 # power used when Force Charge is scheduled
368
+ allowed_drain: 4, # % tolerance below min_soc before float charge starts
369
+ float_current: 4, # BMS float charge current in A
370
+ bat_resistance: 0.070 # internal resistance of a battery in ohms
371
+ volt_curve: lifepo4_curve # battery OCV from 0% to 100% SoC
372
+ nominal_soc: 55 # SoC for nominal open circuit voltage
373
+ generation_days: 3 # number of days to use for average generation (1-7)
374
+ consumption_days: 3 # number of days to use for average consumption (1-7)
375
+ consumption_span: 'week' # 'week' = last 7 days or 'weekday' = last 7 weekdays e.g. Saturdays
376
+ use_today: 21.0 # hour when today's generation and consumption data will be used
377
+ min_hours: 0.25 # minimum charge time to set (in decimal hours)
378
+ min_kwh: 0.5 # minimum charge to add in kwh
379
+ solcast_adjust: 100 # % adjustment to make to Solcast forecast
380
+ solar_adjust: 100 # % adjustment to make to Solar forecast
381
+ forecast_selection: 1 # 1 = only update charge times if forecast is available, 0 = use best available data. Default is 1.
382
+ annual_consumption: None # optional annual consumption in kWh. If set, this replaces consumption history
383
+ timed_mode: 0 # 0 = None, 1 = use timed work mode, 2 = strategy mode
384
+ special_contingency: 30 # contingency for special days when consumption might be higher
380
385
  special_days: ['12-25', '12-26', '01-01']
381
- full_charge: None # day of month (1-28) to do full charge or 'daily' or day of week: 'Mon', 'Tue' etc
382
- derate_temp: 21 # battery temperature in C when derating charge current is applied
383
- derate_step: 5 # step size for derating e.g. 21, 16, 11
384
- derating: [24, 15, 10, 2] # derated charge current for each temperature step e.g. 21C, 16C, 11C, 6C
385
- force: 1 # 1 = disable strategy periods when setting charge. 0 = fail if strategy period has been set.
386
- data_wrap: 6 # data items to show per line
387
- target_soc: None # target soc for charging
388
- shading: {} # effect of shading on Solcast / Solar (see below)
389
- save: 'charge_needed.txt' # where to save calculation data for charge_compare(). '###' gets replaced with todays date.
386
+ full_charge: None # day of month (1-28) to do full charge or 'daily' or day of week: 'Mon', 'Tue' etc
387
+ force: 1 # 1 = disable strategy periods when setting charge. 0 = fail if strategy period has been set.
388
+ data_wrap: 6 # data items to show per line
389
+ target_soc: None # target soc for charging (over-rides calculated value)
390
+ shading: {} # effect of shading on Solcast / Solar (see below)
391
+ save: 'charge_needed.txt' # where to save calculation data for charge_compare(). '###' gets replaced with todays date.
390
392
  ```
391
393
 
392
394
  These values are stored / available in f.charge_config.
@@ -770,6 +772,14 @@ This setting can be:
770
772
 
771
773
  # Version Info
772
774
 
775
+ 2.6.0<br>
776
+ Rework charge de-rating with temperature, losses and other info provided by get_battery() to take new BMS behaviour into account.
777
+
778
+ 2.5.9<br>
779
+ Change loss parameters to separate AC/DC, DC/AC conversion losses and battery charge / discharge losses.
780
+ Update charge calibration for new BMS firmware.
781
+ Increase de-rating temperature from 21C to 28C for new BMS firmware.
782
+
773
783
  2.5.8<br>
774
784
  Fix incorrect charging setup when force_charge=1.
775
785
  Rework charge_periods() to consolidate charge periods to reduce number of time segments when timed_mode=2.
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "foxesscloud"
7
- version = "2.5.8"
7
+ version = "2.6.0"
8
8
  authors = [
9
9
  {name="Tony Matthews", email="tony@quasair.co.uk"},
10
10
  ]