-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathbatcontrol_config_dummy.yaml
More file actions
212 lines (201 loc) · 11.5 KB
/
batcontrol_config_dummy.yaml
File metadata and controls
212 lines (201 loc) · 11.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
#--------------------------
# Batcontrol Configuration
# See more Details in: https://github.com/MaStr/batcontrol/wiki/Batcontrol-Configuration
#--------------------------
timezone: Europe/Berlin #your time zone. not optional.
time_resolution_minutes: 60 # Time resolution for forecasts: 15 (quarter-hourly) or 60 (hourly). Default: 60
loglevel: debug
logfile_enabled: true
log_everything: false # if false debug messages from fronius.auth and urllib3.connectionpool will be suppressed
max_logfile_size: 200 #kB
logfile_path: logs/batcontrol.log
battery_control:
# min_price_difference is the absolute minimum price difference in Euro to justify charging your battery
# if min_price_difference_rel results in a higher price difference, that will be used
min_price_difference: 0.05 # minimum price difference in Euro to justify charging your battery
min_price_difference_rel: 0.10 # Percentage (in decimal) of the current price to justify charging your battery
# _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_recharge_amount: 100 # in Wh, start & minimum amount of energy to recharge the battery
#--------------------------
# Battery Control Expert Tuning Parameters
# See more Details in: https://github.com/MaStr/batcontrol/wiki/battery_control_expert
#--------------------------
battery_control_expert:
charge_rate_multiplier: 1.1 # Increase (>1) calculated charge rate to compensate charge inefficencies.
soften_price_difference_on_charging: False # enable earlier charging based on a more relaxed calculation
# future_price <= current_price-min_price_difference/soften_price_difference_on_charging_factor
soften_price_difference_on_charging_factor: 5
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
#--------------------------
# Inverter
# See more Details in: https://github.com/MaStr/batcontrol/wiki/Inverter-Configuration
#
# IMPORTANT: This configuration uses a "dummy" inverter for demonstration purposes.
# The dummy inverter returns static values to make batcontrol work out of the box.
#
# For real operation, you MUST:
# 1. Comment out the "dummy" type below
# 2. Uncomment and configure a real inverter type (e.g., fronius_gen24)
# 3. Update the address, user, and password for your actual inverter
#--------------------------
inverter:
type: dummy # DEMO ONLY - Change to "fronius_gen24" for real operation
# For real operation, uncomment and configure the following:
# type: fronius_gen24 #currently only fronius_gen24 supported
# address: 192.168.0.XX # the local IP of your inverter. needs to be reachable from the machine that runs batcontrol
# user: customer #customer or technician lowercase only!!
# password: YOUR-PASSWORD #
max_grid_charge_rate: 5000 # Watt, Upper limit for Grid to Battery charge rate.
max_pv_charge_rate: 0 # Watt, STATIC upper limit for PV to Battery charge rate. Set to 0 for unlimited charging.
# Applied in MODE_ALLOW_DISCHARGING (10) and as upper bound in MODE_LIMIT_BATTERY_CHARGE_RATE (8).
min_pv_charge_rate: 0 # Watt, STATIC lower limit for MODE_LIMIT_BATTERY_CHARGE_RATE (8).
# Only applied when the requested limit is > 0 (i.e. partial charging).
# A requested limit of 0 (complete charge blocking) bypasses this floor.
# Example: set to 100 to ensure at least 100W charging when a non-zero limit is active.
# Only affects mode 8; ignored in other modes.
# fronius_inverter_id: '1' # Optional: ID of the inverter in Fronius API (default: '1')
# fronius_controller_id: '0' # Optional: ID of the controller in Fronius API (default: '0')
enable_resilient_wrapper: false # Enable resilient wrapper for graceful outage handling (default: false)
outage_tolerance_minutes: 24 # Minutes to tolerate inverter outages before terminating (default: 24)
retry_backoff_seconds: 60 # Seconds to wait before retrying after a failure (default: 60)
#--------------------------
# Dynamic Tariff Provider
# See more Details in: https://github.com/MaStr/batcontrol/wiki/Dynamic-tariff-provider
#--------------------------
utility:
type: awattar_de # [tibber, awattar_at, awattar_de, evcc, energyforecast, tariff_zones]
vat: 0.19 # only required for awattar and energyforecast
fees: 0.015 # only required for awattar and energyforecast
markup: 0.03 # only required for awattar and energyforecast
# tariff_zone_1: 0.2733 # only required for tariff_zones, Euro/kWh incl. vat/fees (peak hours)
# zone_1_hours: 7-22 # hours assigned to zone 1; supports ranges (7-22), singles (7), or mixed (0-5,6,7)
# tariff_zone_2: 0.1734 # only required for tariff_zones, Euro/kWh incl. vat/fees (off-peak hours)
# zone_2_hours: 0-6,23 # hours assigned to zone 2 (must cover remaining hours)
# tariff_zone_3: 0.2100 # optional third zone price
# zone_3_hours: 17-20 # optional hours for zone 3 (must not overlap with zone 1 or 2)
# apikey: YOUR_API_KEY # MANDATORY for energyforecast and tibber. Uncomment and set if using those providers.
#--------------------------
# MCP Server (Model Context Protocol)
# Exposes batcontrol as AI-accessible tools for querying status,
# forecasts, and managing overrides via Claude Desktop or other MCP clients.
#--------------------------
mcp:
enabled: false
transport: http # 'http' for network access (Docker/HA addon), 'stdio' for direct pipe
host: 127.0.0.1 # Bind address (127.0.0.1 = local only; 0.0.0.0 = all interfaces)
port: 8081 # HTTP port for MCP server
#--------------------------
# MQTT API
# See more Details in: https://github.com/MaStr/batcontrol/wiki/MQTT-API
#--------------------------
mqtt:
enabled: false
logger: false
broker: localhost
port: 1883
topic: house/batcontrol
username: user
password: password
retry_attempts: 5 # optional, default: 5
retry_delay: 10 # seconds, optional, default: 10
tls: false
cafile: /etc/ssl/certs/ca-certificates.crt
certfile: /etc/ssl/certs/client.crt
keyfile: /etc/ssl/certs/client.key
tls_version: tlsv1.2
auto_discover_enable: true # enables mqtt auto discover => https://www.home-assistant.io/integrations/mqtt/#mqtt-discovery
auto_discover_topic: homeassistant # base topic path for auto discover config messages - default 'homeassistant' -> https://www.home-assistant.io/integrations/mqtt/#discovery-options
#--------------------------
# Forecast Solar
# See more Details in: https://github.com/MaStr/batcontrol/wiki/Solar-Forecast
#
# Supported providers:
# - fcsolarapi: Third-party solar forecast API (configured below, default)
# - solarprognose.de : needs an API key, see https://www.solarprognose.de/solar-api/ for details
# - homeassistant-solar-forecast-ml: HomeAssistant Solar Forecast ML integration (HACS)
# - evcc: local instance of evcc via REST API
#
# DEMO: This configuration uses a simple PV installation for demonstration.
# For real operation, update the values below with your actual PV system details.
#--------------------------
solar_forecast_provider: fcsolarapi
pvinstallations:
# PRIMARY: fcsolarapi provider - Uses PVGIS forecast based on location
- name: Demo PV System # name - update this for your system
type: fcsolarapi # Optional: explicitly specify provider type
lat: 48.4334480 # Update with your actual latitude
lon: 8.7654968 # Update with your actual longitude
declination: 30 # inclination toward horizon 0..90 0=flat 90=vertical
azimuth: 0 # -90:East, 0:South, 90:West -180..180
kWp: 10.0 # power in kWp - update with your actual system size
#horizon: # leave empty for default PVGIS horizon
# ALTERNATIVE: HomeAssistant Solar Forecast ML - Uses ML forecast from HomeAssistant
# Uncomment this section to use HomeAssistant Solar Forecast ML integration
# - name: HA Solar ML Forecast
# base_url: ws://homeassistant.local:8123 # Your HomeAssistant URL
# api_token: eyJ... # Long-lived access token from HA Profile
# entity_id: sensor.solar_forecast_ml_prognose_nachste_stunde # Forecast sensor entity
# sensor_unit: auto # Options: 'auto' (detect), 'Wh', or 'kWh'
# cache_ttl_hours: 24.0 # Cache duration in hours
#--------------------------
# Forecast Consumption
# See more Details in: https://github.com/MaStr/batcontrol/wiki/Consumption-forecast
#
# Option 1: CSV-based forecast (default)
# Option 2: HomeAssistant API-based forecast
#--------------------------
consumption_forecast:
type: csv # Options: 'csv' or 'homeassistant-api'
csv:
annual_consumption: 4500 # total consumption in kWh p.a. the load profile
load_profile: load_profile.csv #name of the load profile file within the config folder
# Uncomment to use HomeAssistant API for consumption forecasting
# homeassistant_api:
# base_url: ws://homeassistant:8123 # Your HomeAssistant URL
# apitoken: YOUR_LONG_LIVED_ACCESS_TOKEN # Get from HomeAssistant Profile
# entity_id: sensor.energy_consumption # Entity ID with consumption data (in Wh or kWh)
# sensor_unit: auto # Options: 'auto' (default, auto-detect), 'Wh', or 'kWh'
# # Set to 'Wh' or 'kWh' to skip auto-detection (faster startup)
# # Use 'auto' for first-time setup or if you're unsure
# history_days: [-7, -14, -21] # Days to look back for historical data
# history_weights: [1, 1, 1] # Weight for each history period (1-10), higher = more influence
# cache_ttl_hours: 48.0 # How long to cache computed statistics (hours)
# multiplier: 1.0 # Multiplier for forecast adjustment (1.0=unchanged, >1.0=increase, <1.0=decrease)
#--------------------------
# evcc connection
# listen to evcc mqtt messages to lock the battery if the car is charging
# See more Details in: https://github.com/MaStr/batcontrol/wiki/evcc-connection
#--------------------------
evcc:
enabled: false
broker: localhost
port: 1883
status_topic: evcc/status
# one loadpoints that should be monitored
loadpoint_topic:
- evcc/loadpoints/1/charging
- evcc/loadpoints/2/charging
# if true (default) the battery will be locked while the car is charging.
# always_allow_discharge_limit is always relevant, together with the
# battery_halt_topic (if configured), evcc controls the battery lock state.
#
# overshot.
block_battery_while_charging: true
username: user
password: password
tls: false
cafile: /etc/ssl/certs/ca-certificates.crt
certfile: /etc/ssl/certs/client.crt
keyfile: /etc/ssl/certs/client.key
tls_version: tlsv1.2
# Optional:
# Choose which topic should deliver the limit for the battery
# below this limit the battery will be locked
# https://docs.evcc.io/docs/integrations/mqtt-api#site
# Active if following message appears:
# 'Enabling battery threshold management.
battery_halt_topic: evcc/site/bufferSoc