Page 9 of 12

Re: Davis 'Live' Console for Cumulus Websites Ver CU2.4.1

Posted: Fri 20 Jan 2017 12:07 pm
by ConligWX
dazza1223 wrote:YH THAT WHAT I WAS THINKING AS WELL BUT I DINT BUT ALL THE FILS IN CAPS IT JUST BEEN COPYED
looking at the davconvpCU.php shows the code for "Forecast Icon"

if it cannot get the correct icon it then displays "grid.png"

Code: Select all

file_put_contents( "./davconfcst.txt" , $DC_fcsttmp , FILE_APPEND); // write un-matched forecast to davconfcst.txt
$fcsticon = "grid.png";

Re: Davis 'Live' Console for Cumulus Websites Ver CU2.4.1

Posted: Fri 20 Jan 2017 12:19 pm
by dazza1223
SO HOW TO GET THE ICON THEN I DID READ ABOUT IT BEFOR?

Re: Davis 'Live' Console for Cumulus Websites Ver CU2.4.1

Posted: Fri 20 Jan 2017 1:00 pm
by ConligWX
dazza1223 wrote:SO HOW TO GET THE ICON THEN I DID READ ABOUT IT BEFOR?
for some unknown reason davcon is not programmed for your forecast string.

Yours says "Settled Fine" which is not part of this:

Code: Select all

// Forecast Icon
function get_fcsticon($forecast) {
// Determine forecast icon from Davis forecast string $forecast
$DC_fcsttmp = "DC_{$forecast}";  // Station forecast string
// echo '<br />';
// echo $DC_fcsttmp;
// echo '<br />';
// echo $forecast;
// !!! DO NOT CHANGE ANY OF THESE STRING TESTS !!!
// !!! TESTS and ORDER CRITICAL !!!
if (
   preg_match('/Mostly clear/i',                        $DC_fcsttmp) )    // mclr.png
      {$fcsticon = "mclr.png";} else if (
   preg_match('/increasing clouds and warmer/i',        $DC_fcsttmp) ||   // pcld.png
   preg_match('/warmer. Precipitation possible within 24/i', $DC_fcsttmp) ||   // pcld.png
   preg_match('/Increasing clouds with/i',              $DC_fcsttmp) ||   // pcld.png
   preg_match('/Partly cloudy/i',                       $DC_fcsttmp) )    // pcld.png
      {$fcsticon = "pcld.png";} else if (
   preg_match('/cooler. precipitation possible within 12/i', $DC_fcsttmp) ||   // rain.png
   preg_match('/cooler. Precipitation likely. Windy/i', $DC_fcsttmp) )    // rain.png
      {$fcsticon = "rain.png";} else if (
   preg_match('/Precipitation ending within 6/i',       $DC_fcsttmp) ||   // mcld.png
   preg_match('/clearing, cooler and windy/i',          $DC_fcsttmp) ||   // mcld.png
   preg_match('/mostly cloudy and cooler/i',            $DC_fcsttmp) ||   // mcld.png
   preg_match('/Mostly cloudy with/i',                  $DC_fcsttmp) ||   // mcld.png
   preg_match('/change. possible wind shift/i',         $DC_fcsttmp) ||   // mcld.png
   preg_match('/likely/i',                              $DC_fcsttmp) ||   // mcld.png
   preg_match('/change. precipitation possible within 24/i', $DC_fcsttmp) ||   // mcld.png
   preg_match('/Precipitation likely possibly/i',       $DC_fcsttmp) ||   // mcld.png
   preg_match('/Precipitation possible within 24/i',    $DC_fcsttmp) ||   // mcld.png
   preg_match('/Precipitation possible within 48/i',    $DC_fcsttmp) ||   // mcld.png
   preg_match('/Unsettled/i',                           $DC_fcsttmp) )    // mcld.png
      {$fcsticon = "mcld.png";} else if (
   preg_match('/precipitation continuing/i',            $DC_fcsttmp) ||   // rain.png
   preg_match('/windy within 6/i',                      $DC_fcsttmp) ||   // rain.png
   preg_match('/possible within 12/i',                  $DC_fcsttmp) ||   // rain.png
   preg_match('/possible within 6/i',                   $DC_fcsttmp) ||   // rain.png
   preg_match('/ending in/i',                           $DC_fcsttmp) ||   // rain.png
   preg_match('/ending within 12/i',                    $DC_fcsttmp) )    // rain.png
      {$fcsticon = "rain.png";} else if (
   preg_match('/Partialy cloudy, Rain possible/i',      $DC_fcsttmp) )    // pcldrain.png
      {$fcsticon = "pcldrain.png";} else if (
   preg_match('/Mostly cloudy, Rain possible/i',        $DC_fcsttmp) )    // mcldrain.png
      {$fcsticon = "mcldrain.png";} else if (
   preg_match('/Partialy cloudy, Snow/i',               $DC_fcsttmp) )    // pcldsnow.png
      {$fcsticon = "pcldsnow.png";} else if (
   preg_match('/Mostly cloudy, Snow/i',                 $DC_fcsttmp) )    // pcldsnow.png
      {$fcsticon = "mcldsnow.png";} else if (
   preg_match('/Rain and/i',                            $DC_fcsttmp) )    // rainsnow.png
      {$fcsticon = "rainsnow.png";} else if (
   preg_match('/Clear/i',                               $DC_fcsttmp) ||   // mclr.png  - LaCrosse & Oregon Scientific
   preg_match('/Sunny/i',                               $DC_fcsttmp) )    // mclr.png  - LaCrosse & Oregon Scientific
      {$fcsticon = "mclr.png";} else if (
   preg_match('/Cloudy/i',                              $DC_fcsttmp) )    // mcld.png  - LaCrosse & Oregon Scientific
      {$fcsticon = "mcld.png";} else if (
   preg_match('/Rain/i',                                $DC_fcsttmp) )    // rain.png  - LaCrosse & Oregon Scientific
      {$fcsticon = "rain.png";} else if (
   preg_match('/Snow/i',                                $DC_fcsttmp) )    // snow.png  - LaCrosse & Oregon Scientific
      {$fcsticon = "snow.png";} else if (
   preg_match('/FORECAST/i',                            $DC_fcsttmp) )    // FORECAST REQUIRES 3 HOURS OF RECENT DATA
      {$fcsticon = "grid.png";} else {            // forecast not found !!
   $DC_fcsttmp = "$DC_fcsttmp|grid.png|\n";
file_put_contents( "./davconfcst.txt" , $DC_fcsttmp , FILE_APPEND); // write un-matched forecast to davconfcst.txt
$fcsticon = "grid.png";
}
return $fcsticon;
}

Re: Davis 'Live' Console for Cumulus Websites Ver CU2.4.1

Posted: Fri 20 Jan 2017 1:01 pm
by ConligWX
What firmware is your Console using?

@BCJKiwi

Perhaps we need to add "Settled Fine" to the config?

Re: Davis 'Live' Console for Cumulus Websites Ver CU2.4.1

Posted: Fri 20 Jan 2017 1:17 pm
by dazza1223
i think it 4.18 mate

Re: Davis 'Live' Console for Cumulus Websites Ver CU2.4.1

Posted: Fri 20 Jan 2017 2:18 pm
by Mapantz
It's maybe because he has the 'Use Cumulus Forecast' checked in the settings?

Re: Davis 'Live' Console for Cumulus Websites Ver CU2.4.1

Posted: Fri 20 Jan 2017 2:28 pm
by dazza1223
i will check that thank u Mapantz

Re: Davis 'Live' Console for Cumulus Websites Ver CU2.4.1

Posted: Fri 20 Jan 2017 2:42 pm
by dazza1223
omg i truned it off and bang it working Mapantz

http://www.davisworthing.co.uk/davconvp2CU.php

Re: Davis 'Live' Console for Cumulus Websites Ver CU2.4.1

Posted: Fri 20 Jan 2017 7:59 pm
by BCJKiwi
Toxic17, Mapantz, Thanks for assisting Dazza while I was asleep. The time difference makes it difficult for me to assist in a more timely manner.

Have made ADDITIONAL notes in the HowTo file for the next release ( when/if ever - that happens ) regarding the forecast issues to hopefully ensure the weather software forecast setting instruction is not missed.

Re: Davis 'Live' Console for Cumulus Websites Ver CU2.4.1

Posted: Fri 20 Jan 2017 10:28 pm
by dazza1223
just want to say a big big thank to all on here for all the help!!!!!


ps can some one help me with one over thig plz?

Re: Davis 'Live' Console for Cumulus Websites Ver CU2.4.1

Posted: Fri 20 Jan 2017 10:47 pm
by BCJKiwi
Quite possibly but what is it?
See the graphs are not working now - they were some time ago.
WoW!! now they are showing!

Re: Davis 'Live' Console for Cumulus Websites Ver CU2.4.1

Posted: Fri 20 Jan 2017 10:50 pm
by dazza1223
wood u mind if u add my menu in the page as every time i do it it giveing me a error


look http://www.davisworthing.co.uk/davconvp2CU.php


and i want it like this http://www.davisworthing.co.uk/

as i not very good with php

Re: Davis 'Live' Console for Cumulus Websites Ver CU2.4.1

Posted: Fri 20 Jan 2017 10:51 pm
by dazza1223
and that why graphsnot working as im try to add the menu in to it

Re: Davis 'Live' Console for Cumulus Websites Ver CU2.4.1

Posted: Fri 20 Jan 2017 11:12 pm
by BCJKiwi
Not 100% sure what you mean.
The ones that are working are;
http://www.davisworthing.co.uk/vp2.php
and
http://www.davisworthing.co.uk/davconvp2CU.php

The vue menu item is
http://www.davisworthing.co.uk/vue.php
which does not work. Neither does http://www.davisworthing.co.uk/davconvueCU.php

If you want a Vue to display instead of (or as well as the vp2) then the HowTo file advises:-
There is one main script and vp2 and Vue include scripts for each screen layout;
davconvp2CU.php is the main script - may be copied/renamed to davconvueCU.php
The include files are named;
davconvp2CU-inc.php for the Davis VP2, VPro2 and VPro2 Plus consoles
davconvueCU-inc.php for the Davis Vue console

The same data is used for either vp2 or Vue and the supplied davconvp2CU.php
handles either display by setting the $console variable which then uses the
associated include file to handle the differences between each console type.
The options are;
if using both, make a copy davconvp2CU.php and rename the copy
davconvueCU.php and use both -inc files.
if only using the vp2 console, use the vp2CU.php and the vp2CU-inc.php files.
if only using the vue console, rename the davconvp2CU.php to davconvueCU.php
and use the vueCU and the vueCU-inc files.
(There is an alternate package for users of the Saratoga template based
website scripts utilising davconvp2CW.php and include files)
See the INSTALLATION section below for further details.

All other files / folders in this package are common to both vp2 and vue scripts
and your menu needs to call:-
http://www.davisworthing.co.uk/davconvp2CU.php
and/or
http://www.davisworthing.co.uk/davconvueCU.php

So it would seem that after you have set updavconvueCU.php you then need to make http://www.davisworthing.co.uk/vue.php call davconvueCU.php

Re: Davis 'Live' Console for Cumulus Websites Ver CU2.4.1

Posted: Fri 20 Jan 2017 11:14 pm
by dazza1223
ok two min i will show u what i mean