Display key values and files
uploadMH/todayTags.html - dated: 09-02-2023 00:46
1 | <?php
2 | #-----------------------------------------------------------------------
3 | # display source of script if requested so
4 | #-----------------------------------------------------------------------
5 | if (isset($_REQUEST['sce']) && strtolower($_REQUEST['sce']) == 'view' ) {
6 | $filenameReal = __FILE__;
7 | $download_size = filesize($filenameReal);
8 | header('Pragma: public');
9 | header('Cache-Control: private');
10 | header('Cache-Control: no-cache, must-revalidate');
11 | header("Content-type: text/plain");
12 | header("Accept-Ranges: bytes");
13 | header("Content-Length: $download_size");
14 | header('Connection: close');
15 | readfile($filenameReal);
16 | exit;
17 | }
18 | $pageName = 'todayTags.php';
19 | if (!isset($SITE)){echo "<h3>invalid call to script $pageName</h3>";exit;}
20 | $pageVersion = '2.6 2015-11-06 14:48:57 ';
21 | $SITE['wsModules'][$pageName] = 'version: ' . $pageVersion;
22 | $pageFile = basename(__FILE__); // check to see this is the real script
23 | if ($pageFile <> $pageName) {$SITE['wsModules'][$pageFile] = 'this file loaded instead of '.$pageName;}
24 | echo '<!-- module '.$pageFile.' ==== '.$SITE['wsModules'][$pageFile]." -->".PHP_EOL;
25 | #-----------------------------------------------------------------------
26 | # 3.00 2014-09-22 release version
27 | # --------------------------------------- version ----------------------
28 | $ws['tags.php'] = $pageName.'-'.$pageVersion;
29 | $ws['tagsToday'] = $pageName.'-'.$pageVersion;
30 | # ----------------------------------------------------------------------
31 | $ws['actTime'] = '[actual_localdate]';
32 | # ------------------------------------------ temperature ---------------
33 | $ws['tempMinTodayTime'] = '[day1_th0_tempmin_time]';
34 | $ws['tempMinMonthTime'] = '[month1_th0_tempmin_time]';
35 | $ws['tempMinYearTime'] = '[year1_th0_tempmin_time]';
36 | $ws['tempMaxTodayTime'] = '[day1_th0_tempmax_time]';
37 | $ws['tempMaxMonthTime'] = '[month1_th0_tempmax_time]';
38 | $ws['tempMaxYearTime'] = '[year1_th0_tempmax_time]';
39 | $ws['dewpMinTodayTime'] = '[day1_th0_dewmin_time]';
40 | $ws['dewpMaxTodayTime'] = '[day1_th0_dewmax_time]';
41 | $ws['heatMaxTodayTime'] = '[day1_th0_heatindexmax_time]';
42 | $ws['heatMaxMonthTime'] = '[month1_th0_heatindexmax_time]';
43 | $ws['heatMaxYearTime'] = '[year1_th0_heatindexmax_time]';
44 | $ws['chilMinTodayTime'] = '[day1_wind0_chillmin_time]';
45 | $ws['chilMinMonthTime'] = '[month1_wind0_chillmin_time]';
46 | $ws['chilMinYearTime'] = '[year1_wind0_chillmin_time]';
47 |
48 |
49 | if ($SITE['uomTemp'] == '°F'){ // other one is centigrade
50 | $ws['tempAct'] = '[actual_th0_temp_f]';
51 | $ws['tempActInside'] = '[actual_thb0_temp_f:0]';
52 | $ws['tempActExtra1'] = '[actual_none_temp_f:0]';
53 | $ws['tempDelta'] = '[last60m_th0_tempdelta_f]';
54 | $ws['tempToday'] = '[day1_th0_temp_f]';
55 | $ws['tempMinToday'] = '[day1_th0_tempmin_f]';
56 | $ws['tempMinMonth'] = '[month1_th0_tempmin_f]';
57 | $ws['tempMinYear'] = '[year1_th0_tempmin_f]';
58 | $ws['tempMaxToday'] = '[day1_th0_tempmax_f]';
59 | $ws['tempMaxMonth'] = '[month1_th0_tempmax_f]';
60 | $ws['tempMaxYear'] = '[year1_th0_tempmax_f]';
61 |
62 | $ws['dewpAct'] = '[actual_th0_dew_f]';
63 | $ws['dewpDelta'] = '[last60m_th0_dewdelta_f]';
64 | $ws['dewpMinToday'] = '[day1_th0_dewmin_f]';
65 | $ws['dewpMaxToday'] = '[day1_th0_dewmax_f]';
66 |
67 | $ws['heatAct'] = '[actual_th0_heatindex_f]';
68 | $ws['heatDelta'] = '[last60m_th0_heatindexdelta_f]';
69 | $ws['heatMaxToday'] = '[day1_th0_heatindexmax_f]';
70 | $ws['heatMaxMonth'] = '[month1_th0_heatindexmax_f]';
71 | $ws['heatMaxYear'] = '[year1_th0_heatindexmax_f]';
72 |
73 | $ws['chilAct'] = '[actual_wind0_chill_f]';
74 | $ws['chilDelta'] = '[last60m_wind0_chilldelta_f]';
75 | $ws['chilMinToday'] = '[day1_wind0_chillmin_f]';
76 | $ws['chilMinMonth'] = '[month1_wind0_chillmin_f]';
77 | $ws['chilMinYear'] = '[year1_wind0_chillmin_f]';
78 |
79 | $ws['hudxAct'] = '[actual_th0_humidex_f]';
80 | $ws['hudxDelta'] = '[last60m_th0_humidexdelta_f]';
81 | $ws['hudxMaxToday'] = '[day1_th0_humidexmax_f]';
82 | $ws['hudxMaxMonth'] = '[month1_th0_humidexmax_f]';
83 | $ws['hudxMaxYear'] = '[year1_th0_humidexmax_f]';
84 | } else {
85 | $ws['tempAct'] = '[actual_th0_temp_c]';
86 | $ws['tempActInside'] = '[actual_thb1_temp_c]';
87 | $ws['tempActExtra1'] = '[actual_none_temp_c:0]';
88 | $ws['tempDelta'] = '[last60m_th0_tempdelta_c]';
89 | $ws['tempToday'] = '[day1_th0_temp_c]';
90 | $ws['tempMinToday'] = '[day1_th0_tempmin_c]';
91 | $ws['tempMinMonth'] = '[month1_th0_tempmin_c]';
92 | $ws['tempMinYear'] = '[year1_th0_tempmin_c]';
93 | $ws['tempMaxToday'] = '[day1_th0_tempmax_c]';
94 | $ws['tempMaxMonth'] = '[month1_th0_tempmax_c]';
95 | $ws['tempMaxYear'] = '[year1_th0_tempmax_c]';
96 |
97 | $ws['dewpAct'] = '[actual_th0_dew_c]';
98 | $ws['dewpDelta'] = '[last60m_th0_dewdelta_c]';
99 | $ws['dewpMinToday'] = '[day1_th0_dewmin_c]';
100 | $ws['dewpMaxToday'] = '[day1_th0_dewmax_c]';
101 |
102 | $ws['heatAct'] = '[actual_th0_heatindex_c]';
103 | $ws['heatDelta'] = '[last60m_th0_heatindexdelta_c]';
104 | $ws['heatMaxToday'] = '[day1_th0_heatindexmax_c]';
105 | $ws['heatMaxMonth'] = '[month1_th0_heatindexmax_c]';
106 | $ws['heatMaxYear'] = '[year1_th0_heatindexmax_c]';
107 |
108 | $ws['chilAct'] = '[actual_wind0_chill_c]';
109 | $ws['chilDelta'] = '[last60m_wind0_chilldelta_c]';
110 | $ws['chilMinToday'] = '[day1_wind0_chillmin_c]';
111 | $ws['chilMinMonth'] = '[month1_wind0_chillmin_c]';
112 | $ws['chilMinYear'] = '[year1_wind0_chillmin_c]';
113 |
114 | $ws['hudxAct'] = '[actual_th0_humidex_c]';
115 | $ws['hudxDelta'] = '[last60m_th0_humidexdelta_c]';
116 | $ws['hudxMaxToday'] = '[day1_th0_humidexmax_c]';
117 | $ws['hudxMaxMonth'] = '[month1_th0_humidexmax_c]';
118 | $ws['hudxMaxYear'] = '[year1_th0_humidexmax_c]';
119 | }
120 | # ------------------------------------------ pressure / baro -----------
121 | $ws['baroMinTodayTime'] = '[day1_thb1_sealevelmin_time]';
122 | $ws['baroMinMonthTime'] = '[month1_thb1_sealevelmin_time]';
123 | $ws['baroMinYearTime'] = '[year1_thb1_sealevelmin_time]';
124 | $ws['baroMaxTodayTime'] = '[day1_thb1_sealevelmax_time]';
125 | $ws['baroMaxYearTime'] = '[year1_thb1_sealevelmax_time]';
126 | $ws['baroMaxMonthTime'] = '[month1_thb1_sealevelmax_time]';
127 | if ($SITE['uomBaro'] == ' inHg'){ // ' hPa', of ' mb', of ' inHg'
128 | $ws['baroAct'] = '[actual_thb1_sealevel_inhg]';
129 | $ws['baroDelta'] = '[last60m_thb1_seapressdelta_inhg]';
130 | $ws['baroMinToday'] = '[day1_thb1_sealevelmin_inhg]';
131 | $ws['baroMinMonth'] = '[month1_thb1_sealevelmin_inhg]';
132 | $ws['baroMinYear'] = '[year1_thb1_sealevelmin_inhg]';
133 | $ws['baroMaxToday'] = '[day1_thb1_sealevelmax_inhg]';
134 | $ws['baroMaxMonth'] = '[month1_thb1_sealevelmax_inhg]';
135 | $ws['baroMaxYear'] = '[year1_thb1_sealevelmax_inhg]';
136 | } else { // default hpa equal to mb
137 | $ws['baroAct'] = '[actual_thb1_sealevel_hpa]';
138 | $ws['baroDelta'] = '[last60m_thb1_seapressdelta_hpa]';
139 | $ws['baroMinToday'] = '[day1_thb1_sealevelmin_hpa]';
140 | $ws['baroMinMonth'] = '[month1_thb1_sealevelmin_hpa]';
141 | $ws['baroMinYear'] = '[year1_thb1_sealevelmin_hpa]';
142 | $ws['baroMaxToday'] = '[day1_thb1_sealevelmax_hpa]';
143 | $ws['baroMaxMonth'] = '[month1_thb1_sealevelmax_hpa]';
144 | $ws['baroMaxYear'] = '[year1_thb1_sealevelmax_hpa]';
145 | }
146 | # ------------------------------------------ humidity -----------------
147 | $ws['humiMinTodayTime '] = '[day1_th0_hummin_time]';
148 | $ws['humiMaxTodayTime'] = '[day1_th0_hummax_time]';
149 | $ws['humiAct'] = '[actual_th0_hum_rel]';
150 | $ws['humiDelta'] = '[last60m_th0_humdelta_rel]';
151 | $ws['humiDelta'] = $ws['humiAct'] - '[last60m_th0_hum_rel:0]';
152 | $ws['humiMinToday'] = '[day1_th0_hummin_rel]';
153 | $ws['humiMaxToday'] = '[day1_th0_hummax_rel]';
154 | # ------------------------------------------ rain ---------------------
155 | $ws['rainDayMnth'] = '[month1_rain0_days]';
156 | $ws['rainDayYear'] = '[year1_rain0_days]';
157 | if ($SITE['uomRain'] == ' in') { // =' mm', =' in'
158 | $ws['rainRateAct'] = '[actual_rain0_rate_in]';
159 | $ws['rainRateToday'] = '[day1_rain0_ratemax_in]';
160 | $ws['rainHour'] = '[last60m_rain0_total_in]';
161 | $ws['rainToday'] = '[day1_rain0_total_in]';
162 | $ws['rainMonth'] = '[month1_rain0_total_in]';
163 | $ws['rainYear'] = '[year1_rain0_total_in]';
164 | # ------------------------------------------ EVAPOTRANSPIRATION --------
165 | $ws['etToday'] = '[day1_sol0_et_in:0]';
166 | $ws['etMonth'] = '[month1_sol0_et_in]';
167 | } else {
168 | $ws['rainRateAct'] = '[actual_rain0_rate_mm]';
169 | $ws['rainRateToday'] = '[day1_rain0_ratemax_mm]';
170 | $ws['rainHour'] = '[last60m_rain0_total_mm]';
171 | $ws['rainToday'] = '[day1_rain0_total_mm]';
172 | $ws['rainMonth'] = '[month1_rain0_total_mm]';
173 | $ws['rainYear'] = '[year1_rain0_total_mm]';
174 | # ------------------------------------------ EVAPOTRANSPIRATION --------
175 | $ws['etToday'] = '[day1_sol0_et_mm:0]';
176 | $ws['etMonth'] = '[month1_sol0_et_mm]';
177 | }
178 | # ------------------------------------------ wind ---------------------
179 | $ws['windActDsc'] = '[actual_wind0_dir_en]';
180 | $ws['windBeafort'] = '[actual_wind0_speed_bftint:0]';
181 | $ws['gustMaxTodayTime'] = '[day1_wind0_gustspeedmax_time]';
182 | $ws['gustMaxMonthTime'] = '[month1_wind0_gustspeedmax_time]';
183 | $ws['gustMaxYearTime'] = '[year1_wind0_gustspeedmax_time]';
184 | if ($SITE['uomWind'] == ' km/h') { // =' km/h', =' kts', =' m/s', =' mph'
185 | $ws['windAct'] = '[actual_wind0_speed_kmh:0]';
186 | $ws['gustAct'] = '[actual_wind0_gustspeed_kmh:0]';
187 | $ws['gustActX'] = '[last15m_wind0_gustspeed_kmh:0]'; // to correct max a few code lines ahead
188 | $ws['gustMaxHour'] = '[hour1_wind0_gustspeedmax_kmh:0]';
189 | $ws['gustMaxToday'] = '[day1_wind0_gustspeedmax_kmh:0]';
190 | $ws['gustMaxMonth'] = '[month1_wind0_gustspeedmax_kmh:0]';
191 | $ws['gustMaxYear'] = '[year1_wind0_gustspeedmax_kmh:0]';
192 | } else if ($SITE['uomWind'] == ' kts') {
193 | $ws['windAct'] = '[actual_wind0_speed_kn:0]';
194 | $ws['gustAct'] = '[actual_wind0_gustspeed_kn:0]';
195 | $ws['gustActX'] = '[last15m_wind0_gustspeed_kn:0]';
196 | $ws['gustMaxHour'] = '[hour1_wind0_gustspeedmax_kn:0]';
197 | $ws['gustMaxToday'] = '[day1_wind0_gustspeedmax_kn:0]';
198 | $ws['gustMaxMonth'] = '[month1_wind0_gustspeedmax_kn:0]';
199 | $ws['gustMaxYear'] = '[year1_wind0_gustspeedmax_kn:0]';
200 | } else if ($SITE['uomWind'] == ' mph') {
201 | $ws['windAct'] = '[actual_wind0_speed_mph:0]';
202 | $ws['gustAct'] = '[actual_wind0_gustspeed_mph:0]';
203 | $ws['gustActX'] = '[last15m_wind0_gustspeed_mph:0]';
204 | $ws['gustMaxHour'] = '[hour1_wind0_gustspeedmax_mph:0]';
205 | $ws['gustMaxToday'] = '[day1_wind0_gustspeedmax_mph:0]';
206 | $ws['gustMaxMonth'] = '[month1_wind0_gustspeedmax_mph:0]';
207 | $ws['gustMaxYear'] = '[year1_wind0_gustspeedmax_mph:0]';
208 | } else { // m/s default
209 | $ws['windAct'] = '[actual_wind0_speed_ms:0]';
210 | $ws['gustAct'] = '[actual_wind0_gustspeed_ms:0]';
211 | $ws['gustActX'] = '[last15m_wind0_gustspeed_ms:0]';
212 | $ws['gustMaxHour'] = '[hour1_wind0_gustspeedmax_ms:0]';
213 | $ws['gustMaxToday'] = '[day1_wind0_gustspeedmax_ms:0]';
214 | $ws['gustMaxMonth'] = '[month1_wind0_gustspeedmax_ms:0]';
215 | $ws['gustMaxYear'] = '[year1_wind0_gustspeedmax_ms:0]';
216 |
217 | }
218 | if ($ws['gustAct'] <= $ws['gustActX']) {$ws['gustAct'] = $ws['gustActX'];}
219 | if ($ws['gustAct'] <= $ws['windAct']) {$ws['gustAct'] = $ws['windAct'];}
220 | # ------------------------------------------ UV ---------------------
221 | $ws['uvMaxTodayTime'] = '[day1_uv0_indexmax_time:0]';
222 | $ws['uvMaxMonthTime'] = '[month1_uv0_indexmax_time:0]';
223 | $ws['uvMaxYearTime'] = '[year1_uv0_indexmax_time:0]';
224 | $ws['uvAct'] = '[actual_uv0_index:0]';
225 | $ws['uvMaxToday'] = '[day1_uv0_indexmax:0]';
226 | $ws['uvMaxMonth'] = '[month1_uv0_indexmax:0]';
227 | $ws['uvMaxYear'] = '[year1_uv0_indexmax:0]';
228 | # ------------------------------------------ Solar --------------------
229 | $ws['solarMaxTodayTime'] = '[day1_sol0_radiationmax_time:0]';
230 | $ws['solarMaxMonthTime'] = '[month1_sol0_radiationmax_time:0]';
231 | $ws['solarMaxYearTime'] = '[year1_sol0_radiationmax_time:0]';
232 | $ws['solarAct'] = '[actual_sol0_radiation_wqm:0]';
233 | $ws['solActPerc'] = '[actual_sol0_radiation_rel:0]';
234 | $ws['solarMaxToday'] = '[day1_sol0_radiationmax_wqm:0]';
235 | $ws['solarMaxMonth'] = '[month1_sol0_radiationmax_wqm:0]';
236 | $ws['solarMaxYear'] = '[year1_sol0_radiationmax_wqm:0]';
237 | # ------------------------------------------ cloud height --------------
238 | if ($SITE['uomHeight'] = 'ft') {
239 | $ws['cloudHeight'] = '[actual_th0_cloudheight_ft]';
240 | } else {
241 | $ws['cloudHeight'] = '[actual_th0_cloudheight_m]';
242 | }
243 | # ------------------------------------------ forecasts -----------------
244 | $ws['fcstWD'] = '[actual_thb1_fc_wdlive]';
245 | $ws['fcstTxt'] = '[actual_thb1_fc_text]:--';
246 | # ------------------------------------------ sun and moon --------------
247 | $ws['sunrise'] = '[actual_sunrise_standard_local]';
248 | $ws['sunset'] = '[actual_sunset_standard_local]';
249 | $ws['moonrise'] = '[actual_moonrise_standard_local:0]';
250 | $ws['moonset'] = '[actual_moonset_standard_local:0]';
251 | $ws['lunarPhase'] = '[actual_lunar_phase_segment]';
252 | $ws['lunarPhasePerc'] = '[actual_lunar_phase_percentage]';
253 | $ws['lunarAge'] = '[actual_lunar_age_days]';
254 | # ------------------------------------------ some more -----------------
255 | $ws['wsVersion'] = '[actual_system_version_text:0] b[actual_system_build_num:0]';
256 | $ws['wsHardware'] = '[actual_system_platform_text]';
257 | $ws['wsUptime'] = '[actual_data1_value_int:0]';
258 |
259 | #-----------------------------------------------------------------------
260 | # extras for soil measurement MH wsTodayTags.php
261 | # 1.01h 2012-08-15 added soil moistere + temp & leaf moistere readings
262 | #-----------------------------------------------------------------------
263 | if ($SITE['uomTemp'] == '°F'){ // other one is centigrade
264 | # Temp sensor 1 actual value
265 | $ws['soilTempAct'][1] = '[actual_none_temp_f]';
266 | # Temp sensor 1 maximum value for today month year alltime
267 | $ws['soilTempMaxToday'][1] = '[day1_none_tempmax_f]';
268 | $ws['soilTempMaxMonth'][1] = '[month1_none_tempmax_f]';
269 | $ws['soilTempMaxYear'][1] = '[year1_none_tempmax_f]';
270 | $ws['soilTempMaxAlltime'][1] = '[alltime_none_tempmax_f]';
271 | # Temp sensor 1 minimum values
272 | $ws['soilTempMinToday'][1] = '[day1_none_tempmin_f]';
273 | $ws['soilTempMinMonth'][1] = '[month1_none_tempmin_f]';
274 | $ws['soilTempMinYear'][1] = '[year1_none_tempmin_f]';
275 | $ws['soilTempMinAlltime'][1] = '[alltime_none_tempmin_f]';
276 | } else {
277 | $ws['soilTempAct'][1] = '[actual_none_temp_c]';
278 | $ws['soilTempMaxToday'][1] = '[day1_none_tempmax_c]';
279 | $ws['soilTempMaxMonth'][1] = '[month1_none_tempmax_c]';
280 | $ws['soilTempMaxYear'][1] = '[year1_none_tempmax_c]';
281 | $ws['soilTempMaxAlltime'][1] = '[alltime_none_tempmax_c]';
282 | $ws['soilTempMinToday'][1] = '[day1_none_tempmin_c]';
283 | $ws['soilTempMinMonth'][1] = '[month1_none_tempmin_c]';
284 | $ws['soilTempMinYear'][1] = '[year1_none_tempmin_c]';
285 | $ws['soilTempMinAlltime'][1] = '[alltime_none_tempmin_c]';
286 | }
287 | $ws['soilTempMaxTodayTime'][1] = '[day1_none_tempmax_time]';
288 | $ws['soilTempMaxMonthTime'][1] = '[month1_none_tempmax_time]';
289 | $ws['soilTempMaxYearTime'][1] = '[year1_none_tempmax_time]';
290 | $ws['soilTempMaxAlltimeTime'][1]= '[alltime_none_tempmax_time]';
291 | $ws['soilTempMinTodayTime'][1] = '[day1_none_tempmin_time]';
292 | $ws['soilTempMinMonthTime'][1] = '[month1_none_tempmin_time]';
293 | $ws['soilTempMinYearTime'][1] = '[year1_none_tempmin_time]';
294 | $ws['soilTempMinAlltimeTime'][1]= '[alltime_none_tempmin_time]';
295 | #
296 | # Moisture sensor 1 actual value
297 | $ws['moistAct'][1] = '[actual_none_hum_rel]';
298 | # Moisture sensor 1 max values for today month and year alltime
299 | $ws['moistMaxToday'][1] = '[day1_none_hummax_rel]';
300 | $ws['moistMaxMonth'][1] = '[month1_none_hummax_rel]';
301 | $ws['moistMaxYear'][1] = '[year1_none_hummax_rel]';
302 | $ws['moistMaxAlltime'][1] = '[alltime_none_hummax_rel]';
303 | $ws['moistMaxTodayTime'][1] = '[day1_none_hummax_time]';
304 | $ws['moistMaxMonthTime'][1] = '[month1_none_hummax_time]';
305 | $ws['moistMaxYearTime'][1] = '[year1_none_hummax_time]';
306 | $ws['moistMaxAlltimeTime'][1] = '[alltime_none_hummax_time]';
307 | # Moisture sensor 1 min values for today month and year alltime
308 | $ws['moistMinToday'][1] = '[day1_none_hummin_rel]';
309 | $ws['moistMinMonth'][1] = '[month1_none_hummin_rel]';
310 | $ws['moistMinYear'][1] = '[year1_none_hummin_rel]';
311 | $ws['moistMinAlltime'][1] = '[alltime_none_hummin_rel]';
312 | $ws['moistMinTodayTime'][1] = '[day1_none_hummin_time]';
313 | $ws['moistminMonthTime'][1] = '[month1_none_hummin_time]';
314 | $ws['moistMinYearTime'][1] = '[year1_none_hummin_time]';
315 | $ws['moistMinAlltimeTime'][1] = '[alltime_none_hummin_time]';
316 |
317 | #-----------------------------------------------------------------------
318 |
319 | if ($SITE['uomTemp'] == '°F'){ // other one is centigrade // '[]';
320 | # Temp sensor 2 actual value
321 | $ws['soilTempAct'][2] = '[actual_none_temp_f]';
322 | # Temp sensor 1 maximum value for today month year alltime
323 | $ws['soilTempMaxToday'][2] = '[day1_none_tempmax_f]';
324 | $ws['soilTempMaxMonth'][2] = '[month1_none_tempmax_f]';
325 | $ws['soilTempMaxYear'][2] = '[year1_none_tempmax_f]';
326 | $ws['soilTempMaxAlltime'][2] = '[alltime_none_tempmax_f]';
327 | # Temp sensor 1 minimum values
328 | $ws['soilTempMinToday'][2] = '[day1_none_tempmin_f]';
329 | $ws['soilTempMinMonth'][2] = '[month1_none_tempmin_f]';
330 | $ws['soilTempMinYear'][2] = '[year1_none_tempmin_f]';
331 | $ws['soilTempMinAlltime'][2] = '[alltime_none_tempmin_f]';
332 | } else {
333 | $ws['soilTempAct'][2] = '[actual_none_temp_c]';
334 | $ws['soilTempMaxToday'][2] = '[day1_none_tempmax_c]';
335 | $ws['soilTempMaxMonth'][2] = '[month1_none_tempmax_c]';
336 | $ws['soilTempMaxYear'][2] = '[year1_none_tempmax_c]';
337 | $ws['soilTempMaxAlltime'][2] = '[alltime_none_tempmax_c]';
338 | $ws['soilTempMinToday'][2] = '[day1_none_tempmin_c]';
339 | $ws['soilTempMinMonth'][2] = '[month1_none_tempmin_c]';
340 | $ws['soilTempMinYear'][2] = '[year1_none_tempmin_c]';
341 | $ws['soilTempMinAlltime'][2] = '[alltime_none_tempmin_c]';
342 | }
343 | $ws['soilTempMaxTodayTime'][2] = '[day1_none_tempmax_time]';
344 | $ws['soilTempMaxMonthTime'][2] = '[month1_none_tempmax_time]';
345 | $ws['soilTempMaxYearTime'][2] = '[year1_none_tempmax_time]';
346 | $ws['soilTempMaxAlltimeTime'][2]= '[alltime_none_tempmax_time]';
347 | $ws['soilTempMinTodayTime'][2] = '[day1_none_tempmin_time]';
348 | $ws['soilTempMinMonthTime'][2] = '[month1_none_tempmin_time]';
349 | $ws['soilTempMinYearTime'][2] = '[year1_none_tempmin_time]';
350 | $ws['soilTempMinAlltimeTime'][2]= '[alltime_none_tempmin_time]';
351 |
352 | #
353 | # Moisture sensor 2 actual value
354 | $ws['moistAct'][2] = '[actual_none_hum_rel]';
355 | # Moisture sensor 1 max values for today month and year alltime
356 | $ws['moistMaxToday'][2] = '[day1_none_hummax_rel]';
357 | $ws['moistMaxMonth'][2] = '[month1_none_hummax_rel]';
358 | $ws['moistMaxYear'][2] = '[year1_none_hummax_rel]';
359 | $ws['moistMaxAlltime'][2] = '[alltime_none_hummax_rel]';
360 | $ws['moistMaxTodayTime'][2] = '[day1_none_hummax_time]';
361 | $ws['moistMaxMonthTime'][2] = '[month1_none_hummax_time]';
362 | $ws['moistMaxYearTime'][2] = '[year1_none_hummax_time]';
363 | $ws['moistMaxAlltimeTime'][2] = '[alltime_none_hummax_time]';
364 | # Moisture sensor 1 min values for today month and year alltime
365 | $ws['moistMinToday'][2] = '[day1_none_hummin_rel]';
366 | $ws['moistMinMonth'][2] = '[month1_none_hummin_rel]';
367 | $ws['moistMinYear'][2] = '[year1_none_hummin_rel]';
368 | $ws['moistMinAlltime'][2] = '[alltime_none_hummin_rel]';
369 | $ws['moistMinTodayTime'][2] = '[day1_none_hummin_time]';
370 | $ws['moistMinMonthTime'][2] = '[month1_none_hummin_time]';
371 | $ws['moistMinYearTime'][2] = '[year1_none_hummin_time]';
372 | $ws['moistMinAlltimeTime'][2] = '[alltime_none_hummin_time]';
373 |
374 | #-----------------------------------------------------------------------
375 | # leaf sensor 1 - 4 Only one supported yet , adjust for extra sensors
376 |
377 | $ws['leafAct'][1] = '[actual_none_hum_rel]';
378 | $ws['leafWetLast10'][1] = '[xx]'; // Minutes last 10 minutes leaf wetness was above zero
379 | $ws['leafWetLast60'][1] = '[xx]'; // Minutes last 10 minutes leaf wetness was above zero
380 |
381 | $ws['leafMaxToday'][1] = '[day1_none_hummax_rel]';
382 | $ws['leafMaxMonth'][1] = '[month1_none_hummax_rel]';
383 | $ws['leafMaxYear'][1] = '[year1_none_hummax_rel]';
384 | $ws['leafMaxYear'][1] = '[alltime_none_hummax_rel]';
385 |
386 | $ws['leafMinToday'][1] = '[day1_none_hummin_rel]';
387 | $ws['leafMinMonth'][1] = '[month1_none_hummin_rel]';
388 | $ws['leafMinYear'][1] = '[year1_none_hummin_rel]';
389 | $ws['leafMinActual'][1] = '[alltime_none_hummin_rel]';
390 |
391 | $ws['leafMaxTodayTime'][1] = '[day1_none_hummax_time]';
392 | $ws['leafMaxMonthTime'][1] = '[month1_none_hummax_time]';
393 | $ws['leafMaxYearTime'][1] = '[year1_none_hummax_time]';
394 | $ws['leafMaxAlltimeTime'][1] = '[alltime_none_hummax_time]';
395 |
396 | $ws['leafMminTodayTime'][1] = '[day1_none_hummin_time]';
397 | $ws['leafMminMonthTime'][1] = '[month1_none_hummin_time]';
398 | $ws['leafMminYearTime'][1] = '[year1_none_hummin_time]';
399 | $ws['leafMminAlltimeTime'][1] = '[alltime_none_hummin_time]';
400 |
401 | # ------------------------------------------ for trendpage -------------
402 | $ws['seqmin1_temp'] = '[seqmin1_th0_temp_c]';
403 | $ws['seqmin1_windspeed'] = '[seqmin1_wind0_speed_kn]';
404 | $ws['seqmin1_gustspeed'] = '[seqmin1_wind0_gustspeed_kn]';
405 | $ws['seqmin1_windmaindir'] = '[seqmin1_wind0_maindir_deg]';
406 | $ws['seqmin1_hum'] = '[seqmin1_th0_hum_rel]';
407 | $ws['seqmin1_press'] = '[seqmin1_thb1_sealevel_hpa]';
408 | $ws['seqmin1_raintotal'] = '[seqmin1_rain0_total_mm]';
409 | $ws['seqmin1_UV'] = '[seqmin1_uv0_index]';
410 | $ws['seqmin1_solar'] = '[seqmin1_sol0_radiation_wqm]';
411 |
412 | $ws['seqmin15_temp'] = '[seqmin15_th0_temp_c]';
413 | $ws['seqmin15_windspeed'] = '[seqmin15_wind0_speed_kn]';
414 | $ws['seqmin15_gustspeed'] = '[seqmin15_wind0_gustspeed_kn]';
415 | $ws['seqmin15_windmaindir'] = '[seqmin15_wind0_maindir_deg]';
416 | $ws['seqmin15_hum'] = '[seqmin15_th0_hum_rel]';
417 | $ws['seqmin15_press'] = '[seqmin15_thb1_sealevel_hpa]';
418 | $ws['seqmin15_raintotal'] = '[seqmin15_rain0_total_mm]';
419 | $ws['seqmin15_UV'] = '[seqmin15_uv0_index]';
420 | $ws['seqmin15_solar'] = '[seqmin15_sol0_radiation_wqm]';
421 |
422 | $ws['seqday1_rain_total'] = '[seqday1_rain0_total_mm]';
423 | $ws['seqmonth1_rain_total'] = '[seqmonth1_rain0_total_mm]';
424 | $ws['seqday1_tempMin_total'] = '[seqday1_th0_tempmin_c]';
425 | $ws['seqday1_tempMax_total'] = '[seqday1_th0_tempmax_c]';
426 |
427 | $ws['check_ok'] = '3.00';
428 | // end of todayTtags.txt/todayTtags.php
429 | ?>
uploadMH/ydayTags.html - dated: 09-02-2023 00:46
1 | <?php
2 | #-----------------------------------------------------------------------
3 | # display source of script if requested so
4 | #-----------------------------------------------------------------------
5 | if (isset($_REQUEST['sce']) && strtolower($_REQUEST['sce']) == 'view' ) {
6 | $filenameReal = __FILE__;
7 | $download_size = filesize($filenameReal);
8 | header('Pragma: public');
9 | header('Cache-Control: private');
10 | header('Cache-Control: no-cache, must-revalidate');
11 | header("Content-type: text/plain");
12 | header("Accept-Ranges: bytes");
13 | header("Content-Length: $download_size");
14 | header('Connection: close');
15 | readfile($filenameReal);
16 | exit;
17 | }
18 | $pageName = 'ydayTags.php';
19 | if (!isset($SITE)){echo "<h3>invalid call to script $pageName</h3>";exit;}
20 | $pageVersion = '2.6 2015-11-06 14:49:00 ';
21 | $SITE['wsModules'][$pageName] = 'version: ' . $pageVersion;
22 | $pageFile = basename(__FILE__); // check to see this is the real script
23 | if ($pageFile <> $pageName) {$SITE['wsModules'][$pageFile] = 'this file loaded instead of '.$pageName;}
24 | echo '<!-- module '.$pageFile.' ==== '.$SITE['wsModules'][$pageFile]." -->".PHP_EOL;
25 | #-----------------------------------------------------------------------
26 | # 3.00 2014-09-22 release version
27 | # --------------------------------------- version ----------------------
28 | $ws['wsTagsYday'] = $pageName.'-'.$pageVersion;
29 | # ----------------------------------------------------------------------
30 | $ws['actTimeYday'] = '[actual_localdate]';
31 | # ------------------------------------------ temperature ---------------
32 | $ws['tempMinYdayTime'] = '[day1_th0_tempmin_time]';
33 | $ws['tempMaxYdayTime'] = '[day1_th0_tempmax_time]';
34 | $ws['dewpMinYdayTime'] = '[day1_th0_dewmin_time]';
35 | $ws['dewpMaxYdayTime'] = '[day1_th0_dewmax_time]';
36 | $ws['heatMaxYdayTime'] = '[day1_th0_heatindexmax_time]';
37 | $ws['chilMinYdayTime'] = '[day1_wind0_chillmin_time]';
38 |
39 | if ($SITE['uomTemp'] == '°F'){ // other one is centigrade // '[]';
40 | $ws['tempMinYday'] = '[day1_th0_tempmin_f]';
41 | $ws['tempMaxYday'] = '[day1_th0_tempmax_f]';
42 | $ws['dewpMinYday'] = '[day1_th0_dewmin_f]';
43 | $ws['dewpMaxYday'] = '[day1_th0_dewmax_f]';
44 | $ws['heatMaxYday'] = '[day1_th0_heatindexmax_f]';
45 | $ws['chilMinYday'] = '[day1_wind0_chillmin_f]';
46 | $ws['hudxMaxYday'] = '[day1_th0_humidexmax_f]';
47 | } else {
48 | $ws['tempMinYday'] = '[day1_th0_tempmin_c]';
49 | $ws['tempMaxYday'] = '[day1_th0_tempmax_c]';
50 | $ws['dewpMinYday'] = '[day1_th0_dewmin_c]';
51 | $ws['dewpMaxYday'] = '[day1_th0_dewmax_c]';
52 | $ws['heatMaxYday'] = '[day1_th0_heatindexmax_c]';
53 | $ws['chilMinYday'] = '[day1_wind0_chillmin_c]';
54 | $ws['hudxMaxYday'] = '[day1_th0_humidexmax_c]';
55 | }
56 | # ------------------------------------------ pressure / baro -------------------------------------
57 | $ws['baroMinYdayTime'] = '[day1_thb1_sealevelmin_time]';
58 | $ws['baroMaxYdayTime'] = '[day1_thb1_sealevelmax_time]';
59 | if ($SITE['uomBaro'] == ' inHg'){ // ' hPa', of ' mb', of ' inHg'
60 | $ws['baroMinYday'] = '[day1_thb1_sealevelmin_inhg]';
61 | $ws['baroMaxYday'] = '[day1_thb1_sealevelmax_inhg]';
62 | } else { // default hpa equal to mb
63 | $ws['baroMinYday'] = '[day1_thb1_sealevelmin_hpa]';
64 | $ws['baroMaxYday'] = '[day1_thb1_sealevelmax_hpa]';
65 | }
66 | # ------------------------------------------ humidity ------------------------------------------
67 | $ws['humiMinYdayTime '] = '[day1_th0_hummin_time]';
68 | $ws['humiMaxYdayTime'] = '[day1_th0_hummax_time]';
69 | $ws['humiMinYday'] = '[day1_th0_hummin_rel]';
70 | $ws['humiMaxYday'] = '[day1_th0_hummax_rel]';
71 | # ------------------------------------------ rain ------------------------------------------
72 | if ($SITE['uomRain'] == ' in') { // =' mm', =' in'
73 | $ws['rainYday'] = '[day1_rain0_total_in]';
74 | $ws['etYday'] = '[day1_sol0_et_in:0]';
75 | } else {
76 | $ws['rainYday'] = '[day1_rain0_total_mm]';
77 | $ws['etYday'] = '[day1_sol0_et_mm:0]';
78 | }
79 | # ------------------------------------------ wind ------------------------------------------
80 | $ws['gustMaxYdayTime'] = '[day1_wind0_gustspeedmax_time]';
81 | if ($SITE['uomWind'] == ' km/h') { // =' km/h', =' kts', =' m/s', =' mph'
82 | $ws['gustMaxYday'] = '[day1_wind0_gustspeedmax_kmh:0]';
83 | } else if ($SITE['uomWind'] == ' kts') {
84 | $ws['gustMaxYday'] = '[day1_wind0_gustspeedmax_kn:0]';
85 | } else if ($SITE['uomWind'] == ' mph') {
86 | $ws['gustMaxYday'] = '[day1_wind0_gustspeedmax_mph:0]';
87 | } else { // m/s default
88 | $ws['gustMaxYday'] = '[day1_wind0_gustspeedmax_ms:0]';
89 | }
90 | # ------------------------------------------ UV -----------------------------------------
91 | $ws['uvMaxYdayTime'] = '[day1_uv0_indexmax_time:0]';
92 | $ws['uvMaxYday'] = '[day1_uv0_indexmax:0]';
93 | # ------------------------------------------ Solar ----------------------------------------
94 | $ws['solarMaxYdayTime'] = '[day1_sol0_radiationmax_time:0]';
95 | $ws['solarMaxYday'] = '[day1_sol0_radiationmax_wqm:0]';
96 |
97 | $ws['check_ok_YD'] = '3.00';
98 | // end of ydayTags.txt/ydayTags.php
99 | ?>