Newbie Question - How to feed HTML templates **solved**

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

Moderator: Mattk

Post Reply
User avatar
Wessel
Senior Boarder
Senior Boarder
Posts: 61
Joined: Fri May 06, 2011 1:14 am

Newbie Question - How to feed HTML templates **solved**

Post by Wessel »

Hi,

I'm new with Meteobridge. I used for many years Meteohub and now I decided to migrate to Meteobridge. I have some html pages that my old Meteohub feeded, but I didn't understand how it works with MB. Can I just take my Meteohub templates and switch the variables for MB pattern?
In "Services" I just set FTP upload and in "Template" I inform the address?
Template: www.mywebsite.com/template/mytemplate.html
Path: What should be?
User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 7874
Joined: Mon Oct 01, 2007 10:51 pm

Re: Newbie Question - How to feed HTML templates

Post by admin »

Meteohub templates won't work. Templates are not stored on the unit itself (has no permanent storage apart from a bit for the settings) but need to be placed at a url where the Meteobridge does load them from.
User avatar
Wessel
Senior Boarder
Senior Boarder
Posts: 61
Joined: Fri May 06, 2011 1:14 am

Re: Newbie Question - How to feed HTML templates

Post by Wessel »

Ok, but can I "convert" my Meteohub templates to Meteobridge and then Meteobridge load them?
User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 7874
Joined: Mon Oct 01, 2007 10:51 pm

Re: Newbie Question - How to feed HTML templates

Post by admin »

You can define new templates in the Meteobridge style (please see templates section on www.meteobridge.com). If these can express exactly what you have with Meteohub needs to be seen. Meteobridge does not store weather data locally, so if you need historical data for doing charts, then you might be out of luck. Min/max data is there.

When you share the outcome of your current templates, one might say a bit more. The link in your first posting does not show me anything.
User avatar
Wessel
Senior Boarder
Senior Boarder
Posts: 61
Joined: Fri May 06, 2011 1:14 am

Re: Newbie Question - How to feed HTML templates

Post by Wessel »

Thanks, now I understood.
User avatar
Wessel
Senior Boarder
Senior Boarder
Posts: 61
Joined: Fri May 06, 2011 1:14 am

Re: Newbie Question - How to feed HTML templates

Post by Wessel »

My template was working fine, but Friday it stopped working. I didn't change anything, FTP is working. What's the problem?

Here the url: http://www.tempoemteutonia.com.br/meteo ... guiru.html
Sem título-1.png
Sem título-1.png (124.27 KiB) Viewed 4555 times
Sem título-2.png
Sem título-2.png (147.58 KiB) Viewed 4555 times
User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 7874
Joined: Mon Oct 01, 2007 10:51 pm

Re: Newbie Question - How to feed HTML templates

Post by admin »

Your live data tab is telling me that all uploads are running fine.
You need a bit more specific what exactly does not work as expected.
User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 7874
Joined: Mon Oct 01, 2007 10:51 pm

Re: Newbie Question - How to feed HTML templates

Post by admin »

Looking at your service #2 this is not working. Please keep two things apart:
1) there is a URL that provides a template with the template variables
2) the target URL is the one where to store the template with filled in data.

What your definition does is that it loads the template from your server, replaces variables with current data and uploads this to your server and replacing the just used template file by the expanded one. This is not making any sense. You have to give the evaluated template a new name for upload.

It did work a while, because Meteobridge caches the template file, but on next reboot or alike when it reloads templates form your server it just gets the destroyed template.
User avatar
Wessel
Senior Boarder
Senior Boarder
Posts: 61
Joined: Fri May 06, 2011 1:14 am

Re: Newbie Question - How to feed HTML templates

Post by Wessel »

Thanks, now I fixed it. It's working.
Post Reply