It was previously posted on the Automagically blog in Swedish; though it made better use here in english.
STEP 1 - Set up the data fetcher
In /admin/core, add a data fetcher with the following properties:
- Fetch type: URL
- Parser Type: XPath
- URL:
- Path: /current/temperature/@value
Code: Select all
datafetcher,3,Openweathermap,fetched:-10
- Fetch type: URL
- Parser Type: XPath
- URL:
- Path: /weatherdata/forecast/tabular/time[1]/temperature/@value
Code: Select all
datafetcher,4,YR.no,fetched:6
In /admin/core, add a Global variable with the following properties:
- Data type: Integer
After a few refresh, the following will appear if you have enabled signal debug.
Code: Select all
datafetcher,3,Openweathermap,fetched:4
Code: Select all
datafetcher,3,Openweathermap,fetched:%d
Now, click on "Store global variable" and then "Save"
On the next page you select your previously created variable in "Variable to update" and click "Save"
Now you have a data variable that is updated at your selected interval.
Step 2 - Add it to your remote
To get the variable in your remote, follow these steps.
In /admin/core, add a "Variable value" with the following properties:
- X,Y: The location on the remote
- Var: The above created variable selected in dropdown
Step 4 - Integer to Float
- Create a Float variable as desribed above
- In /admine/signals create a transform:
- Pattern to match: datafetcher,3,Openweathermap,fetched:%d
- Send: changed_ow_temp:$1.0
- In /admin/signals create a store global values:
- Pattern to match: changed_ow_temp:%f
- Var: Select your above created float variable
- Throw it to your remote
/Marcus