Evening all,
I am completing the move over from another weather program to Cumulus (really liking Cumulus) - as such i have a customised dashboard and all is working apart from Current Conditions, Rain Yesterday and % of Solar. I cant work out why they are not loading (i assume its all in realtime.txt?)
http://weather.casa.ucl.ac.uk/dashboard.htm
The background is also meant to change colour according to the temp - this is the next step to fix...
Any thoughts would be great if possible
Andy
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
Ajax - Current and Rain Yesterday
Moderator: saratogaWX
- mcrossley
- Posts: 12756
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: Ajax - Current and Rain Yesterday
Rain yesterday...
If you look in the Wiki for realtime.txt: http://wiki.sandaysoft.com/a/Realtime.txt
you will see that yesterdays rain is field 21 (Wiki says 22, but that is 1 relative not 0 relative).
Your JS code at line 904, is extracting field 19 for yesterdays rain, which is actually the monthly rainfall. That needs changing.
The JS script does not seem to calculate the % solar, just gets the solar irradiation value. So you would have to add something like this after the existing calc at line 886...
If you look in the Wiki for realtime.txt: http://wiki.sandaysoft.com/a/Realtime.txt
you will see that yesterdays rain is field 21 (Wiki says 22, but that is 1 relative not 0 relative).
Your JS code at line 904, is extracting field 19 for yesterdays rain, which is actually the monthly rainfall. That needs changing.
The JS script does not seem to calculate the % solar, just gets the solar irradiation value. So you would have to add something like this after the existing calc at line 886...
Code: Select all
// Solar Radiation
var solar = realtime[45] * 1.0;
set_ajax_obs("ajaxsolar",solar.toFixed(0));
var solarpct = solar / realtime[56] * 100;
set_ajax_obs("ajaxsolarpct",solarpct.toFixed(0));
-
- Posts: 74
- Joined: Sun 02 Oct 2011 9:15 am
- Weather Station: VP2
- Operating System: Mac/win7
- Location: United Kingdom
Re: Ajax - Current and Rain Yesterday
Thanks Mark,
I updated the tags, added in sunshine hours and got the colours working - so the page background runs through a different colour every 5 degrees.
http://weather.casa.ucl.ac.uk/dashboard.htm
Thanks as ever for the help
Andy
I updated the tags, added in sunshine hours and got the colours working - so the page background runs through a different colour every 5 degrees.
http://weather.casa.ucl.ac.uk/dashboard.htm
Thanks as ever for the help
Andy
- mcrossley
- Posts: 12756
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: Ajax - Current and Rain Yesterday
I spot one issue, you have changed the monthly rain total to yesterdays value...
var rainmo = convertRain(realtime[21]);
set_ajax_obs("ajaxrainmo",rainmo.toFixed(dpRain) + uomRain);
Should be field 19.
var rainmo = convertRain(realtime[21]);
set_ajax_obs("ajaxrainmo",rainmo.toFixed(dpRain) + uomRain);
Should be field 19.
-
- Posts: 74
- Joined: Sun 02 Oct 2011 9:15 am
- Weather Station: VP2
- Operating System: Mac/win7
- Location: United Kingdom
Re: Ajax - Current and Rain Yesterday
oops - fixed, thanks
Andy
Andy