Skip to content
This repository was archived by the owner on Aug 14, 2026. It is now read-only.

Commit aab3670

Browse files
committed
Use Open-Meteo & Forecast.solar API
1 parent f6e119c commit aab3670

8 files changed

Lines changed: 998 additions & 1932 deletions

File tree

‎README.md‎

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,21 @@ The system can automatically skip battery discharge when bad weather is forecast
3939
**Why this matters:** During consecutive bad weather days, solar panels will not generate enough power to recharge the battery. By skipping discharge before bad weather, the battery retains enough charge to cover household needs without importing from the grid.
4040

4141
**How it works:**
42-
- Fetches 7-day weather forecast from OpenWeatherMap
42+
- Fetches 7-day weather forecast from Open-Meteo (free, no API key required)
43+
- Gets solar production forecasts from forecast.solar for accurate predictions
4344
- Analyses conditions: rain, thunderstorms, drizzle, snow, high cloud cover (>70%)
4445
- If bad weather is expected for X consecutive days (configurable, default 2), discharge is skipped
4546
- Displayed in the web UI with forecast cards showing good/bad days
4647

4748
## Solar Output Estimates
4849

49-
When you configure your solar system capacity, the application displays estimated daily solar output for each forecast day. This helps you plan your energy usage and understand when discharge might be beneficial.
50+
When you configure your solar system details, the application displays estimated daily solar output for each forecast day. This helps you plan your energy usage and understand when discharge might be beneficial.
5051

5152
**How it works:**
52-
- Enter your inverter capacity (or panel capacity if known)
53-
- The system calculates expected output based on weather conditions
54-
- Estimates account for cloud cover, precipitation probability, and weather type
53+
- Enter your panel capacity (kWp), tilt angle, and direction
54+
- The system fetches accurate predictions from [forecast.solar](https://forecast.solar) API
55+
- Falls back to weather-based estimation if forecast.solar is unavailable
56+
- Estimates account for your specific location, panel configuration, and weather conditions
5557
- Displayed alongside the weather forecast cards
5658

5759
## Requirements
@@ -89,8 +91,8 @@ The web interface is available at `http://<server_ip>:7777`
8991
When you first access the web interface with default configuration, a **setup wizard** will guide you through:
9092

9193
1. **Deye Cloud Configuration** - Enter your API credentials and device serial number
92-
2. **Weather Integration** (optional) - Add OpenWeatherMap API key for weather-based features
93-
3. **Solar System Details** - Configure your inverter/panel capacity for energy estimates
94+
2. **Location Setup** (optional) - Search and select your location for weather forecasts (no API key required!)
95+
3. **Solar System Details** - Configure your panel capacity, tilt angle, and direction for accurate solar forecasts
9496

9597
Each step includes a **Test Connection** button to verify your settings before proceeding.
9698

@@ -117,15 +119,12 @@ You can also manually edit `config.json`:
117119
},
118120
"weather": {
119121
"enabled": true,
120-
"api_key": "YOUR_OPENWEATHERMAP_API_KEY",
121-
"city_name": "Sydney, New South Wales, AU",
122122
"latitude": -33.8688,
123123
"longitude": 151.2093,
124-
"bad_weather_threshold_days": 2,
125-
"bad_weather_conditions": ["Rain", "Thunderstorm", "Drizzle", "Snow"],
126-
"min_cloud_cover_percent": 70,
127-
"inverter_capacity_kw": 5,
128-
"panel_capacity_kw": 0
124+
"timezone": "Australia/Sydney",
125+
"city_name": "Sydney, New South Wales, AU",
126+
"min_solar_threshold_kwh": 15,
127+
"panel_capacity_kw": 6.6
129128
},
130129
"free_energy": {
131130
"enabled": false,
@@ -154,18 +153,21 @@ You can also manually edit `config.json`:
154153

155154
### Weather Configuration (Optional)
156155

156+
Weather and solar forecasts use free APIs (no API keys required!):
157+
- **Open-Meteo** for weather forecasts
158+
- **forecast.solar** for solar production predictions
159+
160+
Panel tilt and direction are automatically calculated from your location for optimal positioning.
161+
157162
| Field | Description |
158163
|-------|-------------|
159164
| `enabled` | Enable/disable weather-based discharge skip (default: false) |
160-
| `api_key` | OpenWeatherMap API key ([get free key](https://openweathermap.org/api)) |
161-
| `city_name` | City name (selected via autocomplete in UI) |
162165
| `latitude` | Your location latitude |
163166
| `longitude` | Your location longitude |
164-
| `bad_weather_threshold_days` | Number of consecutive bad days to trigger skip (default: 2) |
165-
| `bad_weather_conditions` | Weather conditions considered "bad" for solar |
166-
| `min_cloud_cover_percent` | Cloud cover % threshold for bad weather (default: 70) |
167-
| `inverter_capacity_kw` | Your inverter capacity in kW (for solar estimates) |
168-
| `panel_capacity_kw` | Your panel capacity in kW (optional, overrides inverter capacity) |
167+
| `timezone` | Your timezone (e.g., "Australia/Sydney") or "auto" |
168+
| `city_name` | City name (for display, selected via autocomplete in UI) |
169+
| `min_solar_threshold_kwh` | Minimum expected solar kWh to allow discharge (default: 15) |
170+
| `panel_capacity_kw` | Your panel capacity in kWp (optional - auto-estimated from inverter if not set) |
169171

170172
### Free Energy Window (Optional)
171173

0 commit comments

Comments
 (0)