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 4018) - 28 March 2024

Legacy Cumulus 1 release v1.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

CloudBase script for Cumulus Ver CU1.5

Discussion of Ken True's web site templates

Moderator: saratogaWX

n9mfk
Posts: 845
Joined: Sun 10 May 2009 8:52 pm
Weather Station: davis vp2 Serial datalogger
Operating System: Windows 7 64-bit
Location: Springfield, IL

Re: CloudBase script for Cumulus Ver CU1.5

Post by n9mfk »

Hi BCJKiwi,
I noticed that daytime is be reported at night

http://99.148.153.229/weather/test3/clo ... php?html=1
beau
You do not have the required permissions to view the files attached to this post.
BCJKiwi
Posts: 1255
Joined: Mon 09 Jul 2012 8:40 pm
Weather Station: Davis VP2 Cabled
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: CloudBase script for Cumulus Ver CU1.5

Post by BCJKiwi »

The day night info comes directly from the cloudbaseT.txt data file through the tag <#isdaylight> so if cloudbase has it wrong, then Cumulus is sending the wrong info (or the script has been changed?). So please check the Cumulus setup (and that the file is being uploaded?).
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: CloudBase script for Cumulus Ver CU1.5

Post by steve »

17:06 would have been before dusk (which is about 17:19 for you now) hence 'isdaylight' would correctly have been 'true'.
Steve
Mark14
Posts: 79
Joined: Thu 23 Aug 2012 8:53 pm
Weather Station: Ecowitt HP3501
Operating System: Windows 10
Location: Konin, Poland

Re: CloudBase script for Cumulus Ver CU1.5

Post by Mark14 »

I uploaded CloudBase script and it works fine: http://slesinpogoda.cba.pl/cloudbaseCU.php

Now I would like to replace the Outlook window with WU forecast with CloudBase script, just like here: http://silveracorn.co.nz/weather/
Could you tell me where (what file) I should change the code? Is it to add only "<img src="cloudbaseCU.php" alt="cloudbase" width="100" height="200" />"?

My website: http://slesinpogoda.cba.pl/wxindex.php All upgrades done.
Image
n9mfk
Posts: 845
Joined: Sun 10 May 2009 8:52 pm
Weather Station: davis vp2 Serial datalogger
Operating System: Windows 7 64-bit
Location: Springfield, IL

Re: CloudBase script for Cumulus Ver CU1.5

Post by n9mfk »

That is in ajax-dashboard.php
line 359 and 675 to 681

Beau
Mark14
Posts: 79
Joined: Thu 23 Aug 2012 8:53 pm
Weather Station: Ecowitt HP3501
Operating System: Windows 10
Location: Konin, Poland

Re: CloudBase script for Cumulus Ver CU1.5

Post by Mark14 »

Done :) Thanks for help. You saved my time.
Image
User avatar
gluepack
Posts: 460
Joined: Tue 22 Jan 2013 9:20 pm
Weather Station: PCE-FWS 20
Operating System: Win 7 Pro
Location: Zlatina, Bulgaria

Re: CloudBase script for Cumulus Ver CU1.5

Post by gluepack »

Oops! I am using MX now, so don't know if that is the problem (I thought that I had checked everything since switching) but somehow cloudbaseCU has failed due to a generated request for SH-moon43.gif that a) doesn't exist and b) it is daytime.

Text file is...
24.4 18.1 0.0 15 1010.6 68 5.0 360 755 C mm hPa km/h m 43 7 1 935 0.0 0.0
Image

PWS links: WundergroundIVARNAPR3CWOP/APRSE(W)2048PWSWeatherZLATINABGAwekas10631Twitter@Zlatina_weather
Station type: PCE-FWS 20…Webcam link: View south to edge of Provadisko plateau
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: CloudBase script for Cumulus Ver CU1.5

Post by steve »

There seems to be a problem with the parsing of the data file, so it's getting the wrong fields for some of the items. I don't know whether this is because of something that MX is doing differently. It looks like the script is taking your latitude (43) as the moon age, rather than the 7 following it, which is the actual moon age. Similarly, it's looking at the wrong field for 'is daylight'.
Steve
User avatar
gluepack
Posts: 460
Joined: Tue 22 Jan 2013 9:20 pm
Weather Station: PCE-FWS 20
Operating System: Win 7 Pro
Location: Zlatina, Bulgaria

Re: CloudBase script for Cumulus Ver CU1.5

Post by gluepack »

Looks like it gets condensed in my post but in the editor there appears to be an additional blank (or non-displayable) between m and 43
cloudbaseCU.txt
You do not have the required permissions to view the files attached to this post.
Image

PWS links: WundergroundIVARNAPR3CWOP/APRSE(W)2048PWSWeatherZLATINABGAwekas10631Twitter@Zlatina_weather
Station type: PCE-FWS 20…Webcam link: View south to edge of Provadisko plateau
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: CloudBase script for Cumulus Ver CU1.5

Post by steve »

The code in Cumulus (1 and MX) which handles the latitude 'dp' parameter pads the field to a minimum width of dp+3, so in the case of dp=0, there's a leading space. Presumably the script expects a single space as delimiter rather than one or more spaces.
Steve
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: CloudBase script for Cumulus Ver CU1.5

Post by steve »

Assuming it does work OK with a file generated by Cumulus 1, then the floating point formatting routines in Delphi must work differently to those in .Net - Delphi truncates and .Net pads left with spaces.
Steve
User avatar
gluepack
Posts: 460
Joined: Tue 22 Jan 2013 9:20 pm
Weather Station: PCE-FWS 20
Operating System: Win 7 Pro
Location: Zlatina, Bulgaria

Re: CloudBase script for Cumulus Ver CU1.5

Post by gluepack »

Not sure what you are suggesting.

Sounds like you are saying that the same situation would have occurred with Cu1, which isn't the case.

Oh, just saw your 2nd response. So... you will do something about it?
Image

PWS links: WundergroundIVARNAPR3CWOP/APRSE(W)2048PWSWeatherZLATINABGAwekas10631Twitter@Zlatina_weather
Station type: PCE-FWS 20…Webcam link: View south to edge of Provadisko plateau
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: CloudBase script for Cumulus Ver CU1.5

Post by steve »

I'll have a look at it to see what I can do.
Steve
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: CloudBase script for Cumulus Ver CU1.5

Post by steve »

If you change this line in the script:

Code: Select all

$data = explode(' ',$file[0]);
to

Code: Select all

$data = preg_split('/\s+/',$file[0]);
it will split the string using one or more whitespace characters as delimiters.
Steve
User avatar
gluepack
Posts: 460
Joined: Tue 22 Jan 2013 9:20 pm
Weather Station: PCE-FWS 20
Operating System: Win 7 Pro
Location: Zlatina, Bulgaria

Re: CloudBase script for Cumulus Ver CU1.5

Post by gluepack »

Thanks for that.
I was just looking at the code and saw the $data = explode(' ',$file[0]); but was struggling to think how I could change it.
Will give it a try.

Update: Thanks, that worked great!
Image

PWS links: WundergroundIVARNAPR3CWOP/APRSE(W)2048PWSWeatherZLATINABGAwekas10631Twitter@Zlatina_weather
Station type: PCE-FWS 20…Webcam link: View south to edge of Provadisko plateau
Post Reply