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
6 changes: 3 additions & 3 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ src/batcontrol/
core.py # Main orchestrator
logic/ # Battery control decisions (default, next)
inverter/ # Backends: Fronius HTTP, Fronius Modbus, MQTT, Dummy
dynamictariff/ # Tariff providers: Awattar, Tibber, EVCC, EnergyForecast, NetworkFees
forecastsolar/ # Solar forecast: FCSolar, SolarPrognose, EVCC, HA-ML
dynamictariff/ # Tariff providers: Awattar, Tibber, evcc, EnergyForecast, NetworkFees
forecastsolar/ # Solar forecast: FCSolar, SolarPrognose, evcc, HA-ML
forecastconsumption/ # Consumption forecast: CSV, HomeAssistant
fetcher/ # HTTP caching helper
scheduler.py # Main loop
mqtt_api.py # State publishing + runtime config overrides
evcc_api.py # EVCC integration
evcc_api.py # evcc integration
```

## Architecture
Expand Down
4 changes: 2 additions & 2 deletions docs/development/15-min-transform.md
Original file line number Diff line number Diff line change
Expand Up @@ -971,7 +971,7 @@ class Tibber(DynamicTariffBase):
- Fetches data at target resolution (no conversion needed)
- **Action Required**: Verify API parameter for 15-min data

**Evcc** (`evcc.py`):
**evcc** (`evcc.py`):
```python
class EvccTariff(DynamicTariffBase):
def __init__(self, config: dict):
Expand Down Expand Up @@ -2203,7 +2203,7 @@ def test_backward_compatibility_60min():
- Create data collection guide for users

**4. Price Forecasts** ✅
- Evcc: Use native 15-min data when available
- evcc: Use native 15-min data when available
- Awattar/Tibber: Replicate hourly prices to quarters
- Future: Monitor for API updates offering 15-min granularity

Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started/how-batcontrol-works.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ The system validates configuration to prevent problematic behavior:

## External Integrations

### EVCC Integration
### evcc Integration
- **Purpose**: Coordinate with electric vehicle charging
- **Function**: Can lock battery discharge when car is charging
- **Configuration**: Monitors charging status and adjusts battery limits
Expand Down
6 changes: 3 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,16 @@ Batcontrol is an intelligent battery management system that optimizes your home
### External Systems
| Integration | Purpose | Documentation |
|-------------|---------|---------------|
| **EVCC** | Electric vehicle charging coordination | [EVCC Connection](integrations/evcc-connection.md) |
| **evcc** | Electric vehicle charging coordination | [evcc Connection](integrations/evcc-connection.md) |
| **MQTT/Home Assistant** | Home automation integration | [MQTT API](integrations/mqtt-api.md) |
| **MQTT Inverter** | Integrate any battery system via MQTT | [MQTT Inverter](integrations/mqtt-inverter.md) |

## 📋 Configuration Reference

### Supported Hardware
- **Inverters**: Fronius GEN24 series, Fronius Modbus TCP, MQTT inverter bridge
- **Dynamic Tariff Providers**: aWATTar, Tibber, EVCC integration, 2 Tariff Providers like Octopus
- **Solar Forecast**: Forecast.Solar, Solar-Prognose.de, EVCC integration
- **Dynamic Tariff Providers**: aWATTar, Tibber, evcc integration, 2 Tariff Providers like Octopus
- **Solar Forecast**: Forecast.Solar, Solar-Prognose.de, evcc integration
- **Consumption Forecast**: CSV-based load profiles

### File Structure
Expand Down
6 changes: 3 additions & 3 deletions docs/integrations/evcc-connection.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# EVCC Integration
# evcc Integration

Batcontrol can integrate with [evcc (Electric Vehicle Charging Controller)](https://evcc.io/) to intelligently manage battery usage during electric vehicle charging. This integration helps prevent unnecessary battery discharge while your EV is charging, optimizing your overall energy management.

Expand Down Expand Up @@ -87,7 +87,7 @@ The `battery_halt_topic` enables dynamic battery discharge limit management base
### Example Scenario

- Your normal `always_allow_discharge_limit`: `0.20` (20%)
- EVCC `bufferSoc` setting: `50` (50%)
- evcc `bufferSoc` setting: `50` (50%)
- **Result**: While EV charges, battery discharge is blocked above 50% SOC instead of 20%

## MQTT Topics Monitored
Expand Down Expand Up @@ -125,7 +125,7 @@ These are used by [peak shaving](../features/peak-shaving.md): peak shaving is a
2. **Limit Restoration**: Original discharge limit is restored
3. **Logging**: Batcontrol logs: `"evcc is not charging, remove block"`

### When EVCC Goes Offline
### When evcc Goes Offline
1. **Safety Mechanism**: If evcc goes offline while charging, blocks are automatically removed
2. **Limit Restoration**: Original settings are restored
3. **Logging**: Batcontrol logs: `"evcc went offline"` and `"evcc was charging, remove block"`
Expand Down
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ nav:
- MQTT API: integrations/mqtt-api.md
- Forecast Metrics: integrations/forecast-metrics.md
- MQTT Inverter: integrations/mqtt-inverter.md
- EVCC Connection: integrations/evcc-connection.md
- evcc Connection: integrations/evcc-connection.md
- Development:
- 15-Minute Interval Transformation: development/15-min-transform.md

Expand Down
4 changes: 2 additions & 2 deletions scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The `scripts` folder is separate from the `tests` folder to avoid interference w

### test_evcc.py

Standalone test script for the EVCC dynamic tariff module.
Standalone test script for the evcc dynamic tariff module.

**Usage:**
```bash
Expand All @@ -27,7 +27,7 @@ python scripts/test_evcc.py http://evcc.local/api/tariff/grid
```

**Features:**
- Tests the EVCC API integration
- Tests the evcc API integration
- Shows both raw API data and processed prices
- Provides detailed error information for debugging
- Displays hourly prices with proper formatting
Expand Down
12 changes: 6 additions & 6 deletions scripts/test_evcc.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env python3
"""
Standalone test script for the EVCC dynamic tariff module.
Standalone test script for the evcc dynamic tariff module.

This script allows you to test the EVCC API integration by providing a URL
This script allows you to test the evcc API integration by providing a URL
and seeing the fetched dynamic pricing data.

Usage:
Expand All @@ -28,20 +28,20 @@


def main():
"""Test the EVCC dynamic tariff functionality"""
"""Test the evcc dynamic tariff functionality"""
if len(sys.argv) != 2:
print("Usage: python scripts/test_evcc.py <url>")
print("Example: python scripts/test_evcc.py http://evcc.lan")
print("Example: python scripts/test_evcc.py https://your-evcc-instance.com/api/tariff/planner")
sys.exit(1)

url = sys.argv[1]
print(f"Testing EVCC API at: {url}")
print(f"Testing evcc API at: {url}")
print("=" * 50)

try:
# Initialize EVCC with Europe/Berlin timezone
print("Initializing EVCC client...")
# Initialize evcc with Europe/Berlin timezone
print("Initializing evcc client...")
evcc = Evcc(pytz.timezone('Europe/Berlin'), url)

# Fetch raw data first
Expand Down