### davconCUmx_HowTo.txt ### FOR davconCUmx script ver MX/C1 2.2.4 - 15-March-2022 Davis Console VP2 (and VUE), CumulusMX php scripts. ################################################################################ Weather Website PHP Scripts from Silver Acorn These programs are distributed in the hope that they may be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. !!! There is NO guaranteed support !!! ################################################################################ These scripts deliver a 'Live' representation of the actual Davis Consoles for users of the Cumulus standard website system. These scripts 'close the loop' - the data from the console is processed by Cumulus, transmitted to the website, then reproduced as a representation of the console from which the data came. A working vp2 script may be viewed at https://silveracorn.nz/cumulusmx/ navigation bar item - Davis Live Consoles There are main scripts and include scripts for both vp2 and Vue davconvp2CUmx.php davconvueCUmx.php davconvp2CUmx-inc.php for the Davis VP2, VPro2 and VPro2 Plus consoles davconvueCUmx-inc.php for the Davis Vue console and a single data file for console graphs REQUIREMENTS; 1. Cumulus Standard Website system ( cumulus1 or cumulusMX ) NOTES regarding HTML5 At version 2.4.0, the package was upgraded to HTML5. Full testing has been undertaken and the revised .css and html have been passed through Wc3's validation. 2. Davis Vantage Vue, Pro, Pro2 or Plus (will also work with SOME other stations that deliver a forecast string else the forecast will be empty and a 'grid' (or 'hamburger') icon will display. - configured for LaCrosse and Oregon Scientific. Only a subset of the icons are available for these stations and the forecasts are very brief). NOTE:- For the console to display the Davis forecast icon, the Weather software must be configured to deliver the Davis forecast - NOT the CumulusMX software forecast. Failure to do this will always deliver a grid icon. 3. davconvp2CUmx.php (and/or davconvueCUmx.php) - placed in main scripts folder. davconvp2CUmx-inc.php (and/or davconvueCUmx-inc.php) - in main scripts folder. 4. ./davcon/ folder and all its files, jquery libraries, scripts and .css, jscroller2, fonts and graphics supplied in this application package. 5. davcon24MXT.txt - to generate davcon24.txt - supplies data for the 24 hr graphs and a few other data items 6. Current forecast and Icon matching requires forecast strings in English. There are translations of the titles, menu items below the console image and the text items on the image but not any of the button labels. these depend on available translations in the langlib folder library. See notes in the customisation section below for options. 7. DOES THE EMULATION MATCH THE PHYSICAL CONSOLE? The data on the image is the data provided by the weather software. There will be some differences in layout and presentation. To avoid a large number of button selection processes, the script adopts a rotation approach where a number of the displayed items 'rotate' between different data items. There are settings to manage this activity. CUSTOMISATION; Use a PROPER EDITOR - NOT windows notepad - suggest notepad++ if you don't already have one. Ensure encoding is set to UTF-8 without BOM The same source data is used for either VP2 or VUE console so either one (or both) may be used regardless of the station in use. We find the vp2 version works well on smart phones and tablets. All option changes are made in davconvp2CUmx.php (and/or davconvueCUmx.php). The option settings all include explanatory notes. 1. The units and Units of Measure legend displayed (kph/mph, deg C/F etc) will match the units set in CumulusMX 2. Check, and change as required, the settings from line 130 to line 138 to match the station configuration. The station number(s) may be configured, and the display of number and indicator may be turned on or off individually. The station number may be set at any of the 8 locations but to match the real VP2 console, they should be placed in the correct locations. The Vue console uses a different placement and terminology. This script uses the VP2 terminology for both VP2 and Vue. Set the station's number(s) at line 136 - refer to the script for details. Set the display of station number/indicator at lines 137 and 138. 3. To change the frequency of the rain data & dew roll-over and data refresh for all but graph and forecast data; At line 140, edit the 2 in $itimeout = 2; // default 2 = time between changes in seconds. This is the time between the rotating data exchanges in secs (compass pointer, wind speed/dir, dew, rain, ET/UV/Solar). Compass data changes at 'realtime'. We recommend $itimeout be set equal to (or some even divisor of) the 'realtime' update time to match the new realtime data updates. 4. There are two rotation items that can have their behaviour changed windrotate - Line 143; 1 = wind speed only or 2 = wind speed & wind direction in degrees dewrotate - Line 145; Options 1 through 8 as shown in the script 5. Time and Date display may be configured as 'metric' or 'US' timeformat - line 153; 1 = Force time display to 'metric' 24 hr format hh:mm 2 = Force time display to 'US' 12 hr format hh:mm am/pm dateformat - line 155; 1 = Force date display to 'metric' format dd/mm 2 = Force date display to 'US' format mm/dd 6. Below the image there are status messages indicating next update and realtime update times. The Next or Last Graph & Forecast update @ ~ hh:mm" message is configured at showupdate - line 157; 0 = Don't display message 1 = Display Next Graph and Forecast update @ ~ HH:mm 2 = Display Graph and Forecast Last updated @ HH:mm The Next or last "Realtime" update in ~ ss secs is configured at showage - line 161; 0 = Don't display message 1 = Display Next "Realtime" data in ~ ss secs (counts down to 0!) 2 = Display "Realtime" data updated ss secs ago zambretti - line 165; 0 = Use Station forecast - Note, only Davis stations fully supported! 1 = Use Cumulus MX (Zambretti) forecast 7. Graph data; This is provided by the file davcon24.txt and is loaded at tag file (interval) load time (set by Cumulus file uploading). While the file content changes at these upload intervals the graph represents 24 hrs at 1 hourly intervals. 8. Button options; a. The second column (or row) of buttons on the console and on the table below the image (Forecast/WXcen - Done) are set to call local pages. These may be changed at line 171 thru 188 - use the same syntax. Alternatively the local file name e.g. './gauges.php' may be replaced by a url e.g. 'http://silveracorn.nz/cumulus1' To change the description beside the button in the table; Edit the associated button text at line 173 thru 189. NOTE:- If the description is changed, then the ./langlib/xx.json language files should be changed to match. b. To make a button inactive; edit the $....btntxt = 'some text'; to $....btntxt = ''; NO SPACE! to remove the text next to the button. Both the table button and the associated console button will be disabled. This will leave the button in place with its legend but inactive. c. The buttons that can call scripts may be configured in various ways; taboption - line 192; 1 = Open Console Buttons in Console Tab & Table Buttons in New Tab 2 = Open Console buttons in New Tab & Table Buttons in Console Tab 3 = Open All Button Links in New Tabs 4 = Open All Button Links in Console Tab There is also a tooltip to indicate when a new tab will be used instead of the default web browser behaviour. This may be configured at showtooltip - line 196; true = display 'NewTab' tooltip when using $taboption 1, 2 or 3 false = DON'T display 'NewTab' tooltip when using $taboption 1, 2 or 3 NOTE:- the tool tip is not fully supported by IE10 but is in IE8, 9, 11 and Edge as well as the current versions of FF and Chrome. For IE10 the buttons work as intended but the tooltip does not display on the table buttons (but does on the console buttons - the code is quite different in these two areas) Charts / Trends /graphs - setting at line 176 The graphbtn file for CumulusMX differs from that for Cumulus 1 Edit the line if required - it may be set for CumulusMX. The graph button For CumulusMX:- = './charts.php'; The graph button For Cumulus 1:- = './trends.php'; 9. Translations Forecast text; The icon decoder relies on the original English text from the console DO NOT ALTER THIS SECTION! ALSO In cumulusMX, Settings, Forecast, Use cumulus forecast, ensure that the tick box next to "Use Cumulus forecast" is blank. NOTE:- For the console to display the Davis forecast icon, the Weather software must be configured to deliver the Davis forecast - NOT the weather software forecast. Failure to do this will always deliver a grid icon. Cumulus MX:- Settings Extra web files must be used to send the additional data file required. Note:- /httpdocs/ may be different for your website host - use what you use now, or, what website host advises. The settings required are; !! Check your website path details !! FILENAME REMOTE FILENAME PROCESS REALTIME Upload UTF8 BINARY END OF DAY C:\Cumulus\web\davcon24MXT.txt /httpdocs/mxtest/davcon24.txt tick notick tick tick notick notick Cumulus C1:- Internet Settings/ Files must be used to send the additional data file required. Note:- /httpdocs/ may be different for your website host - use what you use now, or, what website host advises. The extra file settings required are; ! Check your website path details ! LOCAL FILENAMES BINARY REMOTE FILENAMES PROCESS REALTIME Upload UTF8 C:\Cumulus\web\davcon24C1T.txt notick /httpdocs/mxtest/davcon24.txt tick notick tick tick Change the option in settings.php $show_davcon = 0; from 0 to 1, 2, 3 or 4. Once configuration is complete, Upload the new / changed files to the website including the updated settings.php Enjoy!