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

Cumulus ‘Current Conditions’ Alternative v3.0

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderators: daj, TNETWeather

User avatar
JennyLeez
Posts: 283
Joined: Wed Dec 16, 2009 2:32 am
Weather Station: La Crosse WS3083
Operating System: Windows XP, Win7 & Win 10
Location: Wairoa, Hawkes Bay. New Zealand.
Contact:

Cumulus ‘Current Conditions’ Alternative v3.0

Postby JennyLeez » Sat Dec 20, 2014 11:25 pm

After years of manually adding the ‘Current Conditions’ into my Cumulus Window on my PC, I finally have a script to do it for me automatically by reading the webtags on my Server.

So this Christmas I share this new toy with anyone interested :)

This script adds a text line displaying the 'Current Conditions' gained from the Cumulus processed webtags.
It does not replace <#currcond> but may be used instead of, or in conjunction with.
e.g. Sunny, Warm, Light Winds from the North-Northwest, Temperature Falling, Barometer Falling Slowly.

Live Demos:
Cumulus Standard
Under the Time and Date.
http://wairoa.net/weather/cc/curcond.htm
Admin Modifier Panel Standalone Demo:
http://wairoa.net/weather/cc/currAdminML.php

Saratoga template:
Under the Web Cam Thumbnail
http://wairoa.dynu.net/saratoga/index.php?lang=en
Admin Modifier Panel Demo:
http://wairoa.dynu.net/saratoga/CCmodifier.php

Cumulus - Own Design
Above the Webcam thumbnail - Short Version.
http://wairoa.net/weather/cc/curconditions_short.htm
Admin Modifier Panel 'Own Design' Demo:
http://wairoa.net/weather/cc/CCmodifier.htm

Weather By You
Example template - Weather Eden
Across the top using the php method.
On the Right using the Javascript method.
http://wairoa.dynu.net/wby/index.php
Admin Modifier Panel Demo:
http://wairoa.dynu.net/wby/CCmodifier.php

Leuven Template
Under the Temperature Block
http://wairoa.dynu.net/weather2/index.php

Some decisions are a "best guess", some options will require a solar sensor.

Single language working is suitable for ALL page types (htm / html / php / asp), Multi-Language must be php, and can be used with:
- Standard Cumulus upload
- Own Design or suitable web site template
- Saratoga ML Template
- Weather By You ML Template
- Leuven Template

Options and Full Instructions are in the Readme.txt

Note – Options include javascript output in a single Language site.

USER defined variables.
Which weather "elements" to display.
User ‘language’ variables may be defined to suit your location and conditions.

Known Limitations:
Your server MUST be php enabled, but the output can be in a php page OR standard html page.
Instructions are in the Readme.

4 Distribution Versions are available.
20th December 2014 v3.0
- Saratoga
- Weather By You
- Cumulus Standard and Cumulus Own Design.
28th December 2014
- Leuven Template

Packages Contain:
curconditions.php - Main Current Conditions Script.
CCdata.php - File Cumulus will Process/upload

currAdminML.php - Optional Admin Modifier Panel addon for currconditions.php (all versions)
CCmodifier.php - Admin Modifier Panel for use with the Saratoga/Weather by You enviroments.
cur_footer.php - Addon used by CCmodifier.php for Saratoga only.
overwrite.txt - Our working file.
Readme.txt
Screenshots
Language translation Files - For use with Saratoga Template
en (Anon)
fr (PaulMy)
el (Corsair)
nl (Nitrx)
pl (pernaczy)
pt (Werk-AG)
de (KarlS)
it (Vathek)
no (Altaelva)
es (yv1hx)
fi (Kapo)
si (dunda)
mi (JennyLeez)
bg (Anon)
se (beelzebubs/bduren)
ct (Anon)
dk (Anon)
af (Anon)
ro (Anon)
hu (Anon)
he (Anon)

Language Translation Files for use with Weather By You and Cumulus Standard.
CC-de.php
CC-en.php
CC-es.php
CC-fi.php
CC-it.php
CC-nl.php
CC-no.php
CC-pl.php
CC-fr.php
CC-sl.php
CC-se.php
Files will be added as they are completed.

Admin Modifier Panel
Optional Admin Modifier Panel addon included. Allows web browser access to the ‘Current Conditions’ line with the ability to add to, or change the display plus set the length of time to display before returning back to auto.

My thanks to the beteljuice for taking an idea, a few lines of code and reanimating this script.
My thanks also to PaulMy and Nitrx for helping test the different versions and UOM and lastly but not least, my thanks to those who have helped with the translating.
You do not have the required permissions to view the files attached to this post.
Last edited by JennyLeez on Mon Mar 13, 2017 4:09 am, edited 11 times in total.
Wairoa, Hawkes Bay, New Zealand Weather Station:
http://wairoa.net/weather/index.htm
Cumulus Topsites:
http://cumulussites.net/
Image

User avatar
PaulMy
Posts: 1563
Joined: Sun Sep 28, 2008 11:54 pm
Weather Station: Davis Vantage Pro 2 w/Envoy USB
Operating System: Windows-8
Location: Komoka, ON Canada
Contact:

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Postby PaulMy » Sun Dec 21, 2014 12:23 am

I will install the release version later this evening, and the beta version is being used here -
http://www.komokaweather.com Cumulus
http://www.komokaweather.ca Saratoga

Well done JennyLeez and beteljuice :clap:

Paul

bnwrx
Posts: 448
Joined: Wed Feb 25, 2009 12:01 am
Weather Station: Ambient WS2095 (Fine/Offset)
Operating System: Windows 10 64bit
Location: Woodland Park, Colorado USA
Contact:

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Postby bnwrx » Sun Dec 21, 2014 5:04 pm

I am trying it here: http://woodlandweather.org/

It says "Hot"...I am wondering if there is a setting somewhere for "F" instead of "C"??
Also it says my Temperature is "Falling Rapidly" when in fact it is slowly "Rising"

Any suggestions appreciated....

Thanks for this add-on though...

User avatar
beteljuice
Posts: 2456
Joined: Tue Dec 09, 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Postby beteljuice » Sun Dec 21, 2014 8:47 pm

There are hiccoughs somewhere - the beteljuice will investigate ...
Image
......................Imagine, what you will KNOW tomorrow !

bnwrx
Posts: 448
Joined: Wed Feb 25, 2009 12:01 am
Weather Station: Ambient WS2095 (Fine/Offset)
Operating System: Windows 10 64bit
Location: Woodland Park, Colorado USA
Contact:

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Postby bnwrx » Sun Dec 21, 2014 9:08 pm

beteljuice wrote:There are hiccoughs somewhere - the beteljuice will investigate ...


I will patiently await the results of the investigation.....

Thank you..!

User avatar
beteljuice
Posts: 2456
Joined: Tue Dec 09, 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Postby beteljuice » Sun Dec 21, 2014 11:49 pm

The beteljuice totally cocked-up a simple temperature conversion (Affects those with a 'native' unit of F)

In curconditions.php look for:

Code: Select all

// now do Comfort Index text
// NB: $apptemp should be APPARENT temperature C
    $CI_text = ""; // Get Out Of Jail Free
    $_apptemp = decCom($apptemp);
    if($display['showComfort']){
        if($tempunitnodeg != "C") $_apptemp = round(($_apptemp *9 /2) +32); // ***** WRONG WRONG WRONG
The 'WRONG' line should be:

Code: Select all

        if($tempunitnodeg != "C") $_apptemp = round(($_apptemp -32) *5 /9);
There had to be an :oops: somewhere !!!
Image
......................Imagine, what you will KNOW tomorrow !

User avatar
JennyLeez
Posts: 283
Joined: Wed Dec 16, 2009 2:32 am
Weather Station: La Crosse WS3083
Operating System: Windows XP, Win7 & Win 10
Location: Wairoa, Hawkes Bay. New Zealand.
Contact:

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Postby JennyLeez » Mon Dec 22, 2014 12:24 am

Version 3 Packages Corrected and re uploaded.

Thanks beteljuice :)

For those needing to edit.
The line is around 419.
Wairoa, Hawkes Bay, New Zealand Weather Station:
http://wairoa.net/weather/index.htm
Cumulus Topsites:
http://cumulussites.net/
Image

bnwrx
Posts: 448
Joined: Wed Feb 25, 2009 12:01 am
Weather Station: Ambient WS2095 (Fine/Offset)
Operating System: Windows 10 64bit
Location: Woodland Park, Colorado USA
Contact:

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Postby bnwrx » Mon Dec 22, 2014 12:27 am

beteljuice wrote:The beteljuice totally cocked-up a simple temperature conversion (Affects those with a 'native' unit of F)

In curconditions.php look for:

Code: Select all

// now do Comfort Index text
// NB: $apptemp should be APPARENT temperature C
    $CI_text = ""; // Get Out Of Jail Free
    $_apptemp = decCom($apptemp);
    if($display['showComfort']){
        if($tempunitnodeg != "C") $_apptemp = round(($_apptemp *9 /2) +32); // ***** WRONG WRONG WRONG
The 'WRONG' line should be:

Code: Select all

        if($tempunitnodeg != "C") $_apptemp = round(($_apptemp -32) *5 /9);
There had to be an :oops: somewhere !!!



I made the change... and now I am "Uncomfortably Hot"......

I think there must be another issue....

User avatar
beteljuice
Posts: 2456
Joined: Tue Dec 09, 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Postby beteljuice » Mon Dec 22, 2014 12:32 am

I am seeing 'Uncomfortably Chilly'
<!-- temp: 32.5, apptemp: 27.6, temptrend: -1.4, tempunitnodeg: F -->
Which is correct.
Image
......................Imagine, what you will KNOW tomorrow !

bnwrx
Posts: 448
Joined: Wed Feb 25, 2009 12:01 am
Weather Station: Ambient WS2095 (Fine/Offset)
Operating System: Windows 10 64bit
Location: Woodland Park, Colorado USA
Contact:

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Postby bnwrx » Mon Dec 22, 2014 12:34 am

I took the chance and "converted" the "C" temps in the script to "F", and it seems to have adjusted me from "Hot" to "Cold"...

Her are my conversions:

I also changed the "Language" file....changed "Cold" and "Uncomfortably Cold"...to "Chilly" and "Uncomfortably Chilly"
You do not have the required permissions to view the files attached to this post.

bnwrx
Posts: 448
Joined: Wed Feb 25, 2009 12:01 am
Weather Station: Ambient WS2095 (Fine/Offset)
Operating System: Windows 10 64bit
Location: Woodland Park, Colorado USA
Contact:

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Postby bnwrx » Mon Dec 22, 2014 12:43 am

To save confusion...
I will revert to your corrected script now...(5:45mst)

You can see it still claims I am "Hot"....

User avatar
beteljuice
Posts: 2456
Joined: Tue Dec 09, 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Postby beteljuice » Mon Dec 22, 2014 12:48 am

Do not assume - that makes an Ass with U and ME.
This is rubbish whichever way round the conversion is:

Code: Select all

       if($tempunitnodeg != "C") $_apptemp = round(($_apptemp *9 /2) +32);
The 'factor' is wrong to start with !!!

You have simply crashed through the bit we need to check, then supplied converted values that shouldn't have to happen.

How are we supposed to debug if you change what you report ?
Image
......................Imagine, what you will KNOW tomorrow !

bnwrx
Posts: 448
Joined: Wed Feb 25, 2009 12:01 am
Weather Station: Ambient WS2095 (Fine/Offset)
Operating System: Windows 10 64bit
Location: Woodland Park, Colorado USA
Contact:

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Postby bnwrx » Mon Dec 22, 2014 12:53 am

beteljuice wrote:Do not assume - that makes an Ass with U and ME.
This is rubbish whichever way round the conversion is:

Code: Select all

       if($tempunitnodeg != "C") $_apptemp = round(($_apptemp *9 /2) +32);
The 'factor' is wrong to start with !!!

You have simply crashed through the bit we need to check, then supplied converted values that shouldn't have to happen.

How are we supposed to debug if you change what you report ?


My apologies....I appreciate all your efforts....

I will leave it as is now showing....

User avatar
beteljuice
Posts: 2456
Joined: Tue Dec 09, 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Postby beteljuice » Mon Dec 22, 2014 1:11 am

@bnwrx

I can see nothing obvious, can you please add this 'debug' line:

Code: Select all

// now do Comfort Index text
// NB: $apptemp should be APPARENT temperature C
    $CI_text = ""; // Get Out Of Jail Free
    $_apptemp = decCom($apptemp);
    if($display['showComfort']){
        if($tempunitnodeg != "C") $_apptemp = round(($_apptemp -32) *5 /9);
if($debug) echo "<!-- _apptemp: $_apptemp C -->\n";
I HAVE however discovered another problem with temp trend, where I applied a constant that I shouldn't - must have been a bad day for the beteljuice and temperatures ..

Code: Select all

    if($display['showTemp']){ // need to workout text for temp trend - figures are guess work !
        $_temptrend = decCom($temptrend);
        if($tempunitnodeg == "F") $_temptrend = ($_temptrend -32) / 9 * 5; // *** WRONG WRONG WRONG
        if($_temptrend >= -0.2 && $_temptrend <= 0.1) $ttrend = $langCurrWeather["Steady"];
'WRONG' line should be

Code: Select all

        if($tempunitnodeg == "F") $_temptrend = $_temptrend *5 /9;
Patience everone ....
Image
......................Imagine, what you will KNOW tomorrow !

bnwrx
Posts: 448
Joined: Wed Feb 25, 2009 12:01 am
Weather Station: Ambient WS2095 (Fine/Offset)
Operating System: Windows 10 64bit
Location: Woodland Park, Colorado USA
Contact:

Re: Cumulus ‘Current Conditions’ Alternative v3.0

Postby bnwrx » Mon Dec 22, 2014 1:22 am

I've made those changes....No change...

I must leave for a few hours.....


Return to “Web site - General”

Who is online

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