Skip to content

Improve fox template#2174

Merged
springfall2008 merged 2 commits intospringfall2008:mainfrom
simoncozens:fox-updates
Apr 4, 2025
Merged

Improve fox template#2174
springfall2008 merged 2 commits intospringfall2008:mainfrom
simoncozens:fox-updates

Conversation

@simoncozens
Copy link
Contributor

As detailed in #1964, Fox inverter users need:

  1. Tony's W/kW conversion routines
  2. Correct entity configuration to go through this conversion
  3. Support for freeze charge

Confirmed working on my H1-G2.

@WyndStryke
Copy link

WyndStryke commented Mar 31, 2025

This is mine:

Fox_template_work_in_progress.yaml.txt

Among the bigger changes from the original are the following:

  • Configuring the reserve functionality (has_reserve_soc: True and reserve: - number.min_soc_on_grid)
  • Charge freeze and discharge freeze
  • Configuring soc_max via a sensor not a literal (soc_max: - sensor.bms_kwh_remaining)
  • Configuring battery_min_soc via a sensor (battery_min_soc: - sensor.min_soc)
  • Configuring temperature charge curves & SoC charge curves (but these will vary for everyone, so perhaps should be commented out)
  • Battery temperature & temperature history (battery_temperature: - sensor.bms_cell_temp_low, battery_temperature_history: - sensor.bms_cell_temp_low).
  # Requires has_reserve_soc to be set to number.min_soc_on_grid
  charge_freeze_service:
    service: select.select_option
    entity_id: select.work_mode
    option: "Back-up"

It does include stuff relevant only to me, so can't be used as-is (charge + discharge rates reduced below the inverter's rating, tariff details, etc).

I tried to get target_soc working (charge_limit: - number.max_soc), but it was problematic (it set the target soc down to the reserve during the day, which meant that it completely blocked all charging, including PV clipping etc). So that bit is commented out.

Pinging known Fox users for feedback:
cc: @TonyHoyle @MathewBurnett @HeavyPXL @zeclab @david00yates @bfayers @letsstartbeinganon @silkit @icornish72

@springfall2008
Copy link
Owner

Looks good, although it would probably be better to put the template stuff into the Predbat repo too?

@springfall2008 springfall2008 merged commit 81f53c8 into springfall2008:main Apr 4, 2025
1 check passed
write_and_poll_sleep: 2
has_time_window: False
support_charge_freeze: False
support_charge_freeze: True
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this correct? As is enabling charge_freeze but later adding the discharge_freeze_service and not the charge_freeze_service?

Copy link

@WyndStryke WyndStryke Apr 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this correct? As is enabling charge_freeze but later adding the discharge_freeze_service and not the charge_freeze_service?

I think it would be good to merge in some or all of the following:


...
    has_reserve_soc: True
    support_charge_freeze: true
    support_discharge_freeze: true
...
  discharge_freeze_service:
    service: select.select_option
    entity_id: select.work_mode
    option: "Feed-in First"
  charge_freeze_service:
    service: select.select_option
    entity_id: select.work_mode
    option: "Back-up"
...

  # Reserve SoC is used for Freeze Charge and Hold Charge modes.  This must never be set to less than 10%
  # (to match 90% DoD) and preferably a little higher to be safe.  
  # Also see the predbat setting input_number.predbat_set_reserve_min which should be set to 10 minimum, 
  # and input_number.predbat_best_soc_min which needs to be set >= kWh equivalent of that.
  reserve:
    - number.min_soc_on_grid
...
  battery_min_soc:
    - sensor.min_soc
...
  # sensor.bms_kwh_remaining relies on recent firmware, replace with literal for the kWh nominal capacity if unavailable
  soc_max:
    - sensor.bms_kwh_remaining
...
  # sensor.bms_cell_temp_low relies on recent firmware, comment out if unavailable
  battery_temperature:
    - sensor.bms_cell_temp_low
  battery_temperature_history:
    - sensor.bms_cell_temp_low
...
  battery_scaling:
    - 1.0
...
  # Carbon Intensity data from National grid
  carbon_intensity: 're:(sensor.carbon_intensity_uk)'


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants