Summary
Run a once-daily job to fetch yesterday's actual weather from Tomorrow.io and report it to Netro, overwriting any forecast/realtime estimates previously reported for that date. Netro's report_weather API accepts dates "no earlier than yesterday", which we've confirmed by testing.
Why
- Realtime reports use precipitation intensity (mm/hr) as an approximation of daily total
- Forecast reports are predictions, not actuals
- Reporting yesterday's actual data gives Netro the most accurate historical record for its scheduling algorithm
Approach
- Use Tomorrow.io's
/v4/weather/history/recent or /v4/weather/forecast (which includes today's partial data) to get yesterday's actual daily values
- Run once per day, shortly after midnight (or on first poll after midnight)
- Report to each sprinkler device via
report_weather with yesterday's date
- Uses the same daily field mapping as forecast (
temperatureMax, rainAccumulationSum, etc.)
Token cost
- 1 Tomorrow.io API call + 1 Netro call per device = minimal impact
Questions to investigate
- Which Tomorrow.io endpoint returns yesterday's actual data? Options:
/v4/weather/history/recent — recent history
/v4/timelines with startTime and endTime — custom time range
- Does the free tier include historical data access?
Summary
Run a once-daily job to fetch yesterday's actual weather from Tomorrow.io and report it to Netro, overwriting any forecast/realtime estimates previously reported for that date. Netro's
report_weatherAPI accepts dates "no earlier than yesterday", which we've confirmed by testing.Why
Approach
/v4/weather/history/recentor/v4/weather/forecast(which includes today's partial data) to get yesterday's actual daily valuesreport_weatherwith yesterday's datetemperatureMax,rainAccumulationSum, etc.)Token cost
Questions to investigate
/v4/weather/history/recent— recent history/v4/timelineswithstartTimeandendTime— custom time range