foxesscloud 2.5.7__tar.gz → 2.5.9__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.7
3
+ Version: 2.5.9
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
@@ -130,7 +130,7 @@ You can change inverter settings using:
130
130
 
131
131
  ```
132
132
  f.set_min(minSocOnGrid, minSoc)
133
- f.set_charge(ch1, st1, en1, ch2, st2, en2)
133
+ f.set_charge(ch1, st1, en1, ch2, st2, en2, enable)
134
134
  f.set_period(start, end, mode, min_soc, max_soc, fdsoc, fdpwr, price, segment)
135
135
  f.charge_periods(st0, en0, st1, en1, st2, en2, min_soc, target_soc, start_soc)
136
136
  f.set_schedule(periods, enable)
@@ -147,6 +147,7 @@ set_charge() takes the charge times from the battery_settings and applies these
147
147
  + ch2: enable charge from grid for period 2 (True or False)
148
148
  + st2: the start time for period 2
149
149
  + en2: the end time for period 2
150
+ + enable: set to 0 to show settings but stop inverter settings being updated. Default is 1.
150
151
 
151
152
  set_period() returns a period structure that can be used to build a list for set_schedule()
152
153
  + start, end, mode: required parameters. end time is exclusive e.g. end at '07:00' will set a period end time of '06:59'
@@ -362,44 +363,46 @@ Given the data available, the modelling works as follows:
362
363
 
363
364
  The following parameters and default values are used to configure charge_needed and may be updated if required using name=value:
364
365
  ```
365
- contingency: [20,10,5,10] # % of consumption. Single or [winter, spring, summer, autumn] values
366
- capacity: None # Battery capacity in kWh (over-rides generated value if set)
367
- charge_current: None # max battery charge current setting in A. None uses a value derrived from the inverter model
368
- discharge_current: None # max battery discharge current setting in A. None uses a value derrived from the inverter model
369
- export_limit: None # maximum export power in kW. None uses the inverter power rating
370
- discharge_loss: 0.98 # loss converting battery discharge power to grid power
371
- pv_loss: 0.95 # loss converting PV power to battery charge power
372
- grid_loss: 0.975 # loss converting grid power to battery charge power
373
- inverter_power: None # inverter power consumption in W (dynamically set)
374
- bms_power: 50 # BMS power consumption in W
375
- force_charge_power: 5.00 # power used when Force Charge is scheduled
376
- allowed_drain: 4, # % tolerance below min_soc before float charge starts
377
- float_current: 4, # BMS float charge current in A
378
- bat_resistance: 0.070 # internal resistance of a battery in ohms
379
- volt_curve: lifepo4_curve # battery OCV from 0% to 100% SoC
380
- nominal_soc: 55 # SoC for nominal open circuit voltage
381
- generation_days: 3 # number of days to use for average generation (1-7)
382
- consumption_days: 3 # number of days to use for average consumption (1-7)
383
- consumption_span: 'week' # 'week' = last 7 days or 'weekday' = last 7 weekdays e.g. Saturdays
384
- use_today: 21.0 # hour when today's generation and consumption data will be used
385
- min_hours: 0.25 # minimum charge time to set (in decimal hours)
386
- min_kwh: 0.5 # minimum charge to add in kwh
387
- solcast_adjust: 100 # % adjustment to make to Solcast forecast
388
- solar_adjust: 100 # % adjustment to make to Solar forecast
389
- forecast_selection: 1 # 1 = only update charge times if forecast is available, 0 = use best available data. Default is 1.
390
- annual_consumption: None # optional annual consumption in kWh. If set, this replaces consumption history
391
- timed_mode: 0 # 0 = None, 1 = use timed work mode, 2 = strategy mode
392
- special_contingency: 30 # contingency for special days when consumption might be higher
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
+ dc_ac_loss: 0.970 # loss converting battery DC power to AC grid power
372
+ pv_loss: 0.950 # loss converting PV power to DC battery charge power
373
+ ac_dc_loss: 0.960 # loss converting AC grid power to DC battery charge power
374
+ charge_loss: [0.975, 1.040] # loss in battery energy for each kWh added (based on residual_handling)
375
+ discharge_loss: [0.975, 0.975] # loss in battery energy for each kWh removed (based on residual_handling)
376
+ inverter_power: None # inverter power consumption in W (dynamically set)
377
+ bms_power: 50 # BMS power consumption in W
378
+ force_charge_power: 5.00 # power used when Force Charge is scheduled
379
+ allowed_drain: 4, # % tolerance below min_soc before float charge starts
380
+ float_current: 4, # BMS float charge current in A
381
+ bat_resistance: 0.070 # internal resistance of a battery in ohms
382
+ volt_curve: lifepo4_curve # battery OCV from 0% to 100% SoC
383
+ nominal_soc: 55 # SoC for nominal open circuit voltage
384
+ generation_days: 3 # number of days to use for average generation (1-7)
385
+ consumption_days: 3 # number of days to use for average consumption (1-7)
386
+ consumption_span: 'week' # 'week' = last 7 days or 'weekday' = last 7 weekdays e.g. Saturdays
387
+ use_today: 21.0 # hour when today's generation and consumption data will be used
388
+ min_hours: 0.25 # minimum charge time to set (in decimal hours)
389
+ min_kwh: 0.5 # minimum charge to add in kwh
390
+ solcast_adjust: 100 # % adjustment to make to Solcast forecast
391
+ solar_adjust: 100 # % adjustment to make to Solar forecast
392
+ forecast_selection: 1 # 1 = only update charge times if forecast is available, 0 = use best available data. Default is 1.
393
+ annual_consumption: None # optional annual consumption in kWh. If set, this replaces consumption history
394
+ timed_mode: 0 # 0 = None, 1 = use timed work mode, 2 = strategy mode
395
+ special_contingency: 30 # contingency for special days when consumption might be higher
393
396
  special_days: ['12-25', '12-26', '01-01']
394
- full_charge: None # day of month (1-28) to do full charge or 'daily' or day of week: 'Mon', 'Tue' etc
395
- derate_temp: 21 # battery temperature in C when derating charge current is applied
396
- derate_step: 5 # step size for derating e.g. 21, 16, 11
397
- derating: [24, 15, 10, 2] # derated charge current for each temperature step e.g. 21C, 16C, 11C, 6C
398
- force: 1 # 1 = disable strategy periods when setting charge. 0 = fail if strategy period has been set.
399
- data_wrap: 6 # data items to show per line
400
- target_soc: None # target soc for charging
401
- shading: {} # effect of shading on Solcast / Solar (see below)
402
- save: 'charge_needed.txt' # where to save calculation data for charge_compare(). '###' gets replaced with todays date.
397
+ full_charge: None # day of month (1-28) to do full charge or 'daily' or day of week: 'Mon', 'Tue' etc
398
+ derate_temp: 28 # battery temperature in C when derating charge current is applied
399
+ derate_step: 5 # step size for derating e.g. 21, 16, 11
400
+ derating: [24, 15, 10, 2] # derated charge current for each temperature step e.g. 28C, 23C, 18C, 13C
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.
403
406
  ```
404
407
 
405
408
  These values are stored / available in f.charge_config.
@@ -783,6 +786,19 @@ This setting can be:
783
786
 
784
787
  # Version Info
785
788
 
789
+ 2.5.9<br>
790
+ Change loss parameters to separate AC/DC, DC/AC conversion losses and battery charge / discharge losses.
791
+ Update charge calibration for new BMS firmware.
792
+ Increase de-rating temperature from 21C to 28C for new BMS firmware.
793
+
794
+ 2.5.8<br>
795
+ Fix incorrect charging setup when force_charge=1.
796
+ Rework charge_periods() to consolidate charge periods to reduce number of time segments when timed_mode=2.
797
+ Add 'enable' parameter to set_charge().
798
+ Change 'force' to 'hold' in preset tariffs.
799
+ Stop plunge slots being used when timed_mode is 0 or 1.
800
+ Change default plunge_price to [3,3] and plunge_slots to 6.
801
+
786
802
  2.5.7<br>
787
803
  Fix problem with schedules being set for plunge periods that are more than 24 hours in the future.
788
804
  Add date to plunge period display.
@@ -116,7 +116,7 @@ You can change inverter settings using:
116
116
 
117
117
  ```
118
118
  f.set_min(minSocOnGrid, minSoc)
119
- f.set_charge(ch1, st1, en1, ch2, st2, en2)
119
+ f.set_charge(ch1, st1, en1, ch2, st2, en2, enable)
120
120
  f.set_period(start, end, mode, min_soc, max_soc, fdsoc, fdpwr, price, segment)
121
121
  f.charge_periods(st0, en0, st1, en1, st2, en2, min_soc, target_soc, start_soc)
122
122
  f.set_schedule(periods, enable)
@@ -133,6 +133,7 @@ set_charge() takes the charge times from the battery_settings and applies these
133
133
  + ch2: enable charge from grid for period 2 (True or False)
134
134
  + st2: the start time for period 2
135
135
  + en2: the end time for period 2
136
+ + enable: set to 0 to show settings but stop inverter settings being updated. Default is 1.
136
137
 
137
138
  set_period() returns a period structure that can be used to build a list for set_schedule()
138
139
  + start, end, mode: required parameters. end time is exclusive e.g. end at '07:00' will set a period end time of '06:59'
@@ -348,44 +349,46 @@ Given the data available, the modelling works as follows:
348
349
 
349
350
  The following parameters and default values are used to configure charge_needed and may be updated if required using name=value:
350
351
  ```
351
- contingency: [20,10,5,10] # % of consumption. Single or [winter, spring, summer, autumn] values
352
- capacity: None # Battery capacity in kWh (over-rides generated value if set)
353
- charge_current: None # max battery charge current setting in A. None uses a value derrived from the inverter model
354
- discharge_current: None # max battery discharge current setting in A. None uses a value derrived from the inverter model
355
- export_limit: None # maximum export power in kW. None uses the inverter power rating
356
- discharge_loss: 0.98 # loss converting battery discharge power to grid power
357
- pv_loss: 0.95 # loss converting PV power to battery charge power
358
- grid_loss: 0.975 # loss converting grid power to battery charge power
359
- inverter_power: None # inverter power consumption in W (dynamically set)
360
- bms_power: 50 # BMS power consumption in W
361
- force_charge_power: 5.00 # power used when Force Charge is scheduled
362
- allowed_drain: 4, # % tolerance below min_soc before float charge starts
363
- float_current: 4, # BMS float charge current in A
364
- bat_resistance: 0.070 # internal resistance of a battery in ohms
365
- volt_curve: lifepo4_curve # battery OCV from 0% to 100% SoC
366
- nominal_soc: 55 # SoC for nominal open circuit voltage
367
- generation_days: 3 # number of days to use for average generation (1-7)
368
- consumption_days: 3 # number of days to use for average consumption (1-7)
369
- consumption_span: 'week' # 'week' = last 7 days or 'weekday' = last 7 weekdays e.g. Saturdays
370
- use_today: 21.0 # hour when today's generation and consumption data will be used
371
- min_hours: 0.25 # minimum charge time to set (in decimal hours)
372
- min_kwh: 0.5 # minimum charge to add in kwh
373
- solcast_adjust: 100 # % adjustment to make to Solcast forecast
374
- solar_adjust: 100 # % adjustment to make to Solar forecast
375
- forecast_selection: 1 # 1 = only update charge times if forecast is available, 0 = use best available data. Default is 1.
376
- annual_consumption: None # optional annual consumption in kWh. If set, this replaces consumption history
377
- timed_mode: 0 # 0 = None, 1 = use timed work mode, 2 = strategy mode
378
- special_contingency: 30 # contingency for special days when consumption might be higher
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
+ dc_ac_loss: 0.970 # loss converting battery DC power to AC grid power
358
+ pv_loss: 0.950 # loss converting PV power to DC battery charge power
359
+ ac_dc_loss: 0.960 # loss converting AC grid power to DC battery charge power
360
+ charge_loss: [0.975, 1.040] # loss in battery energy for each kWh added (based on residual_handling)
361
+ discharge_loss: [0.975, 0.975] # loss in battery energy for each kWh removed (based on residual_handling)
362
+ inverter_power: None # inverter power consumption in W (dynamically set)
363
+ bms_power: 50 # BMS power consumption in W
364
+ force_charge_power: 5.00 # power used when Force Charge is scheduled
365
+ allowed_drain: 4, # % tolerance below min_soc before float charge starts
366
+ float_current: 4, # BMS float charge current in A
367
+ bat_resistance: 0.070 # internal resistance of a battery in ohms
368
+ volt_curve: lifepo4_curve # battery OCV from 0% to 100% SoC
369
+ nominal_soc: 55 # SoC for nominal open circuit voltage
370
+ generation_days: 3 # number of days to use for average generation (1-7)
371
+ consumption_days: 3 # number of days to use for average consumption (1-7)
372
+ consumption_span: 'week' # 'week' = last 7 days or 'weekday' = last 7 weekdays e.g. Saturdays
373
+ use_today: 21.0 # hour when today's generation and consumption data will be used
374
+ min_hours: 0.25 # minimum charge time to set (in decimal hours)
375
+ min_kwh: 0.5 # minimum charge to add in kwh
376
+ solcast_adjust: 100 # % adjustment to make to Solcast forecast
377
+ solar_adjust: 100 # % adjustment to make to Solar forecast
378
+ forecast_selection: 1 # 1 = only update charge times if forecast is available, 0 = use best available data. Default is 1.
379
+ annual_consumption: None # optional annual consumption in kWh. If set, this replaces consumption history
380
+ timed_mode: 0 # 0 = None, 1 = use timed work mode, 2 = strategy mode
381
+ special_contingency: 30 # contingency for special days when consumption might be higher
379
382
  special_days: ['12-25', '12-26', '01-01']
380
- full_charge: None # day of month (1-28) to do full charge or 'daily' or day of week: 'Mon', 'Tue' etc
381
- derate_temp: 21 # battery temperature in C when derating charge current is applied
382
- derate_step: 5 # step size for derating e.g. 21, 16, 11
383
- derating: [24, 15, 10, 2] # derated charge current for each temperature step e.g. 21C, 16C, 11C, 6C
384
- force: 1 # 1 = disable strategy periods when setting charge. 0 = fail if strategy period has been set.
385
- data_wrap: 6 # data items to show per line
386
- target_soc: None # target soc for charging
387
- shading: {} # effect of shading on Solcast / Solar (see below)
388
- save: 'charge_needed.txt' # where to save calculation data for charge_compare(). '###' gets replaced with todays date.
383
+ full_charge: None # day of month (1-28) to do full charge or 'daily' or day of week: 'Mon', 'Tue' etc
384
+ derate_temp: 28 # battery temperature in C when derating charge current is applied
385
+ derate_step: 5 # step size for derating e.g. 21, 16, 11
386
+ derating: [24, 15, 10, 2] # derated charge current for each temperature step e.g. 28C, 23C, 18C, 13C
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.
389
392
  ```
390
393
 
391
394
  These values are stored / available in f.charge_config.
@@ -769,6 +772,19 @@ This setting can be:
769
772
 
770
773
  # Version Info
771
774
 
775
+ 2.5.9<br>
776
+ Change loss parameters to separate AC/DC, DC/AC conversion losses and battery charge / discharge losses.
777
+ Update charge calibration for new BMS firmware.
778
+ Increase de-rating temperature from 21C to 28C for new BMS firmware.
779
+
780
+ 2.5.8<br>
781
+ Fix incorrect charging setup when force_charge=1.
782
+ Rework charge_periods() to consolidate charge periods to reduce number of time segments when timed_mode=2.
783
+ Add 'enable' parameter to set_charge().
784
+ Change 'force' to 'hold' in preset tariffs.
785
+ Stop plunge slots being used when timed_mode is 0 or 1.
786
+ Change default plunge_price to [3,3] and plunge_slots to 6.
787
+
772
788
  2.5.7<br>
773
789
  Fix problem with schedules being set for plunge periods that are more than 24 hours in the future.
774
790
  Add date to plunge period display.
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "foxesscloud"
7
- version = "2.5.7"
7
+ version = "2.5.9"
8
8
  authors = [
9
9
  {name="Tony Matthews", email="tony@quasair.co.uk"},
10
10
  ]