Welcome to the Cumulus Support forum.
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 2024
Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)
Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 2024
Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)
Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki
Auto-refresh Website Index Page Without Using Meta Refresh
Moderator: daj
- dazza1223
- Posts: 860
- Joined: Sun 25 Jan 2015 8:41 pm
- Weather Station: Davis Vantage Pro 2 plus
- Operating System: Raspberry pi 4 (4gb)
- Location: Worthing
- Contact:
Re: Auto-refresh Website Index Page Without Using Meta Refresh
keep ur cam on line im working on it
- dazza1223
- Posts: 860
- Joined: Sun 25 Jan 2015 8:41 pm
- Weather Station: Davis Vantage Pro 2 plus
- Operating System: Raspberry pi 4 (4gb)
- Location: Worthing
- Contact:
Re: Auto-refresh Website Index Page Without Using Meta Refresh
i just done the moonphase tag in realtimereader.js but it only output Moon Phase: Waxing but it ment to be Waxing Gibbous ive look to see any bug but i cant fined any think
here the link
http://www.davisworthing.co.uk/
here the link
http://www.davisworthing.co.uk/
- dazza1223
- Posts: 860
- Joined: Sun 25 Jan 2015 8:41 pm
- Weather Station: Davis Vantage Pro 2 plus
- Operating System: Raspberry pi 4 (4gb)
- Location: Worthing
- Contact:
Re: Auto-refresh Website Index Page Without Using Meta Refresh
hi i got realtimereader.js on my site and Moon Phase just shows Waxing if i use the <#moonphase> tag it shows Waning Gibbous but the realtimereader.js just shows Waxing
here is my test page
http://www.davisworthing.co.uk/new/index.php
here is my test page
http://www.davisworthing.co.uk/new/index.php
-
- Posts: 129
- Joined: Sun 21 Aug 2011 2:26 am
- Weather Station: Davis Vantage Vue
- Operating System: Windows 10
- Location: Sydney. Australia
- Contact:
Re: Auto-refresh Website Index Page Without Using Meta Refresh
Is this method and information (first post of this thread) still valid for Cumulus1? I read somewhere that using the meta "refresh" is not desirable, but seems to work ok at 10 minutes, and thought this may be a solution for index page updates.
Synewave wrote: ↑Thu 24 Feb 2011 12:12 pm It seems many want their index page to automatically refresh without having to press F5. Any many don't want to get into the realms of changing their site to use the PHP methods available in the forum.
Here is a simple way to achieve this using Javascript that will refresh the weather data on your index page automatically every 15 seconds. It works by reading the data from your realtime.txt file (providing you already have Cumulus set to upload that). You can see it in action here: http://www.synewave.co.uk/gcsweather/indextest.htm
Before starting make a backup of your indexT.htm file (call it indexTold.htm for example).
Implementation is simple, just unzip this file and upload the realtimereader.js and jquery.js files to your webserver (to the same location your Cumulus .htm files are).
jquery and realtimereader.zip
Then edit the indexT.htm file in the Cumulus\web\ folder on your PC using something like Notepad or preferably Notepad++.
Add these two lines just before </head>
Then edit each of the <#webtags> that you want to refresh automatically as follows:Code: Select all
<script src="jquery.js" type="text/javascript"></script> <script src="realtimereader.js" type="text/javascript"></script>
<#temp> becomes <span id="temp"></span>
<#dew> becomes <span id="dew"></span>
... and so on.
Note that you can only change the webtags to id's that are already provided by realtime.txt i.e. dawn and dusk are not in the realtime.txt file so these webtags need to stay in their original format i.e. <#dawn>. It is not really necessary for this data to be refreshed realtime anyway. Also note that webtags that are repeated in the indexT.htm file also cannot be changed to id's as unique id's can only be used once in a page. Again, <#tempunit> for example will always remain the same so no need to auto-refresh anyway.
Be aware that next time you upgrade Cumulus, the install will overwrite your modified indexT.htm file if you have 'Include HTML Templates' ticked during the installation process. My advice would be to have this option unticked.
Alternatively, if you are still using the standard template supplied with Cumulus, here is the code with all the webtags replaced with id's. Copy and paste this into the indexT.htm file from and including the exisiting <p> and </p>.
If you want to include a countdown timer, instead of your page saying ".... and these pages are updated every xx minutes", edit the code in indexT.htm as follows. LocateCode: Select all
<p>Forecast: <span id="forecast"></span></p> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <caption>Conditions at local time <span id="time"></span> on <span id="date"></span></caption> <tr> <td colspan="4" class="tableseparator_temp">Temperature and Humidity </td> </tr> <tr class="td_temperature_data"> <td>Temperature</td> <td><span id="temp"></span> <#tempunit></td> <td>Dew Point </td> <td><span id="dew"></span> <#tempunit></td> </tr> <tr class="td_temperature_data"> <td>Windchill</td> <td><span id="wchill"></span> <#tempunit></td> <td>Humidity</td> <td><span id="hum"></span>%</td> </tr> <tr class="td_temperature_data"> <td>Heat Index</td> <td><span id="heatindex"></span> <#tempunit></td> <td>Apparent Temperature</td> <td><span id="apptemp"></span> <#tempunit></td> </tr> <tr class="td_temperature_data"> <td>Solar Radiation</td> <td><span id="SolarRad"></span> W/m²</td> <td>Evapotranspiration Today</td> <td><span id="ET"></span> <#rainunit></td> </tr> <tr> <td colspan="4" class="tableseparator_rainfall">Rainfall</td> </tr> <tr class="td_rainfall_data"> <td>Rainfall Today</td> <td><span id="rfall"></span> <#rainunit></td> <td>Rainfall Rate</td> <td><span id="rrate"></span> <#rainunit>/hr</td> </tr> <tr class="td_rainfall_data"> <td>Rainfall This Month</td> <td><span id="rmonth"></span> <#rainunit></td> <td>Rainfall This Year</td> <td><span id="ryear"></span> <#rainunit></td> </tr> <tr class="td_rainfall_data"> <td>Rainfall Last Hour</td> <td><span id="rhour"></span> <#rainunit></td> <td>Last rainfall</td> <td><#LastRainTipISO></td> </tr> <tr> <td colspan="4" class="tableseparator_wind">Wind</td> </tr> <tr class="td_wind_data"> <td>Wind Speed (gust)</td> <td><span id="wgust"></span> <#windunit></td> <td>Wind Speed (avg)</td> <td><span id="wspeed"></span> <#windunit></td> </tr> <tr class="td_wind_data"> <td>Wind Bearing</td> <td><span id="avgbearing"></span>° <span id="wdir"></span></td> <td>Beaufort <span id="beaufort"></span></td> <td><span id="beaudesc"></span></td> </tr> <tr> <td colspan="4" class="tableseparator_pressure">Pressure</td> </tr> <tr class="td_pressure_data"> <td>Barometer </td> <td><span id="press"></span> <#pressunit></td> <td><#presstrend></td> <td><span id="presstrendval"></span> <#pressunit>/hr</td> </tr> <tr> <td colspan="4" class="td_navigation_bar">:<a href="index.htm">now</a>::<a href="gauges.htm">gauges</a>::<a href="today.htm">today</a>::<a href="yesterday.htm">yesterday</a>::<a href="record.htm">records</a>::<a href="trends.htm">trends</a>:<span id="forum><span id="webcam></td> </tr> </table> <p class="credits"><br /> Page updated <span id="update"></span><br /> powered by <a href="http://sandaysoft.com/products/cumulus" target="_blank">Cumulus</a> v<span id="version"></span> (<span id="build"></span>) </p>
and replace that withCode: Select all
and these pages are updated every <#interval> minutes.
Old scripts below, don't use these.Code: Select all
and the data below updates in <span id="refresh_in"></span> seconds.