-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathweatherDataInclude-dist.php
More file actions
executable file
·59 lines (50 loc) · 2.03 KB
/
weatherDataInclude-dist.php
File metadata and controls
executable file
·59 lines (50 loc) · 2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php
//////////////////////////////////////////
//
// Edit this file to meet your environment
//
//////////////////////////////////////////
// Database Name
$weatherDatabase = "open2300";
// Database Host
$weatherDatabaseHost= "127.0.0.1";
// Database User
$weatherDatabaseUser= "mySqlUser";
// Password of database user
$weatherDatabasePW = "mySqlUserPassword";
// Date Time Zone
$TimeZone = "Europe/Paris";
// Your Weather station name (city)
$STATION_NAME = "Hinterdupfing";
// Lattitude and Longitude of the weather station in decimal degrees
$STATION_LAT = 48.93;
$STATION_LON = 12.13;
//
// You can add a webcam of your area to the menu in the left frame
//
// Webcam Type "page" or "image"
//
$webcamType = "image";
$weatherWebcamUrl ="http://www.r-kom.de/camps/dom/current.jpg";
// Disable Some Information to be displayed if you dont have all sensors
SetDisplayValues( DISPLAY_ROOM_INFO | DISPLAY_WIND_INFO | DISPLAY_RAIN_INFO |DISPLAY_PRES_INFO);
// This function contains some web links shown on the bottom of the left frame
function weatherWebLinks()
{
echo "<hr>";
echo "<a href=\"http://weather.homeip.net\" target=\"_blank\">Wetterstation Regensburg</a><br>";
echo "<a href=\"http://wetter.homeunix.net\" target=\"_blank\">Wetterstation Neubeuern</a><br>";
}
function longTermAverage($month)
{
// This function contains an array of long therm averages for temperature and rain for your area
// Example Values are for Regensburg. Excelsheets containing values for Germany can be
// obtained from DWD (Deutscher Wetterdienst, German Weather Service):
// http://www.dwd.de/de/FundE/Klima/KLIS/daten/online/nat/index_mittelwerte.htm
$averageTemp = array(-2.1, -0.4, 3.6, 8.1, 12.9, 16.2, 17.9, 17.2, 13.7, 8.4, 2.9, -0.6);
$averageRain = array(44, 38, 38, 45, 58, 76, 70, 72, 49, 45, 50, 51);
$average['temp'] = $averageTemp[$month -1];
$average['rain'] = $averageRain[$month -1];
return $average;
}
?>