josecastroleon / pimatic-openweather

Pimatic Plugin that retrieves the forecast on several devices
GNU General Public License v2.0
2 stars 9 forks source link

pimatic-openweather

Pimatic Plugin that retrieves the current weather and forecast data on several devices. Important notes:

Notable Changes with v9.0

Configuration

Plugin Configuration

Add the plugin to the plugin section:

{
  "plugin": "openweather",
  "apiKey": "xxxxxxxxxxxxx",
  "debug": false
}

Device Configuration

Then add the device with the location into the devices section:

{
  "id": "weather",
  "class": "OpenWeatherDevice",
  "name": "Weather Geneva",
  "location": "Geneva, CH",
  "units": "metric",
  "lang": "en",
  "timeout": 900000
}

If you need a forecast you can use the following device:

{
  "id": "forecast",
  "class": "OpenWeatherForecastDevice",
  "name": "Forecast 1 day for Geneva",
  "location": "Geneva, CH",
  "units": "metric",
  "lang": "en",
  "timeout": 900000,
  "day": 2
}

Then you can add the items into the mobile frontend.

Hiding Attributes

Attributes can be hidden from the display in the mobile frontend by using the xattributeOptions property as shown in the example below.

{
  "id": "weather",
  "class": "OpenWeatherDevice",
  "name": "Today",
  "location": "Geneva, CH",
  "units": "metric",
  "timeout": 900000,
  "lang": "en",
  "xAttributeOptions": [
    {
      "name": "humidity",
      "hidden": true
    },
    {
      "name": "pressure",
      "hidden": true
    }
  ]
}

Using the Blacklist Feature

Unfortunately, some weather stations emit false weather data. As a result for some locations false data is returned at times. The idea of blacklisting is to filter out such outlier results. A blacklist entry may consist of up to three of the following properties.

Additional Attributes

Most Attributes like temperature, wind or rain are self-explanatory. In addition to the status there are two more attributes provided by the openweatermap-api:

All provided categories, status and ids are listed here: https://openweathermap.org/weather-conditions