-
Notifications
You must be signed in to change notification settings - Fork 1
OpenWeatherMap_connector
Reads weather forecast data from http://openweathermap.org, and writes the forecasts to the respective resources. The driver does not provide a user interface, for the time being.
Icon An API key is required for this driver, please register at http://openweathermap.org/register. The key must be set as system property (e.g. in the rundir file config/ogema.properties):
* org.ogema.drivers.openweathermap.key*
Register a service dependency to the interface org.ogema.apps.openweathermap.OpenWeatherMapApplicationI, and create an environment setting as follows
@org.apache.felix.scr.annotations.Reference
OpenWeatherMapApplicationI owmUtil;
@Override
void start(ApplicationManager appManager) {
Room environment = (Room) owmUtil.createEnvironment("kasselEnvironment", "Kassel", "de");
...
}
The connector will create a set of resources including a TemperatureSensor, SolarIrradiationSensor and HumiditySensor, with the respective forecast schedules, and write the schedule values periodically.
Properties that are evaluated (see ogema.properties):
Property key | Value | Default | Explanation |
---|---|---|---|
org.ogema.drivers.openweathermap.getWeatherInfoRepeatTime | long value, interpreted as time interval in ms | 600000000 (10 min) | Irradiation schedule calculation period |
- Back to Public Applications and Drivers