Open2300 - Weather Graphs PHP

Weathergraphs.php - Weather Graphs made on the fly by PHP

Introduction

Please introduce your project.

What does it do?

Detailed Description

Weathergraphs version 1.1

Copyright 2004 by Kenneth Lavrsen

This program is published under the GNU public license version 2.0 or later.

Please read the file 'COPYING' for more info.

All the hard work with the graphs were done by Herman Veluwenkamp by using his PHP Graph class.

Default values have been modified for the Weathergraphs program.

The original class can be downloaded from http://www.phpclasses.org/browse/package/176.html

See Install for how to install this package.

Works with open2300.

Attached Files

This is the first ever related project and as an exception it is hosted at Sourceforge.

Installation

These program assumes that you have the open2300 software installed for your WS2300 weather station.

You need a webserver with a recent version of PHP including graphical library GD.

A cronjob must fetch data from the station for example every 10 minutes

In /etc/crontab add this line (assuming that log2300 is installed in /usr/local/bin)

0-59/10 * * * * root /usr/local/bin/log2300 /usr/local/apache2/htdocs/weather_log.log

This adds a line of data to /usr/local/apache2/htdocs/weather_log.log every 10 minutes. Make sure that the file is world readable.

Place all the files from this package in a directory on your web server.

Edit all the .php files so that the line..

$fil=fopen("/usr/local/apache2/htdocs/weather_log.log","r");

..is changed to the real place where you have your weather_log.log file.

That should be it.

Have fun.

Users Guide

The file weathergraphs.php shows all the possible graphics.

You can include just one or a few using this format in a .php file.

<img src="tempout.php" height=400 width=640>

Comments and Bug Reports


The code should be defunctionalized. I suggest to have one single class that generates all diagrams. Also a config file should be supported.

I have started working on that. Still I have problems with GD frown, sad smile

-- OschenLars - 28 Dec 2005

I'd suggest, if anyone ever gets round to developing a config file, some way to switch the wind speed graph between m/h, km/h, and m/s. in the meantime does anyone have any ideas how it could be achived easily.

-- MichaelPhillips - 20 Jul 2008
Topic revision: r3 - 20 Jul 2008, MichaelPhillips
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.