Templates

All about the standard Meteobridge devices based on mobile routers from TP-Link, D-Link, ASUS

Moderator: Mattk

david.delano
Senior Boarder
Senior Boarder
Posts: 47
Joined: Thu May 16, 2013 6:39 am

Templates

Post by david.delano »

I have recently started using a WeatherBridge with Davis Vantage Pro2. I'd like to be able to use the weather data locally, as if it were a feed from Weather Underground. Is there a way to create a template that determines what the Live Data as XML Service outputs? I'd like to have the output emulate the Weather Underground feed.

David
User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 7874
Joined: Mon Oct 01, 2007 10:51 pm

Re: Templates

Post by admin »

The wiki "meteobridge.com" does provide information how to make use of templates.
Did you had a look there? Do you have questions on explanations given there?
I would like not to write here the same things already part of the wiki, but will
of course help when things do remain unclear...
david.delano
Senior Boarder
Senior Boarder
Posts: 47
Joined: Thu May 16, 2013 6:39 am

Re: Templates

Post by david.delano »

Yes, I read the Wiki. That is where I picked up the information. But, it doesn't say what can be done with the templates or how to load them, as far as I can figure out. Once I have a template, can I store it on the device so that the Live Data (http://ip-of-meteobridge/cgi-bin/livedataxml.cgi) will use the template to format the data?

If there is some other place in the Wiki that I missed the information, just let me know.

David
User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 7874
Joined: Mon Oct 01, 2007 10:51 pm

Re: Templates

Post by admin »

As the meteobridge itself has no place where to store the template permanently, it does load it on demand from somewhere in the internet. so you have to place the template on your webserver and meteobridge does load from there.
david.delano
Senior Boarder
Senior Boarder
Posts: 47
Joined: Thu May 16, 2013 6:39 am

Re: Templates

Post by david.delano »

Can it load from a local file system? I don't have a webserver running.

How do I get the livedataxml.cgi to use the template?
User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 7874
Joined: Mon Oct 01, 2007 10:51 pm

Re: Templates

Post by admin »

Livedataxml.cgi will not make use of templates.
Ftp upload can load and fill a template, but it needs to come via http protocol from a server
in the internet or in your lan.
david.delano
Senior Boarder
Senior Boarder
Posts: 47
Joined: Thu May 16, 2013 6:39 am

Re: Templates

Post by david.delano »

Maybe I should back up and state what I want to be able to do.

I would like to be able to point an application to the MeteoBridge and have it retrieve the data, similarly to retrieving it from Weather Underground. The livedataxml.cgi script looks like it is what I need, but the data it returns is less than I want, and not in the format I want (though that could be fixed in the application code). In the doc it says more data fields to come, but how soon? It would seem more obvious to me to let the user provide a template to determine what data and format to return.

Is there another way to do what I want? I don't think a push type interface will work - the application needs to do the polling.

Thanks,
David
User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 7874
Joined: Mon Oct 01, 2007 10:51 pm

Re: Templates

Post by admin »

ok, now i do better understand.
template mechanism is only used for push modes (email, twitter, ftp) right now.
I will have a look how this might be used in pull mode by requesting a certain URL
from the meteobridges web server. I guess that will an easy update, but up to now noone has
requested this.

is your program able to send http post request? or just http get?
david.delano
Senior Boarder
Senior Boarder
Posts: 47
Joined: Thu May 16, 2013 6:39 am

Re: Templates

Post by david.delano »

I'll try to find out. The quickest answer is, whatever is used to get data from Weather Underground.

I'm working with another developer who is willing to put in an interface that accepts a URL other than Weather Underground, as long as the interface is the same. I'm not sure if http get or http post request is used. The template would format the data into xml output.
david.delano
Senior Boarder
Senior Boarder
Posts: 47
Joined: Thu May 16, 2013 6:39 am

Re: Templates

Post by david.delano »

The program pulls the data, and I think it's http get.
david.delano
Senior Boarder
Senior Boarder
Posts: 47
Joined: Thu May 16, 2013 6:39 am

Re: Templates

Post by david.delano »

Any update on the possibility of adding this feature?
User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 7874
Joined: Mon Oct 01, 2007 10:51 pm

Re: Templates

Post by admin »

It is there since June 1:
http://meteobridge.com/wiki/index.php/Forum

Please find details here (at the end):
http://meteobridge.com/wiki/index.php/Add-On_Services
skyewright
Platinum Boarder
Platinum Boarder
Posts: 873
Joined: Fri Jan 25, 2008 6:27 pm
Location: Isle of Skye, Scotland

Re: Templates

Post by skyewright »

That's very neat. Any chance of an equivalent in Meteohub &/or Meteoplug? Or have I missed something & it's already there?
Last edited by skyewright on Mon Jun 10, 2013 12:00 pm, edited 1 time in total.
User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 7874
Joined: Mon Oct 01, 2007 10:51 pm

Re: Templates

Post by admin »

At the moment just for Meteobridge. Might be an option for Meteohub later on.
skyewright
Platinum Boarder
Platinum Boarder
Posts: 873
Joined: Fri Jan 25, 2008 6:27 pm
Location: Isle of Skye, Scotland

Re: Templates

Post by skyewright »

admin wrote:At the moment just for Meteobridge. Might be an option for Meteohub later on.
Thanks for considering it. Not essential, but a nice alternative where appropriate.

Maybe someday... :D
Post Reply