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).
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>
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>.
Code: 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>
Code: Select all
and these pages are updated every <#interval> minutes.
Code: Select all
and the data below updates in <span id="refresh_in"></span> seconds.