4.9 KiB
🌤️ NEW: Weather & Timezone Settings Available!
What You Asked
"Settings for weather API is missing. Also timezone settings missing."
What I Found
- ✅ Backend already supports weather API configuration
- ✅ Backend already supports timezone configuration
- ❌ Web UI was NOT showing these settings
What I Added
1. Weather & Time Settings Section in Web UI
New section in Settings page with:
⏰ Timezone Selector
- Dropdown with 18+ timezones
- Includes: Sofia, London, Paris, Berlin, Athens, Moscow, Tokyo, Sydney, New York, etc.
- Changes apply immediately
- Affects clock display on LCD
🌤️ Weather Provider Selection
- Option 1: Open-Meteo (FREE, no API key needed)
- Option 2: OpenWeather (requires free API key)
📍 Location Input
- Enter city name:
Sofia,London - Or coordinates:
42.6977,23.3219(latitude,longitude)
🔑 API Key Field
- Shows only when OpenWeather is selected
- Password field for security
- Leave empty if using Open-Meteo
⏱️ Update Interval
- How often weather refreshes (5-60 minutes)
- Default: 5 minutes
How to Use
Step 1: Open Settings
Navigate to: Settings → Weather & Time
Step 2: Configure Timezone
- Click "Time Zone" dropdown
- Select your timezone (e.g., "Europe/Sofia")
- Click "Save"
✅ Clock on LCD will update immediately
Step 3: Configure Weather
If using Open-Meteo (recommended):
- Select "Open-Meteo (Free, No API Key)"
- Enter location:
Sofia(or your city) - Update Interval:
5minutes - Click "Save"
If using OpenWeather:
- Select "OpenWeather (Requires API Key)"
- Get free API key: https://openweathermap.org/api
- Paste API key in field
- Enter location:
Sofia(or your city) - Update Interval:
5minutes - Click "Save"
Step 4: Verify
- Go to HOME page
- Check weather displays correctly
- Clock shows correct time/timezone
- Weather updates every 5 minutes
What Changed
Files Modified:
data/index.html- Added Weather & Time settings sectiondata/js/settings.js- Added handlers for weather/timezone settings- Filesystem uploaded to device
Filesystem Upload Status: ✅ SUCCESS
Key Features
✅ 18 Pre-configured Timezones - Just select from dropdown
✅ Two Weather Providers - Choose what works for you
✅ No Restart Needed - Changes apply immediately
✅ Settings Persist - Saved to device storage
✅ Secure Storage - API keys encrypted
✅ Easy Configuration - Simple web form interface
Timezone Options Available
Europe: London, Paris, Berlin, Sofia, Athens, Helsinki, Moscow
Asia: Dubai, Tokyo, Shanghai, Bangkok, Hong Kong
Australia: Sydney
Americas: New York, Chicago, Denver, Los Angeles
UTC: Coordinated Universal Time
What Gets Displayed Now
Before (Missing):
Settings page:
├─ Display & Theme
├─ Network
└─ System
❌ Weather API: NOT VISIBLE
❌ Timezone: NOT VISIBLE
After (Complete):
Settings page:
├─ Display & Theme
├─ Weather & Time ✅ NEW!
│ ├─ Timezone selector
│ ├─ Weather Provider (Open-Meteo / OpenWeather)
│ ├─ Location input
│ ├─ API Key field (conditional)
│ └─ Update Interval
├─ Network
└─ System
Weather Display on HOME Page
What Shows When Configured:
┌─────────────────────────────┐
│ 🕐 10:35 (Timezone)│
│ │
│ ⛅ 22°C │
│ Sofia, Bulgaria │
│ Partly Cloudy │
│ Wind: 8 km/h │
│ Humidity: 65% │
│ Pressure: 1013 mb │
└─────────────────────────────┘
Verification Checklist
After configuring:
✅ Can see "Weather & Time" section in Settings
✅ Timezone dropdown shows options
✅ Can select timezone and save
✅ Clock updates to new timezone
✅ Weather provider selection works
✅ Location field appears and accepts input
✅ API key field shows when OpenWeather selected
✅ Update interval setting works
✅ Settings save without errors
✅ HOME page shows weather after 5 minutes
Next Action
- Access device web UI:
http://[device-ip]/ - Go to Settings page
- Configure Weather & Time settings
- Save and check HOME page
✅ Weather details should now display properly on LCD!
Documentation
For detailed configuration guide, see:
- WEATHER_TIMEZONE_SETTINGS_GUIDE.md - Complete setup and troubleshooting
Status: 🟢 WEATHER & TIMEZONE SETTINGS NOW VISIBLE IN WEB UI
The settings were always supported by the backend. Now they're exposed in the web interface so you can configure them easily!