MeteoHub as Webserver

Discussion, issues, recommendations around Meteohub's dashboard and WD Live integration

Moderator: Mattk

Post Reply
W4JKJ
Fresh Boarder
Fresh Boarder
Posts: 1
Joined: Thu Sep 23, 2010 1:27 pm

MeteoHub as Webserver

Post by W4JKJ » Thu Sep 23, 2010 1:34 pm

While investigating the use of MeteoHub (Sheevaplug,) the documentation indicates you use MeteoHub to push the clientraw files "to" a webserver. I currently run my webserver at home and the goal was to eliminate the dedicated PC at home with Meteoplug. Is it not possible to use the MeteoHub as the targeted webserver for the WeatherDisplayLive .html/.swj data?

Thanks.

wfpost
Platinum Boarder
Platinum Boarder
Posts: 587
Joined: Thu Jun 12, 2008 2:24 pm
Location: HONSOLGEN
Contact:

Re: MeteoHub as Webserver

Post by wfpost » Thu Sep 23, 2010 2:54 pm

My guess, because meteohub does not have a running ftp-server: NO, if you only want to stay with the GUI.

Else: Yes!
You can - Linux knowledge provided - manipulate meteohub´s crontab

The entries below that can be found within crontab control all WDL-clientraw....txt

You only need to pipe them into /data/myweb/ instead of /var/run/meteohub/uploads/

Be aware, that depending on your specfic DNS settings, WDL only runs with an address you have to name when register your Domain with WDLive.
Most properly, if you want to use meteohub as your webserver that is a Dynamic DNS address. Right?
Though with IFRAME you can run that domain name in other contexts as well.
#- "WD-live" "*/1 6-23 * * *" "clientraw.txt" 0
*/1 6-23 * * * sleep 0; /srv/www/meteohtml.cgi /home/meteohub/clientraw.conf >/var/run/meteohub/clientraw.out; cp /var/run/meteohub/clientraw.out /data/myweb/uploads/clientraw.txt; cp /var/run/meteohub/clientraw.out /var/run/meteohub/perm/clientraw.txt; mv /var/run/meteohub/clientraw.out "/var/run/meteohub/uploads/clientraw.txt"
#- "WD-live extra" "*/15 * * * *" "clientrawextra.txt" 0
*/15 * * * * sleep 4; /srv/www/meteohtml.cgi /home/meteohub/clientrawextra.conf >/var/run/meteohub/clientrawextra.out; cp /var/run/meteohub/clientrawextra.out /data/myweb/uploads/clientrawextra.txt; cp /var/run/meteohub/clientrawextra.out /var/run/meteohub/perm/clientrawextra.txt; mv /var/run/meteohub/clientrawextra.out "/var/run/meteohub/uploads/clientrawextra.txt"
#- "WD-live hour" "*/1 7-23 * * *" "clientrawhour.txt" 0
*/1 7-23 * * * sleep 8; /srv/www/meteohtml.cgi /home/meteohub/clientrawhour.conf >/var/run/meteohub/clientrawhour.out; cp /var/run/meteohub/clientrawhour.out /data/myweb/uploads/clientrawhour.txt; cp /var/run/meteohub/clientrawhour.out /var/run/meteohub/perm/clientrawhour.txt; mv /var/run/meteohub/clientrawhour.out "/var/run/meteohub/uploads/clientrawhour.txt"
#- "WD-live daily" "*/30 * * * *" "clientrawdaily.txt" 0
*/30 * * * * sleep 12; /srv/www/meteohtml.cgi /home/meteohub/clientrawdaily.conf >/var/run/meteohub/clientrawdaily.out; cp /var/run/meteohub/clientrawdaily.out /data/myweb/uploads/clientrawdaily.txt; cp /var/run/meteohub/clientrawdaily.out /var/run/meteohub/perm/clientrawdaily.txt; mv /var/run/meteohub/clientrawdaily.out "/var/run/meteohub/uploads/clientrawdaily.txt"
#- "WD-live" "*/5 0-6 * * *" "clientraw.txt" 0
*/5 0-6 * * * sleep 16; /srv/www/meteohtml.cgi /home/meteohub/clientraw.conf >/var/run/meteohub/clientraw.out; cp /var/run/meteohub/clientraw.out /data/myweb/uploads/clientraw.txt; cp /var/run/meteohub/clientraw.out /var/run/meteohub/perm/clientraw.txt; mv /var/run/meteohub/clientraw.out "/var/run/meteohub/uploads/clientraw.txt"

stashu
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: Thu Nov 04, 2010 10:05 pm

Re: MeteoHub as Webserver

Post by stashu » Thu Nov 04, 2010 10:32 pm

I'd like to use Meteohub/sheevaplug as a web server and use the Weather Display Live application on my home network and also access it from the Internet. This modest approach would satisfy my needs without creating a Web site on a external server. I've obtained a dyndns address and everything works well except I can't figure out how to license the WDLive. I've contacted Julian Best, WDLive developer, and he is unfamiliar with Meteohub/Sheeva Plug hardware/software but knows that WDLive ships with it. He wants me to give him my dyndns address to license his software, but I have no assurance that I can operate it inside of the Meteohub/Sheevaplug system. I don't want to operate WDLive on my home pc, since it destroys my approach to get access to the app from the Internet. Meteohub has built in menus for the WDLive app but no way to add a license. What am I missing here?

I'm not a guru in Linux , but it seems that others are asking about this approach..

Thanks.. this is a great forum and product

User avatar
Rainman32
Senior Boarder
Senior Boarder
Posts: 49
Joined: Wed Feb 24, 2010 5:25 pm

Re: MeteoHub as Webserver

Post by Rainman32 » Tue Nov 09, 2010 2:26 am

The issue as I understand it being that the Meteohub "/live" directory is not accessible to upload the wdlive config files and updated swf object. by adding a symlink in the /data directory, then the "live" directory becomes available via samba. i.e.:

Code: Select all

cd /data
ln -s -v /var/run/meteohub/perm live
now there is a "live" directory listed under "public" where you can upload custom config and license information in your wdlconfig.xml along with the updated swf file (wdlv6_05.swf). Meteohub already has this directory shared on the webserver where you can access it directly ex: http://192.168.1.77/live/wdlive.html

The only issue at this point is the WD Live configuration model which binds the serial number to the domain (that IP won't work externally!). you will want to bind it to an externally accessible name (and register to the same), say if using dyndns.org, "mymeteohub.dyndns.org" and then use the hosts file on your internal client machines to bind the name to the private IP.

Comments? does this make sense or is there a better way to do it?

stashu
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: Thu Nov 04, 2010 10:05 pm

Re: MeteoHub as Webserver

Post by stashu » Sun Nov 28, 2010 11:46 pm

I was successful using the approach that "Rainman 32" offered up as a solution. I needed a bit of help in setting up the Live directory under Public using the Teraterm app that came with the Weatherplug support disk.
Thanks Again

User avatar
Rainman32
Senior Boarder
Senior Boarder
Posts: 49
Joined: Wed Feb 24, 2010 5:25 pm

Re: MeteoHub as Webserver

Post by Rainman32 » Thu Feb 17, 2011 3:23 pm

Rainman32 wrote:The issue as I understand it being that the Meteohub "/live" directory is not accessible to upload the wdlive config files and updated swf object. by adding a symlink in the /data directory, then the "live" directory becomes available via samba. i.e.:

Code: Select all

cd /data
ln -s -v /var/run/meteohub/perm live
now there is a "live" directory listed under "public" where you can upload custom config and license information in your wdlconfig.xml along with the updated swf file (wdlv6_05.swf). Meteohub already has this directory shared on the webserver where you can access it directly ex: http://192.168.1.77/live/wdlive.html

The only issue at this point is the WD Live configuration model which binds the serial number to the domain (that IP won't work externally!). you will want to bind it to an externally accessible name (and register to the same), say if using dyndns.org, "mymeteohub.dyndns.org" and then use the hosts file on your internal client machines to bind the name to the private IP.

Comments? does this make sense or is there a better way to do it?
An updated method to use with the 6.05 version of Weather Display Live and to persist across reboots:

copy wdlv6_05.swf (and wdlv6_05.exe if desired) to \\meteohub\public\myweb\uploads
copy the custom wdlive.html and wdlconfig.xml files to \\meteohub\public\myweb\uploads

at a command prompt on meteohub enter the following

Code: Select all

nano -w /etc/rc.boot/initsensors
insert the following lines after the line that reads: "ln -sf /var/run/meteohub/perm /srv/www/live"

Code: Select all

cp /data/myweb/uploads/wdlv6_05.* /var/run/meteohub/perm/
cp /data/myweb/uploads/wdlive.html /var/run/meteohub/perm/index.html
ln -sf /var/run/meteohub/perm /data/live
enter "control+ x" on your keyboard to exit nano, select "y" to save changes

entering the above lines manually at the command prompt will take effect immediately, the changes to "initsensors" is necessary to persist settings between reboots.
the WDL page will be accessible directly at the /live directory, ex: http://192.168.1.77/live/ (entering "wdlive.html" at the end is no longer necessary)

If the meteohub software is updated, the procedure will need to be repeated.

User avatar
LorieJCall
Fresh Boarder
Fresh Boarder
Posts: 8
Joined: Sun Feb 27, 2011 4:09 pm
Location: Minneapolis, MN
Contact:

Re: MeteoHub as Webserver

Post by LorieJCall » Sun Mar 06, 2011 9:55 pm

Thanks, @Rainman32! That was very straight-forward.
Rainman32 wrote:insert the following lines after the line that reads: "ln -sf /var/run/meteohub/perm /srv/www/live"

Code: Select all

cp /data/myweb/uploads/wdlv6_05.* /var/run/meteohub/perm/
cp /data/myweb/uploads/wdlive.html /var/run/meteohub/perm/index.html
ln -sf /var/run/meteohub/perm /data/live
Should wdlconfig.xml be included also?

Code: Select all

cp /data/myweb/uploads/wdlv6_05.* /var/run/meteohub/perm/
cp /data/myweb/uploads/wdlive.html /data/myweb/uploads/wdlconfig.xml /var/run/meteohub/perm/
ln -sf /var/run/meteohub/perm /data/live

User avatar
Rainman32
Senior Boarder
Senior Boarder
Posts: 49
Joined: Wed Feb 24, 2010 5:25 pm

Re: MeteoHub as Webserver

Post by Rainman32 » Mon Mar 07, 2011 4:50 pm

LorieJCall wrote:Should wdlconfig.xml be included also?
It is already included in the preceding lines. What is being added in this section is the current version of the .swf and .html files which were not included, also renaming the html to the default file name so that it does not have to be typed in when accessing. Additionally linking the actual directory where the served files are stored so that it can be accessed via samba.

User avatar
LorieJCall
Fresh Boarder
Fresh Boarder
Posts: 8
Joined: Sun Feb 27, 2011 4:09 pm
Location: Minneapolis, MN
Contact:

Re: MeteoHub as Webserver

Post by LorieJCall » Tue Mar 08, 2011 4:00 pm

Rainman32 wrote:
LorieJCall wrote:Should wdlconfig.xml be included also?
It is already included in the preceding lines. What is being added in this section is the current version of the .swf and .html files which were not included, also renaming the html to the default file name so that it does not have to be typed in when accessing. Additionally linking the actual directory where the served files are stored so that it can be accessed via samba.
Ah, okay, I see that now: it's in /etc/rc.boot/initsensors about four lines above the ones we added. Thanks for the clarification, @Rainman32.

Post Reply