Summary

This plugin for Indigo extends the Indigo Home Automation system with weather information retrieved from the Dutch websites weerlive.nl and buienradar.nl. It also retrieves information from OvenUV.io. Finally it also calculates the moon phase.

The plugin can be found in the Indigo plugin store.

This plugin retrieves information from published API’s from above websites in a scheduled manner. This documentation is up to date for version 1.1.1 of the plugin. The plugin is licensed according to the GNU General Public License.

Requirements

  • You will need this plugin from the Indigo plugin store.
  • Python 2.7 is needed for Indigo plugins.
  • The plugin is tested with Indigodomo Version 7.5.
  • An API key from weerlive if you want to retrieve the 3-day forecast
  • An API key form OpenUV.io if you want to retrieve the UV index.

Plugin Setup

Download and install the plugin in the usual way for Indigo. It will announce itself in the log with the words “Weerlive”. Minor configuration is needed to get the plugin working. It will show the configuration screen like this:

You can get an API key from Weerlive for personal use. If not already done, generate your key via the above website and add it here to the Plugin configuration screen.

The Plugin configuration form is divided into five parts with a horizontal bar.

1) Forecast

If you want to receive 3-day weather forecast, enable the checkbox, and fill in your API key for the Weerlive site. Per default the interval between renewing information is 10 minutes. Do not use a shorter interval since there the API will not deliver newer information at a faster pace.

To have forecasts actual retrieved:

  • enable the above checkbox
  • add a valid API key
  • Have a “Weerlive” device-type in Indigo
  • Have the new device enabled for Indigo communication

2) UV Index

If you want to receive information from the OpenUV website enable the second checkbox. A field appears to enter your openUV Access token.

The free version of the OpenUV API does not allow more than 50 calls per day (March 2021). Adding more than 50 in the Max API calls per day will give you 403 errors during the day, unless you decide to pay for the professional version. The amount of allowed calls entered here is used during a 24 hour period. The plugin will start with a 30 minute interval until it has sun-up and sun-under information. From there it will divide the max amount of calls over the time the sun is up. In this way newer information is received as fast as possible during the time it matters.

OpenUV also has an option to receive UVindex forecast information. See their website. This info is received at at startup of the plugin and from there every day at a time choose by you in the plugin configuration. The forecast is theoretical, it does not take clouds etc. into account. Check the box to receive that information.

To have information retrieved:

  • enable the above checkbox for the Actual UV Index
  • add a valid API key
  • Have an “UV Actual” device-type in Indigo
  • Optional have an “UV Forecast” device-type in Indigo
  • Have the new device(s) enabled for Indigo communication

3) Rain Precip

If you want to receive information from the Dutch Buienradar website, enable this checkbox. Per default the interval between renewing information is 10 minutes. Do not use a shorter interval since there the API will not deliver newer information at a faster pace.

If you want the plugin to store the rain precipitation information for the next 2 hours (in 5 minute intervals) into a CSV file for use with Matplotlib, check the box. Note that if Matplotlib is not installed, the CSV will not be created.

To have forecasts actual retrieved:

  • enable the above checkbox for Buienradar
  • Have a “Buienradar” device-type in Indigo
  • Have the new device enabled for Indigo communication

4) Moon Phase

The plugin calculates the current moon phase if you hit the relevant checkbox. A field appears which allow you to choose the language used to describe the moon phases. In the current version only Dutch and English are available. If there is a request for other languages, let me know.

To have the moonphase calculated:

  • enable the above checkbox for Moonphase
  • Have a “Moon” device-type in Indigo
  • Have the new device enabled for Indigo communication

The moon phase is recalculated every hour.

5) General

Write down the names in your preferred language how you want to have the day names displayed in the device. Start with Monday and have all seven days written down, separated with a comma.

The last options is for debugging purposes. The Log level (verbose or normal) tells you have much information you want to receive from this plugin. “Normal” should do perfect once everything is setup.

Save your setup. The plugin will pick up this information and start accordingly.

Device

Create devices which makes use of this plugin. You will use devices with the model ‘Weerlive’, ‘Buienradar’, ‘UV’, ‘UV Forecast’, ‘Moon’. These devices will have the default Indigo device properties next to the properties retrieved from the plugin.

If you do not create a device type, the corresponding information will not be retrieved. If you disable the device for Indigo communication the info is not refreshed.

Some configuration might be needed to get the devices working: You can change the default latitude and longitude for which the plugin will retrieve weather information. If you do not change this, the default configured Indigo location will be used. For most users this will do. Using this config allows you to track weather for e.g. two different locations.

The plugin will retrieve or calculate information and add that information to the device states. The specific states for each device model are described below:

Model Weerlive

TriggerLabelState IdDescription
TownplaatsLocation based on the requested longitude, latitude
Now TemptempCurrent Temperature measured the last 10 minutes
Now Feels LikegtempCurrent perceived temperature
SummarysamenvA short description of the current weather
Now HumiditylvCurrent relative humidity percentage
Now Wind directionwindrWind direction (one or two characters)
Now Wind direction (degrees)windrgrWind direction (in degrees)
Now Windspeed (m/s)windmsCurrent wind speed in meters per second
Now Windspeed (Bf)windsCurrent wind speed in Beaufort
Now Windspeed (Kn)windkCurrent wind speed in knots
Now Windspeed (Km/h)windkmhCurrent wind speed in km/h
Now Pressure (mb)luchtdPressure in mb
Now Pressure (mm)ldmmhgPressure in mm Hg
Now DewpointdauwpDewpoint in degree C
Now VisibilityzichtVisibility in km
Now ExpectationverwShort description for today
Sun UpsupSun Up time
Sun UndersunderSun Under time
imageimageWeather icon for today
<day> Day of Weekd?dayDay of week for this measurement (Today, Tomorrow, or Day after Tomorrow)
<day> Weather icond?weerWeather icon for this day
<day> MaxTempd?tmaxMax temperature for this day (C)
<day> MinTempd?tminMin temperature for this day (C)
<day> Windspeed (Bf)d?windkWind speed in Beaufort for this day
<day> Windspeed (Kn)d?windknpWind speed in knots for this day
<day> Windspeed (m/s)d?windmsWind speed in m/s for this day
<day> Windspeed (Km/h)d?windkmhWind speed in km/h for this day
<day> Winddirectiond?windrWind direction (one or two characters) for this day
<day> Wind direction (degrees)d?windrgrWind direction (in degrees) for this day
<day> Precipd?neerslagRain precip for this day (percentage)
<day> Sun %d?zonSun percentage for this day
AlarmtextalarmtxtAlarm text if “1” in the field “AlarmText Present”
AlarmText PresentalarmShows if an Alarm text message is present
lastSuccesfullRunlastSuccesfullRunLast time the plugin part for this model type did run completely.
nextPlannedUpdatenextPlannedUpdateNext scheduled time that the plugin will try to retrieve the information for this model

Note: <day> can be “Today” , “Tomorrow” or “DayAfterTomorrow”

Model UV Actual

TriggerLabelState IdDescription
UV IndexuvindexUv index as received from the website, float, rounded at 2 decimals
UV Index RoundeduvintUv index als above but rounded down to an integer value
UV Max IndexuvmaxMaximum uv index for today as received from the website, float, rounded at 2 decimals
UV Index NameuvnameA short description of the uv index, according to the agreed standards. Can be Low, Moderate, High, Very High and Extreme. If another language is selected at the plugin configuration you might see other values.
Last UV measurementuvtimeTime of day (local) the uv index was last updated at the website
solar NoonsolarNoonTime of day (local) the sun was at it highest point
sunrise EndsunriseEndTime of day (local) the sunrise was finished. (Sun fully up)
sunset StartsunsetStartTime of day (local) the sunset has started. (Sun not fully down)
nightnightTime of day (local) the night has started.
Ozone levelozoneOzone level in du (Dobson Units)
Last Ozone measurementluchtdTime of day (local) the ozone level was last updated at the website
safeExposure_<s>safe_st<s>safe exposure time (mins) till burn for Skin Type <s>
lastSuccesfullRunlastSuccesfullRunLast time the plugin part for this model type did run completely.
nextPlannedUpdatenextPlannedUpdateNext scheduled time that the plugin will try to retrieve the information for this model

Note: <s> references a skin type from 1 to 6

Model UV Forecast

TriggerLabelState IdDescription
MaxExpectedMaxExpectedMaximum expected UV Index for today, float, rounded at 2 decimals
MaxHourMaxHourExpected hour in which the maximum above will occur
UVForeCastHour_<h>UVForeCastHour_<h>Expected UV Index for this hour of today, float, rounded at 2 decimals
lastSuccesfullRunlastSuccesfullRunLast time the plugin part for this model type did run completely.
nextPlannedUpdatenextPlannedUpdateNext scheduled time that the plugin will try to retrieve the information for this model

Note: <h> references a clock hour from 0..23 (no leading zero)

Model Buienradar

TriggerLabelState IdDescription
Rain next <m> Minutesrain<m>minutesExpected rain in mm for the next time period minutes
lastSuccesfullRunlastSuccesfullRunLast time the plugin part for this model type did run completely.
nextPlannedUpdatenextPlannedUpdateNext scheduled time that the plugin will try to retrieve the information for this model

Note: <m> references the numbers 010, 060 or 120 as the amount of minutes for this forecast windows

Model Moon

TriggerLabelState IdDescription
Phase Icon IndexPhaseIconIndexAn integer between 0..7 describing the current moon phase. This integer can e.g. be used to retrieve a certain picture of the moon. The number can be read as an index to the names described below at moonPhaseName.
Phase Icon NamePhaseIconNameAn integer value between 0 and 100 describing the current moon illumination. This can be used for having detailed moon icons
Phase NamePhaseNameA description of the moon phase. Used are “New Moon”, “Waxing crescent”, “First quarter”, “Waxing gibbous”, “Full Moon”,
“Waning gibbous”, “Last quarter”, “Waning crescent” or the same terms in another language as chosen in the Plugin configuration.
lastSuccesfullRunlastSuccesfullRunLast time the plugin part for this model type did run completely.
nextPlannedUpdatenextPlannedUpdateNext scheduled time that the plugin will try to retrieve the information for this model

Running state

If everything works as expected and the configuration has expected values, the plugin will start the first measurements soon. From that moment on the plugin will deliver the output to the device(s).

New information for a specific device model will be retrieved at a certain scheduled intervals. This is depending on the plugin configuration and the availability of new information. Next to startup:

  • Weerlive and Buienradar models will retrieve information per default every 10 minutes. You can change that in the plugin configuration.
  • UV Actual information will be retrieved between sunriseEnd and sunriseEnd at an interval in such a way that we stay within the configured amount of calls to the API. Do not use more than 50 to stay within the free limit.
  • UV Forecast information will be retrieved every day at 08:00, or at any other moment you configured.
  • The Moon phase will be calculated every hour.

Rain picture

If the plugin Matplotlib is found in Indigo and the checkbox is set in the configuration, the Weerlive plugin will retrieve the location of CSV flies from the IndiPref file of Matplotllib. New measurements from Buienradar will be saved in file “buienradar.csv” in the Matplotlib data CSV destination.

Next, create a new plot device in Matplotlib and refer to this CSV input. In that way you can have a graphical view on the rain precipitation for the next two hours on your screen. Have a look at Matplotlib documentation on how to work with this. Dave has done a great job here! The data is refreshed every 10 minutes, depending our plugin configuration, take that into account when creating the graph.

UV Index

The UV Index forecast is calculated. It does not take into account the amount of clouds.

For the meaning of skin types read at the OpenUV website or google it.

Known issues

  • After a few restarts during the day it may occur that you run into “403” errors for retrieving UV data. This means you went over your maximum amount of call. This issue will resolve itself in the next day.
  • The plugin is designed for one device per type. It does not complain if you add multiple devices; however they are not filled due to time restrictions on the download function.
  • If you find something please let me know so we can help the community.

Remember to active verbose logging in the plugin config if something is not working as expected. It might give you a hint what is wrong.