Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 39 additions & 65 deletions batcontrol-development/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,122 +1,96 @@
# Release 0.8.0 - in Development
# Release 0.8.1 - in Development

"Make it real" - Cypecore

# 🚀 Release 0.8.0 - Released on 11.05.2026

## What's Changed

### 🌟 Major New Features

- **Peak Shaving** (#328): Limits PV-to-battery charge rate so the battery fills gradually instead of reaching 100% by midday. Preserves free capacity to absorb more solar energy later in the day and reduces unnecessary grid feed-in.
- Three modes: `time` (counter-linear ramp), `price` (cheap-slot reservation), `combined` (both, stricter wins)
- **Peak Shaving** (#315): New logic type `next` with peak shaving support in three modes: `time` (counter-linear ramp), `price` (cheap-slot reservation), `combined` (both, stricter wins)
- Configurable target hour (`allow_full_battery_after`) and price threshold (`price_limit`)
- MQTT runtime control for enable/disable and target hour
- Home Assistant auto-discovery (switch, number, sensor)
- Requires logic type `next` in `battery_control.type`
- See [Peak Shaving wiki page](https://github.com/MaStr/batcontrol/wiki/Peak-Shaving) for details

- **Single-Zone Static Price Mode** (#324): The `tariff_zones` provider now supports 1, 2, or 3 zones. When only `tariff_zone_1` is configured, it acts as a static flat-price mode for the whole day.
- **Single-Zone Static Price Mode** (#324): The `tariff_zones` provider now supports 1, 2, or 3 zones. A single `tariff_zone_1` acts as a static flat-price mode for the whole day.

- **Minimum Grid Charge SoC** (#356): New "charge to min. SoC%" feature — pushes batcontrol to fill the battery up to a defined SoC% during a recharge event. Thanks to @filiplajszczak

- **Fronius Modbus Support** (#337, #350, #351, #352): New `fronius-modbus` inverter backend with backup safety and charge limit support. Thanks to @filiplajszczak

### ✨ Enhancements

- **New Logic Type `next`**: Selectable via `battery_control.type: next`. Front-runs upcoming changes and includes peak shaving support. The `default` logic remains unchanged.
- **Scheduler Isolation** (#326): Scheduler state is isolated from the schedule library's global singleton, improving testability and reliability.
- **Removed Legacy HomeAssistant Sensor Formats** (#327): Legacy `hours_list` and `hour_N` sensor formats have been removed. Only the evcc-compatible format remains.
- **Peak Shaving Config Validation** (#336): Added explicit `PeakShavingConfig` validation and improved fallback behavior for `combined` mode.
- **MQTT Control/Discovery Improvements** (#338, #340, #342, #343, #344, #345, #347):
- **MQTT Improvements** (#338, #340, #342, #343, #344, #345, #347, #353, #354):
- Exposes `limit-battery-charge` mode and charge-rate limit in Home Assistant auto-discovery
- Publishes API override state to MQTT
- Publishes API override state and control source state to MQTT
- Refreshes and publishes control state updates immediately (including price difference and charge-limit changes)
- Refactors shared MQTT control topic helpers for consistency
- Polishes published state values
- **Recharge Decision Logging** (#355): Logic now logs a recharge decision summary for better observability.

### 🔧 Technical Updates

- Build: switched from pip to uv for Docker image builds and test setup (dev image)
- Tests: improved coverage for inverter factory, core dispatch, and pytest configuration
- Tests: added/expanded characterization tests for inverter battery math and mode contracts (#333, #334)
- Removed depricated architectures armhf & armv7

# 🚀 Release 0.7.2 - Released on 07.04.2026

## What's Changed

- Support for the homeassistant evcc-sensor fomr ML solar forecastprediction
- **Build**: switched from pip to uv for Docker image builds and test setup
- **Tests**: improved coverage for inverter factory, core dispatch, and pytest configuration (#319, #320, #321, #322, #330, #333, #334, #358, #359, #360)
- **Removed Legacy HomeAssistant Sensor Formats** (#327): Legacy `hours_list` and `hour_N` sensor formats have been removed. Only the evcc-compatible format remains.
- **Dropped armv6, armv7 and armhf** (#348): Removed support for deprecated Docker image architectures.

# 🚀 Release 0.7.1 - Released on 17.03.2026
### ⚠️ Breaking Changes

## What's Changed
- HA Solar ML Forecast only supports the evcc-typed forecast sensor format. Other variants were removed.
- Dropped armv6, armv7 and armhf Support on Docker images.

- Fix type conversion error in interval_minutes
### 🙌 New Contributors

- @filiplajszczak made their first contribution

**Full Changelog**: https://github.com/MaStr/batcontrol/compare/0.7.0...0.7.1
**Full Changelog**: https://github.com/MaStr/batcontrol/compare/0.7.2...0.8.0

### 📌 Full Release Notes

👉 [GitHub Release v0.7.1](https://github.com/MaStr/batcontrol/releases/tag/0.7.1)
👉 [GitHub Release v0.8.0](https://github.com/MaStr/batcontrol/releases/tag/0.8.0)

### 📚 Wiki

👉 [Project Wiki](https://github.com/MaStr/batcontrol/wiki)
👉 [Project Wiki](https://github.com/MaStr/batcontrol/wiki)


# 🚀 Release 0.7.0 - Released on 17.03.2026
# 🚀 Release 0.7.2 - Released on 07.04.2026

## What's Changed

### 🌟 Major New Features
- Support for the homeassistant evcc-sensor fomr ML solar forecastprediction

- **Limited PV Charging Mode** : Introduces a new operation mode (8), which limits the load of the battery with PV. This is in preparation to implement peak shaving.
**Full Changelog**: https://github.com/MaStr/batcontrol/compare/0.7.1...0.7.2

- **Multi-Zone Tariff Provider** (#289): Introducing `tariff_zones` provider supporting up to 3 different price zones for flexible tariff configurations
- Replaces the previous two-tariff implementation
- Supports flexible hour format: ranges (`7-22`), comma-separated (`0,1,2`), or mixed (`0-5,23`)
- All 24 hours must be assigned to exactly one zone
- Optional third zone for complex tariff structures (e.g., day/night/peak pricing)
### 📌 Full Release Notes

- **HomeAssistant Solar Forecast ML Integration** (#257): New solar forecast provider using ML-based predictions from HomeAssistant
- Integrates with HomeAssistant Solar Forecast ML (HACS)
- Provides ML-based hourly solar production forecasts
- Configurable via `pvinstallations` with `type: homeassistant-solar-forecast-ml`
- Supports automatic unit detection or manual configuration
- Includes smart caching to reduce HomeAssistant load
👉 [GitHub Release v0.7.2](https://github.com/MaStr/batcontrol/releases/tag/0.7.2)

- **Resilient Inverter Wrapper** (#254): Enhanced reliability for inverter communication
- Gracefully handles temporary inverter outages (firmware updates, network issues)
- Configurable outage tolerance (default: 24 minutes)
- Uses cached values during outages to maintain operation
- Automatic recovery when connection is restored
- Enable via `enable_resilient_wrapper: true` in inverter config
### 📚 Wiki

### ✨ Enhancements
👉 [Project Wiki](https://github.com/MaStr/batcontrol/wiki)

- **Production Offset Multiplier** (#253): Fine-tune solar forecast results
- New parameter `production_offset_percent` (default: 1.0 = 100%)
- Available via config, MQTT + HA Sensor
- Useful for winter mode when solar panels are covered with snow or other seasonal adjustments
- Changes via API will be reset after a reboot

- **Improved PV Forecast Failsafe** (#284): Reduced minimum forecast requirement from 18 to 12 hours
- Better handling of partial forecast data
- More resilient to provider outages
# 🚀 Release 0.7.1 - Released on 17.03.2026

- **Enhanced Logging** (#278): Reworked default logic log messages for better clarity and debugging
## What's Changed

### 🔧 Technical Updates
- Fix type conversion error in interval_minutes

- **Python 3.13 Support** (#268): Updated base image from Python 3.11 to Python 3.13
- **Repository Migration** (#263): Project moved from `muexxl/batcontrol` to `MaStr/batcontrol` organization
- **Dependency Updates**: Various GitHub Actions and dependency updates via Dependabot (#287, #288, #276)

**Full Changelog**: https://github.com/MaStr/batcontrol/compare/0.6.1...0.7.0
**Full Changelog**: https://github.com/MaStr/batcontrol/compare/0.7.0...0.7.1

### 📌 Full Release Notes

👉 [GitHub Release v0.7.0](https://github.com/MaStr/batcontrol/releases/tag/0.7.0)
👉 [GitHub Release v0.7.1](https://github.com/MaStr/batcontrol/releases/tag/0.7.1)

### 📚 Wiki

👉 [Project Wiki](https://github.com/MaStr/batcontrol/wiki)

# 🚀 Release 0.6.1 - published on 03.02.2026

- Fix Tibber API call


9 changes: 8 additions & 1 deletion batcontrol-development/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ options:
# _rel helps to avoid charging at high prices with less efficiency
always_allow_discharge_limit: 0.90 # 0.00 to 1.00 above this SOC limit using energy from the battery is always allowed
max_charging_from_grid_limit: 0.89 # 0.00 to 1.00 charging from the grid is only allowed until this SOC limit
# min_grid_charge_soc: 0.55 # optional 0.00 to 1.00 target to preserve/charge before expensive slots
min_recharge_amount: 100 # in Wh, start & minimum amount of energy to recharge the battery
peak_shaving:
enabled: false
Expand All @@ -42,6 +43,7 @@ options:
round_price_digits: 4 # round price to n digits after the comma
production_offset_percent: 1.0 # Adjust production forecast by a percentage (1.0 = 100%, 0.8 = 80%, etc.)
# Useful for winter mode when solar panels are covered with snow
preserve_min_grid_charge_soc: false # If true, also preserve min_grid_charge_soc as reserved energy during cheap/pre-expensive slots

inverter:
type: dummy #currently only fronius_gen24 supported
Expand Down Expand Up @@ -143,6 +145,7 @@ schema:
min_price_difference_rel: float(0,)?
always_allow_discharge_limit: float(0,1) # 0.00 to 1.00 above this SOC limit using energy from the battery is always allowed
max_charging_from_grid_limit: float(0,1) # 0.00 to 1.00 charging from the grid is only allowed until this SOC limit
min_grid_charge_soc: float(0,1)? # optional 0.00 to 1.00 target to preserve/charge before expensive slots
min_recharge_amount: int(0,)? # in Wh, start & minimum amount of energy to recharge the battery
peak_shaving:
enabled: bool? # Enable/disable peak shaving (default: false)
Expand All @@ -158,8 +161,9 @@ schema:
round_price_digits: int # round price to n digits after the comma
production_offset_percent: float(0,) # Adjust production forecast by a percentage (1.0 = 100%, 0.8 = 80%, etc.)
# Useful for winter mode when solar panels are covered with snow
preserve_min_grid_charge_soc: bool? # If true, also preserve min_grid_charge_soc as reserved energy during cheap/pre-expensive slots
inverter:
type: list(fronius_gen24|dummy|mqtt)
type: list(fronius_gen24|fronius-modbus|dummy|mqtt)
address: str? # the local IP of your inverter. Required for fronius_gen24
user: list(customer|technician)? # Required for fronius_gen24
password: password?
Expand All @@ -171,6 +175,9 @@ schema:
max_pv_charge_rate: float(0,)? # Watt, This allows to limit the PV to Battery charge rate. Set to 0 for unlimited charging.
min_pv_charge_rate: float(0,)? # Watt, lower limit for PV charge rate in Mode 8 (peak shaving). 0 = no floor.
max_grid_charge_rate: float(0,)? # Watt, required for all inverter types
port: int(1,65535)? # (fronius-modbus) Modbus TCP port (default: 502)
unit_id: int(1,)? # (fronius-modbus) Modbus unit ID (default: 1)
revert_seconds: int(0,)? # (fronius-modbus) seconds before reverting to default mode (default: 0)
fronius_inverter_id: str? # Optional: ID of the inverter in Fronius API (default: '1')
fronius_controller_id: str? # Optional: ID of the controller in Fronius API (default: '0')
enable_resilient_wrapper: bool? # Enable resilient wrapper for graceful outage handling (default: false)
Expand Down
58 changes: 58 additions & 0 deletions batcontrol/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,61 @@
# 🚀 Release 0.8.0 - Released on 11.05.2026

## What's Changed

### 🌟 Major New Features

- **Peak Shaving** (#315): New logic type `next` with peak shaving support in three modes: `time` (counter-linear ramp), `price` (cheap-slot reservation), `combined` (both, stricter wins)
- Configurable target hour (`allow_full_battery_after`) and price threshold (`price_limit`)
- MQTT runtime control for enable/disable and target hour
- Home Assistant auto-discovery (switch, number, sensor)
- Requires logic type `next` in `battery_control.type`

- **Single-Zone Static Price Mode** (#324): The `tariff_zones` provider now supports 1, 2, or 3 zones. A single `tariff_zone_1` acts as a static flat-price mode for the whole day.

- **Minimum Grid Charge SoC** (#356): New "charge to min. SoC%" feature — pushes batcontrol to fill the battery up to a defined SoC% during a recharge event. Thanks to @filiplajszczak

- **Fronius Modbus Support** (#337, #350, #351, #352): New `fronius-modbus` inverter backend with backup safety and charge limit support. Thanks to @filiplajszczak

### ✨ Enhancements

- **New Logic Type `next`**: Selectable via `battery_control.type: next`. Front-runs upcoming changes and includes peak shaving support. The `default` logic remains unchanged.
- **Scheduler Isolation** (#326): Scheduler state is isolated from the schedule library's global singleton, improving testability and reliability.
- **Peak Shaving Config Validation** (#336): Added explicit `PeakShavingConfig` validation and improved fallback behavior for `combined` mode.
- **MQTT Improvements** (#338, #340, #342, #343, #344, #345, #347, #353, #354):
- Exposes `limit-battery-charge` mode and charge-rate limit in Home Assistant auto-discovery
- Publishes API override state and control source state to MQTT
- Refreshes and publishes control state updates immediately (including price difference and charge-limit changes)
- Refactors shared MQTT control topic helpers for consistency
- Polishes published state values
- **Recharge Decision Logging** (#355): Logic now logs a recharge decision summary for better observability.

### 🔧 Technical Updates

- **Build**: switched from pip to uv for Docker image builds and test setup
- **Tests**: improved coverage for inverter factory, core dispatch, and pytest configuration (#319, #320, #321, #322, #330, #333, #334, #358, #359, #360)
- **Removed Legacy HomeAssistant Sensor Formats** (#327): Legacy `hours_list` and `hour_N` sensor formats have been removed. Only the evcc-compatible format remains.
- **Dropped armv6, armv7 and armhf** (#348): Removed support for deprecated Docker image architectures.

### ⚠️ Breaking Changes

- HA Solar ML Forecast only supports the evcc-typed forecast sensor format. Other variants were removed.
- Dropped armv6, armv7 and armhf Support on Docker images.

### 🙌 New Contributors

- @filiplajszczak made their first contribution

**Full Changelog**: https://github.com/MaStr/batcontrol/compare/0.7.2...0.8.0

### 📌 Full Release Notes

👉 [GitHub Release v0.8.0](https://github.com/MaStr/batcontrol/releases/tag/0.8.0)

### 📚 Wiki

👉 [Project Wiki](https://github.com/MaStr/batcontrol/wiki)


# 🚀 Release 0.7.2 - Released on 07.04.2026

## What's Changed
Expand Down
2 changes: 2 additions & 0 deletions batcontrol/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ RUN pip install --no-cache-dir --extra-index-url https://piwheels.org/simple --p

ENV BATCONTROL_VERSION=${BUILD_VERSION}
ENV BATCONTROL_GIT_SHA=${GIT_SHA}
ENV BATCONTROL_RUNTIME_ENV="home_assistant_addon-ng"

Comment on lines 48 to +51
# Set default timezone to UTC, override with -e TZ=Europe/Berlin or similar
# when starting the container
# or set the timezone in docker-compose.yml in the environment section,
Expand Down
6 changes: 2 additions & 4 deletions batcontrol/build.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
build_from:
aarch64: "ghcr.io/home-assistant/aarch64-base:3.15"
amd64: "ghcr.io/home-assistant/amd64-base:3.15"
armhf: "ghcr.io/home-assistant/armhf-base:3.15"
armv7: "ghcr.io/home-assistant/armv7-base:3.15"
aarch64: "ghcr.io/home-assistant/aarch64-base-python:3.13-alpine3.23"
amd64: "ghcr.io/home-assistant/amd64-base-python:3.13-alpine3.23"
Loading