Solar Monitoring β
MeshMonitor provides integrated solar production monitoring and visualization to help optimize off-grid Meshtastic deployments. By integrating with the forecast.solar API, you can monitor expected solar power generation and correlate it with your node's telemetry data.
Overview β
The solar monitoring feature automatically fetches solar production estimates from forecast.solar based on your configured location and solar panel parameters. These estimates are displayed as translucent overlays on telemetry graphs, allowing you to:
- Predict when your solar-powered nodes will have sufficient power
- Correlate battery charging patterns with solar production
- Plan maintenance windows during peak solar production
- Optimize solar panel placement and orientation
Configuration β
Solar Panel Settings β
To enable solar monitoring, navigate to Settings and configure the following parameters:
Required Settings β
- Latitude: Geographic latitude of your solar installation (-90 to 90)
- Longitude: Geographic longitude of your solar installation (-180 to 180)
- Declination: Tilt angle of your solar panels from horizontal (0-90 degrees)
- 0Β° = Horizontal (flat)
- 90Β° = Vertical
- Most installations use 20-40Β° depending on latitude
- Azimuth: Compass direction your panels face (0-360 degrees)
- 0Β° = North
- 90Β° = East
- 180Β° = South (optimal in Northern Hemisphere)
- 270Β° = West
Additional Configuration Details β
- API Requests: Estimates are automatically fetched hourly at :05 minutes past the hour
- Data Retention: Solar estimates are stored in the database for historical analysis
Validation β
After configuring your settings, click Save Settings. MeshMonitor will begin fetching solar estimates on the next hourly cycle. You can verify the configuration is working by:
- Navigating to the Telemetry Dashboard or Node Details page
- Looking for the translucent yellow overlay on telemetry graphs
- Checking that solar estimates appear in graph tooltips
Visualization β
Telemetry Graphs β
Solar production estimates appear as translucent yellow area overlays on all telemetry graphs showing time-series data.
Features β
- Dual Y-Axes: The left axis shows telemetry metrics (battery %, voltage, etc.), while a hidden right axis scales the solar estimates
- Automatic Alignment: Solar forecast timestamps are matched to telemetry data points using nearest-neighbor search (within 1-hour window)
- Tooltip Integration: Hover over any data point to see both telemetry values and the corresponding solar estimate
- Auto-Refresh: Solar data refreshes automatically every 60 seconds to show the latest forecasts
Display Locations β
Solar overlays appear on:
- Node Details page: Telemetry graphs for individual nodes
- Telemetry Dashboard: All favorite telemetry charts
- Any time-series telemetry visualization
Visual Design β
- Color: Translucent yellow (
#f9e2afwith 30% opacity) - Overlay: Sits behind telemetry line charts to avoid obscuring data
- Scale: Automatically scaled to match the visible range of telemetry data
Data Management β
Automatic Fetching β
MeshMonitor automatically fetches solar estimates using a cron scheduler:
- Schedule: Runs at :05 minutes past every hour (e.g., 1:05, 2:05, etc.)
- Forecast Range: Retrieves up to 500 data points per request
- Upsert Logic: Uses
INSERT OR REPLACEto handle overlapping forecast timestamps - Silent Failure: If solar monitoring is not configured, fetching silently skips without errors
Manual Triggering β
For testing or immediate updates, you can manually trigger a solar estimate fetch:
curl -X POST http://your-meshmonitor:8080/api/solar/triggerThis is useful for:
- Testing your solar configuration
- Updating estimates after changing panel parameters
- Debugging forecast data issues
Database Storage β
Solar estimates are stored in the solar_estimates table with:
- Timestamp: Unix epoch seconds (stored as INTEGER)
- Watt-Hours: Estimated solar production at that timestamp
- Unique Constraint: Prevents duplicate entries for the same timestamp
API Endpoints β
Get Recent Estimates β
GET /api/solar/estimates?limit=500Parameters:
limit(optional): Maximum number of estimates to return (default: 100, max: 500)
Response:
[
{
"timestamp": 1704067200,
"watts": 125
},
{
"timestamp": 1704070800,
"watts": 250
}
]Get Estimates for Time Range β
GET /api/solar/estimates/range?start=1704067200&end=1704153600Parameters:
start(required): Unix timestamp (seconds) for range startend(required): Unix timestamp (seconds) for range end
Response:
[
{
"timestamp": 1704067200,
"watts": 125
},
{
"timestamp": 1704070800,
"watts": 250
}
]Trigger Manual Fetch β
POST /api/solar/triggerResponse:
{
"success": true,
"message": "Solar estimates fetched successfully"
}Technical Details β
Data Flow β
- Configuration: User configures solar panel parameters in Settings
- Scheduling: Cron job runs hourly at :05 minutes past the hour
- API Request: MeshMonitor queries forecast.solar with configured parameters
- Storage: Estimates are stored in SQLite database with unique timestamp constraint
- Retrieval: Frontend fetches estimates via
/api/solar/estimatesendpoint - Alignment: Nearest-neighbor algorithm matches forecast timestamps to telemetry data
- Rendering: Recharts ComposedChart displays solar overlay with telemetry lines
Timestamp Handling β
- API Storage: Unix seconds (INTEGER in database)
- Frontend: Converts to milliseconds for JavaScript Date objects
- Matching: Nearest-neighbor search within 1-hour (3600000ms) window
- Alignment: Ensures forecast data aligns with telemetry data points even when timestamps don't match exactly
Performance Considerations β
- Fetch Frequency: Hourly fetching minimizes API calls while maintaining fresh data
- Data Limit: 500 estimate limit prevents excessive memory usage
- Caching: Database storage acts as cache to reduce API dependencies
- Lazy Loading: Solar data loads independently and doesn't block telemetry display
forecast.solar Integration β
MeshMonitor uses the free forecast.solar API, which provides:
- No Registration Required: Free tier works without API keys
- Global Coverage: Works anywhere in the world
- Accurate Forecasts: Uses weather data and solar physics models
- Future Estimates: Provides multi-day forecasts for planning
For high-traffic deployments, consider the forecast.solar paid tiers for:
- Higher rate limits
- Extended forecast periods
- Commercial support
Use Cases β
Battery Monitoring Correlation β
Compare battery levels with solar production to:
- Identify charging inefficiencies
- Detect failing solar panels or charge controllers
- Optimize battery bank sizing
Network Planning β
Use solar forecasts to:
- Schedule network maintenance during peak production hours
- Plan firmware updates when batteries will be fully charged
- Predict when remote nodes may go offline due to insufficient solar
Off-Grid Optimization β
- Determine optimal panel tilt for your latitude
- Analyze seasonal production variations
- Size battery banks based on worst-case solar scenarios
Performance Monitoring β
- Detect underperforming panels (actual vs forecast)
- Identify shading issues affecting production
- Track long-term solar system degradation
Troubleshooting β
No Solar Overlay Appearing β
Possible Causes:
- Solar monitoring not configured (latitude/longitude missing)
- No data available yet (wait for next hourly fetch at :05)
- API request failed (check server logs)
- Telemetry time range doesn't overlap with forecast data
Solutions:
- Verify solar settings are saved in Settings tab
- Manually trigger a fetch:
POST /api/solar/trigger - Check browser console for API errors
- Verify telemetry date range includes future timestamps
Incorrect Estimates β
Possible Causes:
- Wrong latitude/longitude configured
- Incorrect azimuth or declination settings
- Panel capacity not matching actual installation
Solutions:
- Verify location coordinates are accurate
- Use a compass to confirm panel azimuth
- Measure panel tilt angle with protractor or angle finder
- Update settings and trigger new fetch
API Rate Limiting β
Symptoms:
- Estimates stop updating
- 429 HTTP errors in server logs
Solutions:
- Reduce fetch frequency (modify cron schedule)
- Consider forecast.solar paid tier for higher limits
- Contact forecast.solar support if issues persist
Privacy & Security β
- No Personal Data: Only solar panel configuration is sent to forecast.solar
- No Authentication Required: API calls don't include user information
- Optional Feature: Solar monitoring is completely optional and can be left unconfigured
- Local Storage: All fetched estimates are stored locally in your MeshMonitor database
Related Documentation β
- Settings - Configure solar panel parameters
- Telemetry Visualization - Understanding telemetry graphs
- API Reference - Complete API documentation
- Database Schema - Solar estimates table structure
Version History β
- v2.14.0: Added solar overlay to Telemetry Dashboard
- v2.13.0: Initial solar monitoring integration with forecast.solar
- v2.12.0: Added solar panel configuration UI in Settings