Indigo OpenWeatherMap Plugin

Introduction

The default available plugins for Indigo on retrieving Weather data seem to be oriented highly on the US market. After some fiddling with it, I decided I liked my old screen which I had built in Homeseer and decided I wanted that back. Therefore I needed weather data and also some weather pictures. This was the base for the FCIM OpenWeatherMap plugin. It reads weather data from the OpenWeatherMap site and stores that in Indigo custom devices. In this way you can use that information e.g. in control pages, actions or even in python scripts.

weather-1.jpg

The FCIM OpenWeatherMap plugin needs some configuration (next paragraph) so it knows for which place on earth you want to retrieve the weather data. After starting and configuring the plugin, it will continue to run and retrieve weather data at a regular interval from the OpenWeatherMap website. This weather data is stored in custom devices. There is one custom device for the current weather, which contains the following information:

  • Temperature
  • Minimum temperature
  • Maximum temperature
  • Pressure
  • Humidity
  • Wind Speed
  • Wind Degree
  • Clouds
  • Short weather description
  • Long weather description
  • A reference to a description id
  • A reference to a weather icon

Further, the plugin will have weather information for some days in the future. You can configure that within some boundaries. The future weather information contains the same information as described above with some changes. There is no “temperature”  reading. Instead, the forecast will show temperature information for four moments in the day:

  1. Day Temperature
  2. Night Temperature
  3. Evening Temperature
  4. Morning Temperature

Installing

  • Open a webbrowser on your Indigo server and download the plugin file.
  • After downloading, double click it, and it will automatic be installed in Indigo.
  • Design your own weather icons. Or use my OWMicons whatever works for you.
  • Store your weather icons in  /Library/Application Support/Perceptive Automation/Indigo 6/IndigoWebServer/images/controls/devices

You are good to go. Go to the Indigo “Plugins”  menu, find FCIM OpenWeatherMap and enable this plugin.

Configuring

To get the plugin working, you need to enter a few configuration parameters. Make sure you receive your Api key from OpenWeatherMap (it is a free service for normal home usage). Now your are able to download information via the Api. Determine the City Id for which you want to retrieve the weather information. A list of City ID’s can be retrieved from the OpenWeatherMap site as well.

Have a look at the following screen:

configscreen

 

Enter your Api Key and City Id. Determine the language you want to use for your weather text and the metric system you are in. Further you can change the amount of days you want to have a weather forecast. Default I would suggest 5 days. Next step is to enter the update interval. How fast do you want to receive new weather information. The plugin does not allow you to go below the minimum of 60 minutes. The weather will not change that fast, and in this way you will prevent over asking the free service. Last you can change the amount of digits behind the comma. Probably zero or one will be the best answer.

The last check box is the debug check box. Use this with care, since it will generate more output to your Indigo logfile. Use it only for a short moment of time to determine the cause of issues.

Save your configuration and reload your plugin.

Running

After the configuration is accepted, the plugin will start and continue running. At every time interval the weather information is renewed and stored in the “OWM Day x” devices created by the plugin (x will be zero to the amount days to have configured). Unless you stop the plugin manually, it will stay running forever. If errors might occur, they will occur in the Indigo logfile.