This page last changed on Sep 21, 2014 by lexjans.


I use a webview to show a picture of the weather in de Netherlands.
This is the URL:

This works fine. The picture has to refresh every 5 minutes.
I can't get this to work.
There is no refresh parameter in the webview only a sensor.
I have search the form to get an example how to get this work.

Can some one please help me out to fix this.

Thanks Lex

I don't think it's possible at this time, the server would need to initiate the push itself.
A refresh rate on the webview has been requested in the past but has not been implemented yet.

Posted by ebariaux at Sep 22, 2014 10:39

Is there not an other way to get de job done.
With drools, wget de picture, save it on the system.
Do that every 5 minutes.
Let the webview point to your system.
Or do you have the same problem?

Posted by lexjans at Sep 22, 2014 11:16

Why not make that a cronjob instead? For me that has proven to be more robust than system calls or Drools from within OR.

Posted by pz1 at Sep 22, 2014 12:30

Yes, that could work, by linking a sensor to the web view.
The sensor is the URL for the web view to load.
For the refresh to work, the sensor value must change, so the URL has to be different everytime.

Posted by ebariaux at Sep 23, 2014 13:53

Hi Eric,

Not the URL change, but the content (picture) does.
Can you help me with an example?

Posted by lexjans at Sep 23, 2014 16:36

To get it into a webview you have to capture the buienradar image (a gif) separately to a directory within the OPenremote directory tree. I do use a private subdiretory webapps/private.
My controller runs on a Synology box (linux), where I use the follow script to get the image:

cd /volume1/@appstore/OpenRemote/webapps/private > /dev/null
wget -O buien.gif
exit 0

This is part of my larger script that is activated every 10 minutes by CRON.
For your case I have created an buien.html file with an auto refresh meta command:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="" dir="ltr" lang="en-US" xml:lang="en-US">
<head >
<meta http-equiv="refresh" content="5">
<img src="buien.gif" width="250" height="250" />

In UI designer create a webview with URL http://controller_IP:port/private/buien.html

This works for me on webconsole and on android

Posted by pz1 at Sep 23, 2014 23:10

Hi PZ1,

I understand the trick you used.
asap I put it on my eBox i use.



Posted by lexjans at Sep 24, 2014 07:23

Be aware that you have to make backups of your private directory, as this might get overwritten by an OR update

Posted by pz1 at Sep 24, 2014 08:13



Posted by lexjans at Sep 24, 2014 08:26

Ok, it's working when i manual start the script.
When i put it in crontab the file buien.gif does not change.
So i think de crontab line does not work.

This is what i have done in crontab:

*/10 6-23 * * * root /opt/OpenRemote-Controller-Pro1.0.13/webapps/private/

This is the file:

cd /opt/OpenRemote-Controller-Pro1.0.13/webapps/private > /dev/null
wget -O buien.gif 2>&1
exit 0

If i start it manual, (./, i have to give an ENTER otherwise the script don't return to the terminal.

What can be the problem? Is it the ENTER or the crontab file.
I try everything i know.

Can somebody help me.


Posted by lexjans at Oct 07, 2014 21:03

This is the top of my crontab file on Synology DS212+

#minute hour    mday    month   wday    who     command
*/14    *       *       *       *       root    /volume1/@appstore/OpenRemote/webapps/private/
*/2     *       *       *       *       root    /volume1/@appstore/OpenRemote/webapps/private/
Posted by pz1 at Oct 08, 2014 08:52

Make sure you have one or more lines in the end of the crontab.

It needs the "enter" in the end of "*/10 6-23 * * * root /opt/OpenRemote-Controller-Pro1.0.13/webapps/private/"

Posted by rberg at Oct 09, 2014 01:57
Document generated by Confluence on Jun 05, 2016 09:31