This repository has been archived by the owner on Sep 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
/
settings.php
134 lines (128 loc) · 7.07 KB
/
settings.php
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
<?php
include('settings1.php');error_reporting(0);
####################################################################################################
# HOME WEATHER STATION TEMPLATE SETUP please set up and check thoroughly #
# CREATED FOR HOMEWEATHERSTATION TEMPLATE at https://weather34.com/homeweatherstation/index.html #
# FILE= SETTINGS.PHP #
# #
# WEATHER34 HOMEWEATHER STATION TEMPLATE for Cumulus November 2018 #
# https://www.weather34.com #
####################################################################################################
###########################################################################
# THE SETIINGS BELOW MUST BE LEFT UNTOUCHED UNLESS YOU REALLY NEED #######
# TO MAKE THE CHANGES HERE TO MAKE IT WORK ON YOUR SERVER// ###############
# TAKE THE TIME TO STUDY THEM DONT TAKE IT FOR GRANTED ###############
# USE THE EASY SETUP PANEL TO MAKE CHANGES IN THE TEMPLATE ###############
###########################################################################
$TZconf = $TZ;// PLEASE LEAVE it is fixed
$api2= 'xxx'; // optional Weather Underground api key developer key '1234567890'
$rise_zenith = 90+ 40/60; // try 50/60 or something/60 until it matches correctly to your sunrise .this allows you to fine tune the sunrise
$set_zenith = 90+ 36/60; // try 50/60 or something/60 until it matches correctly to your sunset .this allows you to fine tune the sunset
$forecastlocation = $stationlocation; //
$version = $livedataFormat; // template version and type of source: Clientraw, MeteoBridge, Cumulus, etc (for display only)
$emailform = $email; // PLEASE LEAVE FIXED
$timeFormatShort = 'H:i'; // time format to use when showing times ('g:i a' for '5:34 pm'; 'H:i' for '09:28')
$showFeelsLike = true; // whether to always show either the heat index (when temp > 80F/27C) or real feel (when temp between 50F/10C and 80F/27C) even when no concern
$lightLeft = true; // shows amount of light/darkness left rather than total amount per day in the moon display
$theme = $theme1;
####################################################################################################
// Refresh Data Main Page // #
// Automatic refresh times (in seconds) of each panel on the main dashboard #
####################################################################################################
$indoorRefresh = 120; // 2 minutes
$notifyRefresh = 17; // 17 seconds
$tempRefresh = 60; // 60 secondss
$skyRefresh = 300; // 5 minutes
$windSpeedRefresh = 10; // 10 seconds
$baroRefresh = 900; // 15 minutes
$windDirRefresh = 10; // 10 seconds
$moonRefresh = 1800; // 30 minutes
$rainRefresh = 50; // 50 seconds
$solarRefresh = 120; // 1 minutes
$daylightRefresh = 120; // 2 minutes
$moonphaseRefresh = 120; // 2 minutes
$eqRefresh = 600; // 10 minutes
$forecastRefresh = 900; // 15 minutes
$notificationcenterRefresh = 300; // 5 minutes set refresh time for notification of earthquakes default 5 minutes
$wuupdate = 1800; // 30 minutes
$wfupdate = 60; // weatherflow api 60 seconds
// Thresholds for warnings or notifications
$notifyDistEQ = 300; // miles if $windunit is mph otherwise km
$notifyEQMag = 5; // set this to minimum magnitude of earthquake for notifications, typically 5 or 6, or you can set to 12 to switch off if not required
$notifyWindGust = 22; // knots; 22 knots, which is 40.7 km/h, 35 = 40.2 mph, 40 = 20.5 m/s
$notifyHeatIndex = 30; // degrees C, default is 30 celsius which is 86 degrees F
$notifyWindchill = 3; // degrees C, default is 10 celsius which is 50 degrees F
$notifyFeelslike = 3; // degrees C, default is 10 celsius which is 50 degrees F
$notifyDewpointcold = 3; // degrees C, default is 8 celsius 46.4 degrees F OR WHATEVER MAKES YOU FEEL COLDER
$notifyRainRate = 7; // millimeters, default is 10 which is 0.4 in"
$notifyDewPoint = 21; // dewpoint comfortable zone alert 22 degrees C or 71.6 degrees F OR WHATEVER MAKES YOU FEEL UNCOMFORTABLY HOT
$notifyFlooding = 25.4; // dewpoint comfortable zone alert 22 degrees C or 71.6 degrees F OR WHATEVER MAKES YOU FEEL UNCOMFORTABLY HOT
####################################################################################################
// Probably won't have to change anything past this line IF SO BE VER VERY CAREFUL!!!!!! #
####################################################################################################
$creditsEnabled = "true"; // for chart pages only
$creditsmysql = "Weather Data Recorded from $stationName Database"; //for chart pages only
$wucredits = "Data provided by Weather Underground"; // for chart pages only
$creditschart = "Charts compiled with CanvasJs.js (CC BY-NC 3.0)"; // for chart pages only
$creditsURL = ""; // for chart pages only
$credits = "Data Supplied via Weather Underground"; // for chart pages only
$templateinfo = ''; // template information page
$templateversion = 'CU-HWS-2020-05';
$software = 'Cumulus realtime.txt Users';
$designedfor='<br>For realtime.txt Users';
$chartversion='(WUDATACHARTS version 17)';
$somethinggoeshere ='d4586dec-e7a2-47ae-99b6-25527b2563c9';
$chartversionmysql = '(DATACHARTS version 19 MYSQL-Cumulus)';
if (array_key_exists('theme', $_GET) && ($_GET['theme'] == 'dark' || $_GET['theme'] == 'light')) {
SetCookie('theme', $_GET['theme'], time() + 15552000);
$theme = $_GET['theme'];
} else if (array_key_exists('theme', $_COOKIE) && ($_COOKIE['theme'] == 'dark' || $_COOKIE['theme'] == 'light')) {
$theme = $_COOKIE['theme'];
}
$units = "";
if (array_key_exists('units', $_COOKIE)) {
$units = $_COOKIE['units'];
}
ini_set('session.use_cookies', '0');
if (array_key_exists('units', $_GET) && ($_GET['units'] == 'us' || $_GET['units'] == 'uk' || $_GET['units'] == 'metric' || $_GET['units'] == 'scandinavia')) {
SetCookie('units', $_GET['units'], time() + 15552000);
$units = $_GET['units'];
}
if ($units == 'uk') {
$windunit = 'mph';
$tempunit = 'C';
$rainunit = 'mm';
$pressureunit = "mb";
$windconv = "0.621371";
$rainfallconv = '1';
$pressureinterval = "0.5";
$rainfallconvmm = '1';
} else if ($units == 'scandinavia') {
$windunit = 'm/s';
$tempunit = 'C';
$rainunit = 'mm';
$pressureunit = "hPa";
$windconv = "0.277778";
$rainfallconv = '1';
$pressureinterval = "0.5";
$rainfallconvmm = '1';
} else if ($units == 'metric') {
$windunit = 'km/h';
$tempunit = 'C';
$rainunit = 'mm';
$pressureunit = "hPa";
$windconv = "1";
$rainfallconv = '1';
$pressureinterval = "0.5";
$rainfallconvmm = '1';
} else if ($units == 'us') {
$windunit = 'mph';
$tempunit = 'F';
$rainunit = 'in';
$pressureunit = "inHg";
$windconv = "1";
$rainfallconv = '1';
$pressureinterval = "0.5";
$rainfallconvmm = '1';
};
?>