BCApis.Weather (bc_apis v0.1.0)
Weather service for integrating with Open-Meteo API.
Provides functions to fetch current weather data and correlate it with greenhouse environmental conditions.
Open-Meteo is a free, open-source weather API that doesn't require an API key.
Summary
Functions
Fetches current weather data for a given location.
Fetches UV index data for a given location.
Converts outdoor weather conditions to estimated greenhouse conditions.
Functions
Fetches current weather data for a given location.
Parameters
lat
: Latitude (float)lon
: Longitude (float)api_key
: Not used (Open-Meteo is free and doesn't require API key)
Returns
{:ok, weather_data}
on success{:error, reason}
on failure
Fetches UV index data for a given location.
Parameters
lat
: Latitude (float)lon
: Longitude (float)api_key
: Not used (Open-Meteo is free and doesn't require API key)
Returns
{:ok, uv_data}
on success{:error, reason}
on failure
Converts outdoor weather conditions to estimated greenhouse conditions.
Greenhouses typically have:
- Higher temperature (due to greenhouse effect)
- Higher humidity (controlled environment)
- Reduced light (filtered through glass/plastic)