Page 1 of 1
Webserver Meteobridge pro question
Posted: Sat Feb 01, 2020 10:09 am
by FraSti
Hi,
I like to receive an html view of live data from meteobridge nano pro SD. I succeed to periodically write an html file with the services. It also works to proceed a text template with cgi-bin on request.
I am now wondering how to get an html page on request by use of cgi-bin? All trials returned the completed html template as plain text with all the html commands visible.
What’s missing to tell the browser that it shall be show as webpage? Can also graph templates be integrated?
Tips are highly welcome
Thanks
Re: Webserver Meteobridge pro question
Posted: Sun Feb 02, 2020 6:32 pm
by admin
You have to add the corresponding HTTP header (separated by an empty line form the HTML content), like
Re: Webserver Meteobridge pro question
Posted: Mon Feb 03, 2020 3:29 pm
by FraSti
It was set, for sure.
Seems that I've to continue writing every 10 min the to the SD. Let's cross the fingers that it will not be worn-out too early.
Re: Webserver Meteobridge pro question
Posted: Tue Feb 04, 2020 12:26 am
by admin
I would not recommend to do that. Can't the data be requested by a call to ../cgi-bin/template.cgi?template=mytemplatefile
Re: Webserver Meteobridge pro question
Posted: Tue Feb 04, 2020 12:42 am
by FraSti
That’s what I‘m talking about. Text works well, but html not. Anyhow, I‘ve now booked a web space and got disappointed that ftp services can fill and upload templates, but no charts. Meaning, the metachart is also created on the SD temporary. Let’s see if a workaround will be found...
Re: Webserver Meteobridge pro question
Posted: Thu Feb 06, 2020 12:06 am
by admin
Why is html not working? Can you please elaborate on this?
Re: Webserver Meteobridge pro question
Posted: Thu Feb 06, 2020 7:23 pm
by FraSti
When opening
http://meteobridge/cgi-bin/template.cgi ... board.http the browser is showing me the answer as a text file. When renaming the file to .html, it is shown as a table. Same when using the .html in before command. The placeholders, like [th0...] are all replaced with values.
The html, respectively http, file starts with:
<!DOCTYPE text/html>
<html>
<style type="text/css">
#table-2 {
border: 1px solid #e3e3e3;
background-color: #f2f2f2;
width: 500px;
I have tries all I could image of. Also different content types in cgi-bin command.
As said, I solved it by using a web-space.
Cheers