Use solar insolation as dusk relay

Göteborg Energi is measuring the solar insolation (W/m²) in the western part of Göteborg and is publishing this value as a RSS feed. You can find more information here.

In this guide you will find step-by-step instructions for how to create a data source that reads the solar insolation and then use this value as a dusk relay for a device.

1. Create data source

The RSS feed from Göteborg Energi can be read as a file in Switch King. The file looks like this:

<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Solinstrålning</title>
<link>http://www.goteborgenergi.se</link>
<description>Mätvärden för Solinstrålning</description>
<item>
<title>Aktuellt mätvärde för Solinstrålning</title>
      <pubDate>Mon, 16 Nov 2009 12:20:00 GMT</pubDate>
<description>61 W/m2</description>
<guid>2755:Current:2009-11-16 13:20</guid>
<link />
</item>
</channel>
</rss>

Start with creating the data source (File - New - Data Source) and select "Values from a file" in the first step and then select "Character separated" in the second step. Enter the information as below where the file path should be:

http://www.goteborgenergi.se/Lib/EnergyView/Rss.ashx?MeasureId=2378&Type=Current&Images=False

Both ">" and "<" will be accepted as separator characters.

Skapa datakälla

Enter how often the value should be collected (the value from Göteborg Energi is updated every 10 minutes) and minimum/maximum value as well as unit.

Skapa datakälla

Switch King will start to collect the value for solar insolation value when the data source has been saved.

2. Create group schedule and create rule

Select New - Group Schedule in the File menu to create your group schedule.

Skapa gruppschema

Click the Add Rule button in the Rules tab. Select the data source for solar insolation and define at what level you wish the device that is using the schedule to be on.

Skapa regel för solinstrålning

After the rule has been created it will be automatically selected for the group schedule.

Markera regel för gruppschema

Save the group schedule that is now controlled by how strong the sun is shining.

3. Link the group schedule to a device

Select that you want to use the new group schedule for the device to be controlled.

Länka gruppschema till enhet

Then clear Take sunrise/sunset into consideration in the Functions tab.

Ta inte hänsyn till solens upp och nedgång

Done! The device will now be turned on according to the new group schedule when the solar insolation is below20 W/m².