Please read the posts in the Announcements section about the current status of Cumulus development now that I have retired

Please read this post before posting

Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3043 Jan 20 2017. See this post for download

CloudBase script for Cumulus Ver CU1.5

Discussion of Ken True's web site templates

Moderator: saratogaWX

n9mfk
Posts: 845
Joined: Sun May 10, 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

Postby n9mfk » Sun Jan 05, 2014 11:42 pm

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: 845
Joined: Mon Jul 09, 2012 8:40 pm
Weather Station: Davis VP2 Cabled with Solar
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: CloudBase script for Cumulus Ver CU1.5

Postby BCJKiwi » Mon Jan 06, 2014 1:22 am

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: 26254
Joined: Mon Jun 02, 2008 6:49 pm
Weather Station: None
Operating System: None
Location: On tour in France
Contact:

Re: CloudBase script for Cumulus Ver CU1.5

Postby steve » Mon Jan 06, 2014 8:19 am

17:06 would have been before dusk (which is about 17:19 for you now) hence 'isdaylight' would correctly have been 'true'.
Steve
-----
Hosting available for Cumulus web sites. See http://sandaysoft.com/forum/viewtopic.php?f=2&t=11876

Please read the posts in the Announcements section about the current status of Cumulus development now that I have retired

Mark14
Posts: 48
Joined: Thu Aug 23, 2012 8:53 pm
Weather Station: WH 2080
Operating System: Windows 7
Location: Konin, Poland

Re: CloudBase script for Cumulus Ver CU1.5

Postby Mark14 » Sat Jul 19, 2014 12:51 pm

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.

n9mfk
Posts: 845
Joined: Sun May 10, 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

Postby n9mfk » Sat Jul 19, 2014 2:17 pm

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

Beau

Mark14
Posts: 48
Joined: Thu Aug 23, 2012 8:53 pm
Weather Station: WH 2080
Operating System: Windows 7
Location: Konin, Poland

Re: CloudBase script for Cumulus Ver CU1.5

Postby Mark14 » Sun Jul 20, 2014 7:19 am

Done :) Thanks for help. You saved my time.

User avatar
gluepack
Posts: 460
Joined: Tue Jan 22, 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

Postby gluepack » Sat Aug 22, 2015 9:33 am

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: 26254
Joined: Mon Jun 02, 2008 6:49 pm
Weather Station: None
Operating System: None
Location: On tour in France
Contact:

Re: CloudBase script for Cumulus Ver CU1.5

Postby steve » Sat Aug 22, 2015 9:59 am

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
-----
Hosting available for Cumulus web sites. See http://sandaysoft.com/forum/viewtopic.php?f=2&t=11876

Please read the posts in the Announcements section about the current status of Cumulus development now that I have retired

User avatar
gluepack
Posts: 460
Joined: Tue Jan 22, 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

Postby gluepack » Sat Aug 22, 2015 10:05 am

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: 26254
Joined: Mon Jun 02, 2008 6:49 pm
Weather Station: None
Operating System: None
Location: On tour in France
Contact:

Re: CloudBase script for Cumulus Ver CU1.5

Postby steve » Sat Aug 22, 2015 10:15 am

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
-----
Hosting available for Cumulus web sites. See http://sandaysoft.com/forum/viewtopic.php?f=2&t=11876

Please read the posts in the Announcements section about the current status of Cumulus development now that I have retired

User avatar
steve
Cumulus Author
Posts: 26254
Joined: Mon Jun 02, 2008 6:49 pm
Weather Station: None
Operating System: None
Location: On tour in France
Contact:

Re: CloudBase script for Cumulus Ver CU1.5

Postby steve » Sat Aug 22, 2015 10:19 am

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
-----
Hosting available for Cumulus web sites. See http://sandaysoft.com/forum/viewtopic.php?f=2&t=11876

Please read the posts in the Announcements section about the current status of Cumulus development now that I have retired

User avatar
gluepack
Posts: 460
Joined: Tue Jan 22, 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

Postby gluepack » Sat Aug 22, 2015 10:22 am

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: 26254
Joined: Mon Jun 02, 2008 6:49 pm
Weather Station: None
Operating System: None
Location: On tour in France
Contact:

Re: CloudBase script for Cumulus Ver CU1.5

Postby steve » Sat Aug 22, 2015 10:29 am

I'll have a look at it to see what I can do.
Steve
-----
Hosting available for Cumulus web sites. See http://sandaysoft.com/forum/viewtopic.php?f=2&t=11876

Please read the posts in the Announcements section about the current status of Cumulus development now that I have retired

User avatar
steve
Cumulus Author
Posts: 26254
Joined: Mon Jun 02, 2008 6:49 pm
Weather Station: None
Operating System: None
Location: On tour in France
Contact:

Re: CloudBase script for Cumulus Ver CU1.5

Postby steve » Sat Aug 22, 2015 10:44 am

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
-----
Hosting available for Cumulus web sites. See http://sandaysoft.com/forum/viewtopic.php?f=2&t=11876

Please read the posts in the Announcements section about the current status of Cumulus development now that I have retired

User avatar
gluepack
Posts: 460
Joined: Tue Jan 22, 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

Postby gluepack » Sat Aug 22, 2015 10:54 am

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


Return to “Saratoga Templates”

Who is online

Users browsing this forum: Yahoo [Bot] and 3 guests