A mobile-friendly React + Vite single-page app for Berlin's weather and solar forecast, ready for GitHub Pages deployment.
- PWA support - install as app on mobile/tablet (iOS, Android, desktop)
- Fetches weather forecast for Berlin from Open-Meteo API
- Displays temperature, weather code (with icons/tooltips), sunshine hours, sunrise/sunset
- Highlights current date row
- Two toggles: show/hide estimated solar power, show/hide sunrise/sunset (states saved in localStorage)
- Smart solar power prediction using shortwave radiation and sunshine hours:
- Daily and hourly production estimates based on historical patterns
- Uses shortwave radiation (preferred) or sunshine hours with monthly adjustment
- Click any day to see detailed hourly weather and power estimates
- Interactive features:
- Expandable rows show hourly weather and estimated production
- Current hour highlighted in hourly view
- Automatic scrolling to current hour for today's expanded view
- Chart.js graphs for estimated power and historical production
- Mixed hourly Chart.js graph on day click with temperature, sunhours, and expected production
- Responsive, plain CSS (no Tailwind)
src/App.jsx: Main app logicsrc/components/Card.jsx,CardContent.jsx: Card UI componentssrc/index.css: Styles for cards, tables, toggles, etc..devcontainer/devcontainer.json: Node dev container.github/workflows/deploy.yml: GitHub Pages auto-deployvite.config.js,index.html,package.json: Vite/React setupenrich_solar_data.js: Enriches your CSV production data with sunshine hours and shortwave radiation, computing kWh-per-hour and kWh-per-radiation factors (writesoutput.json,output.csv, and monthly averages)
npm install
npm run devOn mobile/tablet, open in Chrome or Safari, then:
- Chrome/Android: Menu → "Install app" or "Add to Home screen"
- Safari/iOS: Share → "Add to Home Screen"
- Desktop: Address bar install icon (Edge/Chrome)
npm run buildPush to main branch to auto-deploy via GitHub Actions.
A private Alexa-hosted skill for the balcony solar forecast lives in alexa/. It reuses the same Open-Meteo forecast inputs and monthly production factors, and can be invoked as Balkonkraftwerk after importing the interaction model and hosted Lambda package.
node enrich_solar_data.js input.csv
# Produces output.json (with radiation data), output.csv, and output_monthly.json (conversion factors)- Weather API: Open-Meteo
- Icons: Lucide React
- Charts: Chart.js with React bindings
MIT (see LICENSE)