This page last changed on Aug 08, 2014 by placemaster.

I am trying to get a reliable way of getting weather data from Weatherunderground. From Use XML Data Sources I had a lot of help but not sufficient for my knowledge.
I want to get at a 10 minute interval a xml file that is stored on my synology (/volume1/@appstore/OpenRemote/webapps/private/). The XML file should be named forecast.xml.

With the script below (from the thread earlier mentioned) it should work.

I have stored this script at /volume1/@appstore/OpenRemote/webapps/private/script/weather.sh
Is this a good location or should it be placed elsewhere?

Now my questions:
How can I run this script using crontab.

I have installed cronjob editor on my Synology to help. But I am stuck.
I am able to create a new cronjob but I don't know the command I have to use.

After this I need to manage how to be able to read the xml file from a HTTP call.
I see the Mr. Zanstra was able to read the file and extract some info. When I use his example I do not get any response.

Of course I adjusted the URL to my location.

I understand it is a lot of info and many questions. But it would be super when I finally get it up and running.
Of course I will share the results so others are able to use the info.


code.PNG (image/png)
Cronjob.PNG (image/png)
command.PNG (image/png)
Controller.PNG (image/png)

The command in crontab should be:

/volume1/@appstore/OpenRemote/webapps/private/script/weather.sh

Make sure this script has read/write/execute permissions.
On my installation the rights are:

Owner:OpenRemote
Group:Users

In a terminal session I did edit with VI the file /etc/crontab

#minute hour    mday    month   wday    who     command
*/14    *       *       *       *       root    /volume1/@appstore/OpenRemote/webapps/private/weatherlogger.sh

I do not know the cronjob editor.

This makes that Wunderground is read every 14 minutes. The 14 minutes were set to avoid exceeding the allowed requests underthe free licence.

Posted by pz1 at Jun 30, 2014 08:13

Thanks Mr. Zanstra to help me out.

The crontab works. It generates the file every 15 minutes.
The XML file does have read/write/execute permissions.

But I still can not acces the file from within openremote. I have tried to switch rights (Owner and Group)from root to openremote and viceversa. But still no luck.

In the thread Get Weather information from XML it is mentioned that a tomcat server is used.
I know there is a tomcat server included in OR. Do I need to start this server or is it always running?

Found the solution! You just need to use the port set at the controller.

In my case the URL is : http://10.10.10.10:18581/private/NIJMEGEN.xml

Now I can set up several commands to extract the data using Xpath.
Also a first test shows a good result. Now it is time for more testing.

Posted by placemaster at Jun 30, 2014 20:57

In the thread Get Weather information from XML it is mentioned that a tomcat server is used

Tomcat is always running

Posted by pz1 at Jul 01, 2014 07:59
Document generated by Confluence on Jun 05, 2016 09:38