Webtags (preserving history): Difference between revisions

From Cumulus Wiki
Jump to navigationJump to search
m
(4 intermediate revisions by the same user not shown)
Line 838: Line 838:
A php script for adding feels like as calculated in version 3.6.10 to any standard log line created either without feels like, or with an older (now incorrect) calculation, can be downloaded from [https://cumulus.hosiene.co.uk/viewtopic.php?f=18&t=18096 Create Missing topic on support forum]. Obviously, this calculates from the small sub-set of current conditions that have been logged, and is not as accurate at deriving maximum and minimum as derivation made as each reading is processed by MX (so including all current conditions).
A php script for adding feels like as calculated in version 3.6.10 to any standard log line created either without feels like, or with an older (now incorrect) calculation, can be downloaded from [https://cumulus.hosiene.co.uk/viewtopic.php?f=18&t=18096 Create Missing topic on support forum]. Obviously, this calculates from the small sub-set of current conditions that have been logged, and is not as accurate at deriving maximum and minimum as derivation made as each reading is processed by MX (so including all current conditions).


==Extra Sensors Davis (and a few others)==
==Extra Sensors==
 
===Extra Sensors Davis (and a few others)===


These web tags hold current values for additional sensors supported by Cumulus. Most of the tags in this section relate to Davis stations, but not exclusively.
These web tags hold current values for additional sensors supported by Cumulus. Most of the tags in this section relate to Davis stations, but not exclusively.
Line 916: Line 918:




==Extra Sensors Ecowitt==
===Extra Sensors Ecowitt===


{{Version badge 1}} Not available in Cumulus 1.
{{Version badge 1}} Not available in Cumulus 1.
Line 1,399: Line 1,401:
Note that Cumulus does not use thousand separators, so the only places a comma can be used are as a field separator or as a decimal separator. Obviously it cannot be used for both. This section is for those locales where a comma is used instead of a full stop to separate the integer and decimal parts of a number. Some computer languages like JavaScript will not accept a comma being used for this purpose, and Cumulus uses JavaScript for various tasks, as do various third party web pages.  From '''version 1.9.3''' build 1045, Cumulus 1 (and MX) has provided some current conditions web tags, some today web tags, and some recent history web tags in an alternative format where (regardless of locale) the number is always output in a format that uses a decimal point. They all correspond to the same tag with 'RC' removed.
Note that Cumulus does not use thousand separators, so the only places a comma can be used are as a field separator or as a decimal separator. Obviously it cannot be used for both. This section is for those locales where a comma is used instead of a full stop to separate the integer and decimal parts of a number. Some computer languages like JavaScript will not accept a comma being used for this purpose, and Cumulus uses JavaScript for various tasks, as do various third party web pages.  From '''version 1.9.3''' build 1045, Cumulus 1 (and MX) has provided some current conditions web tags, some today web tags, and some recent history web tags in an alternative format where (regardless of locale) the number is always output in a format that uses a decimal point. They all correspond to the same tag with 'RC' removed.


'''CURRENT CONDITIONS: '''
===CURRENT CONDITIONS:===


<#RCtemp>, <#RCdew>, <#RCheatindex>, <#RChum>, <#RCinhum>, <#RCintemp>, <#RCpress>, <#RCrfall>, <#RCrrate>, <#RCwchill>, <#RCwgust>, <#RCwspeed>, <#RCwlatest>
<#RCtemp>, <#RCdew>, <#RCheatindex>, <#RChum>, <#RCinhum>, <#RCintemp>, <#RCpress>, <#RCrfall>, <#RCrrate>, <#RCwchill>, <#RCwgust>, <#RCwspeed>, <#RCwlatest>


'''TODAY'''
===TODAY:===


<#RCpressTH>,  <#RCpressTL>,  <#RCrrateTM>,  <#RCtempTH>, <#RCtempTL>, <#RCwgustTM>,  <#RCdewpointTH>, <#RCdewpointTL>, <#RCwchillTL>, <#RCheatindexTH>, <#RCapptempTH>, <#RCapptempTL>
<#RCpressTH>,  <#RCpressTL>,  <#RCrrateTM>,  <#RCtempTH>, <#RCtempTL>, <#RCwgustTM>,  <#RCdewpointTH>, <#RCdewpointTL>, <#RCwchillTL>, <#RCheatindexTH>, <#RCapptempTH>, <#RCapptempTL>


'''RECENT HISTORY'''
===RECENT HISTORY:===


<#RCRecentOutsideTemp>, <#RCRecentWindSpeed>, <#RCRecentWindGust>, <#RCRecentWindLatest>, <#RCRecentWindChill>, <#RCRecentDewPoint>, <#RCRecentHeatIndex>, <#RCRecentPressure>, <#RCRecentRainToday>, <#RCRecentUV>
<#RCRecentOutsideTemp>, <#RCRecentWindSpeed>, <#RCRecentWindGust>, <#RCRecentWindLatest>, <#RCRecentWindChill>, <#RCRecentDewPoint>, <#RCRecentHeatIndex>, <#RCRecentPressure>, <#RCRecentRainToday>, <#RCRecentUV>
Line 1,416: Line 1,418:
   
   


From '''version 3.5.4''' build 3075, all web tags (except indoor temperature <#intemp> where rc parameter not available until version 3.6.8 build 3084), that produce decimal number output now support the "'''rc=y'''" option. e.g. <tt><#tempYH rc=y></tt> will report yesterday's highest temperature using a full stop to separate decimal part where the locale would normally use a comma.
From '''version 3.5.4''' build 3075, all web tags (except indoor temperature <#intemp> where rc parameter not available until version 3.6.8 build 3084), that produc
 
=== Heading text ===
e decimal number output now support the "'''rc=y'''" option. e.g. <tt><#tempYH rc=y></tt> will report yesterday's highest temperature using a full stop to separate decimal part where the locale would normally use a comma.


==Yesterday==
==Yesterday==
Line 2,243: Line 2,246:


==Day/Night/Sun/Moon==
==Day/Night/Sun/Moon==
These are updated each hour to refer to current time-zone
In Cumulus 1 most of these are only calculated at UTC zero hours, but are updated each hour to refer to current time-zone.
 
MX is more complicated, but most of these are calculated hourly.
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
Line 2,270: Line 2,275:
|-
|-
|<#daylightlength>
|<#daylightlength>
|Length of daylight in hours and minutes (dawn to dusk)
| Approximate length of daylight in hours and minutes (dawn to dusk) - if your timezone is UTC or a few hours off that,  the dusk may well be that just passed, and the dawn that to come as at the zero hours UTC when Cumulus 1 does this calculation
|-
|-
|<#isdaylight>
|<#isdaylight>
Line 2,281: Line 2,286:
|A string giving an approximate predicted difference between the length of daylight (dawn to dusk) yesterday and length of daylight tomorrow.
|A string giving an approximate predicted difference between the length of daylight (dawn to dusk) yesterday and length of daylight tomorrow.


This web tag is unreliable, and its use is not recommended. Its use is therefore not supported (i.e. you use it at your own risk).
This web tag is unreliable, basically because of the note for <#daylightlength>, and its use was not recommended. Its use is therefore not supported by Steve Loft (i.e. you use it at your own risk) in the legacy Cumulus.
|-
|-
|<#moonphase>
|<#moonphase>
Line 2,290: Line 2,295:


MX b3047 adds the 'dp' and 'rc' parameters Supports an optional 'dp' parameter, if supplied the result is returned to the specified number of decimal places. E.g <#MoonAge> gives "11" <#MoonAge dp=3> gives "11.234"
MX b3047 adds the 'dp' and 'rc' parameters Supports an optional 'dp' parameter, if supplied the result is returned to the specified number of decimal places. E.g <#MoonAge> gives "11" <#MoonAge dp=3> gives "11.234"
If the "dp" parameter is supplied, then also supplying "rc=y" in addition will cause any decimal comma to be converted to a decimal point.
 
There is some PHP script code below this table showing how this can be converted to days, hours, minutes, seconds*
 
If the "dp" parameter is supplied, then supplying "rc=y" in addition will cause any decimal comma to be converted to a decimal point.
|-
|-
|<#moonrise>
|<#moonrise>
Line 2,309: Line 2,317:
|-
|-
|<#SunshineHours>
|<#SunshineHours>
|Hours of sunshine so far today  (Solar sensor needed)
| see[[#Today.ini]] Miscellaneous
|-
|-
|<#SunshineHoursY>
|<#SunshineHoursY>
|Total hours of sunshine yesterday  (Solar sensor needed)
|see [[#Yesterday]] Miscellaneous
|-
|-
|<#CurrentSolarMax>
|<#CurrentSolarMax>
Line 2,320: Line 2,328:
|Returns 1 if the sun is shining, otherwise 0 (Solar sensor needed)
|Returns 1 if the sun is shining, otherwise 0 (Solar sensor needed)
|}
|}
*<code>
$MoonAgeDays = <#MoonAge dp=0> +0;
$moonDecimalPart = <#MoonAge dp=4> - $MoonAgeDays;
$MoonAgeHours = round($moonDecimalPart * 24, 0);
$MoonAgeMinutes  = round(($moonDecimalPart * 24 * 60) - ($MoonAgeHours * 60), 0);
$MoonAgeSeconds = round(($moonDecimalPart * 24 * 60 * 60) - ($MoonAgeHours * 60 * 60) - ($MoonAgeMinutes * 60), 3);
$MoonAge      =    $MoonAgeDays . '&nbsp;days, ' .  $MoonAgeHours . '&nbsp;hours, '
. $MoonAgeMinutes . '&nbsp;minutes, ' . $MoonAgeSeconds . '&nbsp;seconds';
// Change the English words 'days, ', ' hours, ', and 'minutes' to the equivalents in your language</code>


==Alarms==
==Alarms==
5,838

edits

Navigation menu