× Benvenuti sul nostro forum su Sint Wind PI!

Postate qui domande o segnalate problemi / bug che riscontrate,

file Grafici WUG

Di più
5 Anni 7 Mesi fa #8298 da amonphi
Grafici WUG è stato creato da amonphi
Buongiorno ragazzi e admin,

ho una PCE collegata ad un raspi con chiavetta DVB-T e sensore BME280, in tutto prefettamente settato con la parte server (dopo essermi letto quasi tutti i post del forum), ora vorrei implementare WUG ma non riesco proprio ad uscirne...

Ho seguito la guida qui pocasi.hovnet.cz/wxwug.php?lang=en (anche se il download non funziona ho reperito comunque la v1.8.0 in un post qui nel forum, non vorrei fosse quella che ha qualche problema, anche perché la cache è piena di dati), ma al punto 4 dell'installazione dove dice di settare il tutto aprendo www.yoursite.com/wxwugraphs/configurator.php mi appare sempre pagina bianca e non capisco il perché, ho anche già abilitato "server to server" da altervista ma non è stato inutile.

Allora ho modificato manualmente con notepad++ il file "WUG-settings.php", ecco i settaggi che ho cambiato (anche se poche cose):

## STATION NAME
// This text will be displayed under the name of the chart.
// For a different name in another language, please fill in the name of the station in the language file.
$stationName = 'Meteopaparano'; // This can be also changed for each language in translation files.

## Year, Month and day when the station started sending data
$sinceY = '2015'; // year format yyyy
$sinceM = '2'; // month without leading zero
$sinceD = '15'; // day without leading zero

### GRAPH DATA SOURCE ###
$dataSource = 'wunderground'; // 'mysql' - weather display mysql database ; 'wunderground' - wunderground server ; 'wutowdmysql' - combined WU->WD MySQL

# If is set $datasource to 'wutowdmysql' you must set start date when the station started sending data to WD MySQL database
$wdSinceY = '2010'; // year format yyyy
$wdSinceM = '09'; // month WITH leading zero if is nuber lower than 10
$wdSinceD = '01'; // day WITH leading zero if is nuber lower than 10

### MYSQL CONFIG for 'mysql' datasource ###
$dbhost = "localhost"; //your MySQL host name
$dbuser = "dbuser"; //your MySQL username
$dbpass = "dbpass"; //your MySQL password
$dbname = "dbname"; //your MySQL database name
$dbtable = "myTable"; //your MySQL table name
$datetime_col = 'no'; //Does your MySQL table have a datetime column? 'yes' 'no'
// Select units IN YOUR database
$db_wind = 'kmh'; //wind speed; 'kts', 'mph' or 'kmh'
$db_temp = 'C'; //temperature and dewpoint; 'C' or 'F'
$db_rain = 'mm'; //rainfall; 'mm' or 'inch'
$db_baro = 'hPa'; //barometer; 'hPa' or 'inHg'
$db_rate = 'inch'; //rain rate; 'mm' or 'inch'
// show indoor temperature
$db_i_temp = false;
// show UV radiation in Sun graphs
$db_suv = true;
## WD DATABASE PERFORMANCE v.s. GRAPH ACCURACY
# set graph data sampling intervals, larger number = less server CPU overloading
// month graphs - low CPU overload
$wdMonthLim = 15; //default 15 minutes; must be one from thiese values: 5, 10, 15, 20, 30 or 60
// year graphs - intensive CPU overload
$wdYearLim = 15; //default 15 minutes; must be one from thiese values: 5, 10, 15, 20, 30 or 60
## CACHING FOR 'mysql' DATASOURCE
// Dramatically improve performance in year and month graphs, so you can set $wdMonthLim and $wdYearLim to lower values
// CACHING TYPE
// Note: 'file' type using directory $WUcacheDir described in 'wunderground' Cache section (described few lines bellow)
$db_cache_type = 'file'; // 'file' or 'db' or 'disabled'
$db_cache_table = 'graphs_cache'; // if is $db_cache_type set to 'db' you must create table for caching of calculated values
// Example SQL command for creating cache table:
// CREATE TABLE `graphs_cache` (`id` VARCHAR(15) NOT NULL ,`last_access` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , `data` LONGTEXT NOT NULL ,PRIMARY KEY (`id`)) ENGINE = MYISAM;
$mysqlDMR = 20; // Cache refresh interval for Day/Month data in minutes
$mysqlYR = 12; // Cache refresh interval for Year data in hours

### HOUR GRAPHS ###
$hourGraphs = 'craw'; // 'craw' for data from clientrawhour.txt file or 'db' from MySQL database, or 'disabled'
$clientRawHpath = '../'; // absolute or relative path with slashes at end to directory where is stored clientrawhour.txt

#### THEME
$wugTheme = 'default'; // 'default' or 'dark'
$CustomBgTheme = 'transparent'; // false or true or 'transparent' - override background color value
$colorpickerBgVal = '#ffffff'; // hex background color val
$CustomFontTheme = false; // false or true - override font color value
$colorpickerFontVal = '#000000'; // hex font color

### WUNDERGROUND ID CONFIG for 'wunderground' datasource ###
$WUID = 'ILAZIOPA6'; // YOUR Wunderground station ID - you must use big letters (for testing KWIMAUST1 - more history with sun sensor - since 2005) default: 'YOURWUID'

### DATE/TIME ###
// Format: 'Europe/Prague', 'Etc/GMT+1', 'Etc/GMT-5' or 'CET' etc ...
// for possible values please visit www.php.net/manual/en/timezones.php
$TZconf = 'Europe/Rome'; // Your timezone
## DATE AND TIME FORMAT (in tooltips, titles, etc..)
$ddFormat = 0; // 0 = dd.mm.yyyy; 1 = mm.dd.yyyy; 2 = mm/dd/yyyy; 3 = d.m.yy; 4 = mm.dd.yy; 5 = mm/dd/yy
$hourFormat = 0; // 0 = 24 hours format; 1 = 12 hour format (am/pm)

## PASSWORD ###
$WUpassw = 'wugraphs'; // password for WUG-test.php, for removing cached files and for loading saved configuration before upgrade to new version.

### GRAPH SIZE ###
$wugWidth = '640'; // graph width in pixels (default: '640')
$wugHeight = '380'; // graph height in pixels (default: '380')

### Language / Translation ###
$defaultWUGlang = 'it'; // default language
$langSwitch = false; // show language switch

### Units and other settings ###
$metric = true; // true for metric units, false for imperial units
$windmu = 'km/h'; // 'm/s' or 'km/h' for metric units selection
$baroMinMax = true; // true or false - Disable minimum and maximum limits for barometric pressure graphs and informational bands/strips about intensity of pressure.
$showSolar = false; // if you don't have solar sensor, set this value to false (graph will be disabled/hidded in graph selection and tabs)
$wugWinW = '900'; //pixels; Default WIDTH of graph opened in a new window (default: '900' eq. for Netbooks or small notebooks/laptops)
$wugWinH = '350'; //pixels; Default HEIGHT of graph opened in a new window (default: '350' eq. for Netbooks with few toolbars in browser)
$cookieExp = 0.5; // 1 = 1 day; expiration time for cookies in day/month/year selection (default: 0.5)

### EXTRA GRAPHS/VALUES for month/year graphs recalculated from day WU cache files
# used only for 'wunderground' datasource
$calcMbaroAvg = true; // Calculate month/year average barometric pressure
$calcSolar = false; // Calculate month/year average solar radiation
$calcWindDir = true; // Calculate month/year average wind direction

### SPIKE DATA REMOVING for Day,Month,Year graphs
//Note: Spike data will be replaced with last 'non-spiked' value. Maximum for correction is 3 spiked values in row.
$removeSpikes = true; // true or false;
# SPIKED DATA TRESHOLDS
// Values for day spiked data corrector (must be in metric units - converted later in code)
// This is a max accepted change in measured values of the interval for DAY graphs (interval is usually 5 minutes + potential station data sending failure)
// Higher value mean a less sensitivity for spike corector.
$dsp = array('temp' => 1.4, 'baro' => 1.8, 'rain_rate' => 150, 'rain_total' => 35, 'humi' => 8);
// This is a max change in measured values of the interval (usually 1 day) for MONTH/YEAR graphs
// Higher value mean a less sensitivity for spike corector.
$mysp = array('temp' => 20, 'baro' => 10, 'humi' => 70);

### CACHING CONFIGURATION FOR 'wunderground' datasource ###
# Global cache control - for 'wunderground' datasource
$IcacheWUfiles = true; // enable global WU file caching (improve speed) true or false
// CACHE DIRECTORY MUST BE WRITABLE FOR PHP (most often chmod 777)
// ABSOLUTE path with slashes
$WUcacheDirI = 'auto'; // If you do not know the absolute path to your site, try set to 'auto' (cache directory will be in wxwugraphs) Default value: 'auto'

## PRECACHING - for 'wunderground' datasource
# create WU cache files for other days, when visitor browsing in graph pages
$Iprecache = false; // true = enabled; false = disabled
$pause = 120; //seconds; minimal value: 120; pause between creating next cache file
$maxPre = 2; // maximum precached years backward - default: 2; max: 5 years;

# Year Graph cache
// Cache disc space requirements: 1 year total max = +/-40kB
$tYearCache = true; // enable this year WU file caching - true or false (false = cache only outdated year when global chaching is enabled)
$tYearCacheT = 12; // HOURS. Cache time for "this year" file, then will be recreated (default: 12)

# Month Graph cache
// Cache disc space requirements: 1 month = 2~3KB ; 1 year total max = 0.3~0.5MB
$tMonthCache = true; // enable this month WU file caching - true or false (false = cache only outdated month when global chaching is enabled)
$tMonthCacheT = 12; // HOURS. Cache time for "this month" file, then will be recreated (default: 12)

# Day Graph cache
// Cache disc space requirements: 1 day (5 minutes recording intervals) = 28~35KB ; 1 year total max = 11~13MB
$todayCache = true; // enable today WU file caching - true or false (false = cache only outdated day when global chaching is enabled)
$todayCacheT = 20; // MINUTES. Cache time for today file, then will be recreated. (default: 20)

### REFRESH PAGE
/* Use 'force=1' URL parameter to refresh button?
Force parameter to recreate WU cache file.
Useful if you want to recreate any data every time it is clicked to Refresh the icon.
However, if wundergroud lost your data, a problem may arise. */
$refreshForced = false; //true for using force parameter in refresh button link

//$autoRefreshT = '15'; // graph auto refresh in minutes. If is used MySQL datasource without caching, is better use higher values (eg. 60) for lower CPU server usage.

### Credits text in Graph
$creditsEnabled = 'false'; // 'true' to show credits in graph (default: 'false' WITH quotation marks)
$credits = 'some site';
$creditsURL = ' www.somesite.com ';


### JS and CSS jQuery support
$jQueryFile = ' ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js '; // Custom path to jQuery libary (always needed)
$loadJQuery = true; // if you have own jQuery library, jQuery Tabs and jQuery Cookie loaded in Saratoga/CarterLake template (top.php), then you can (optionally) set this to false
$incTabsStyle = true; // if you set $loadJQuery to false, then you may want to use own default CSS style for jQuery tabs. In this case set to false.

### SPECIAL ###
// Enable tested/unstable functions/features
$testOn = false; // false to disable, true to enable

### Version auto checker
// to work correctly, caching must be enabled
$updateCheck = true; // if there is a new version, v. info on bottom of the page will be red.
$SendName = true; // send station name ($gSubtitle) with first update check for better support

## GRAPH APPEREANCE PROBLEMS ##
// Height correction in tabbed mode
$heightCorr = '20'; // pixels;(defaut value: '20')

### WITHOUT SARATOGA/CARTERLAKE TEMPLATES
/**
* THE EASY WAY IS USE ONLY WINDOW MODE. ie link to graphs will be www.yourwebsite.com/wxwugraphs/graphd1a.php
* Or ways like iframe method. But Mulilingual support is fuctional only in Saratoga CarterLate templates.
*
* If you want use other way, then read next text.
* These scripts are intended (especially wxwugraphs.php) for Saratoga/CarterLake webpage templates, but can be used relative easily in other sites using file wugraphs.php
* If is set $includeMode to false, then wugraphs.php is in STANDALONE MODE (header sended)
* If you want use include Mode, then consider modification of wugraphs.php and your page where wugraphs loaded.
* This means own JS and CSS loading in your html <header> section (include mode loads JS and CSS in <body> section)
* Other problems in include mode is possibility of PHP variable collisions!! So include mode is only for people who known PHP code.
*/
$standAlone = false; // true = use wugraphs.php (also you may need set $loadJQuery and $incTabsStyle to true); false = using wxwughraph.php for saratoga carterlake templates
$includeMode = false; // true = included by PHP include function (eg: include('wugraphs.php'); )

##### OTHER OR MALFUNCTION SETTINGS
$spline_graphs = false; // spline or line graph type; true (spline) = better look, but low accuracy and possible problems with gaps in graphs data.
$fopenOff = false; // Enable if you have allow_url_fopen = Off in PHP configuration. But you may have problems with units in graphs (Metric vs Imperial - may depend on your server location).
//Directory for used javascripts (jquery, higcharts, ui.datepicker, ui.core ...) in graphxx.php pages
$jsPath = './js/'; // with trailing slashes (default is './js/')
$cookieEnabled = true; // set to false if you have cookie MOD_SECURITY problems in WUG-test.php
$sendAgent = false; // If you have allow_url_fopen On in PHP configuration and still you have empty graphs or cache files
$no_mb = false; // disable MB string support - only if you get some MB errors in WUG-test.php
$debug = false; // if true, all notices and errors will be shown
##################################################################################
# end settings #
##################################################################################

ma quando vado ad aprire www.miosito.com/wxwugraphs/WUG-test.php ottengo di nuovo pagina pianca,
lo stesso se apro www.miosito.com/wugraphs.php ,
mentre se apro www.miosito.com/wxwugraphs/settings.php ottengo " Parse error: syntax error, unexpected ''transparent\'; ' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) in /membri/meteopaparano/wxwugraphs/settings.php on line 79" ,
se apro www.miosito.com/wxwugraphs.php ottengo " Fatal error: require_once(): Failed opening required 'Settings.php' (include_path='.:') in /membri/meteopaparano/wxwugraphs.php on line 24".

Qualcuno che è riuscito a configurare il tutto sa spiegarmi come uscirne per favore?

Grazie a tutti in anticipo e buon Week-end

Si prega Accedi a partecipare alla conversazione.

Di più
5 Anni 7 Mesi fa #8299 da tony
Risposta da tony al topic Grafici WUG
Mai avuto questo problema la configurazione Wuggraph e normalmente molto semplice.
Forse una incompatibilità con la tua versione php ?
Non so ...

Si prega Accedi a partecipare alla conversazione.

Di più
5 Anni 7 Mesi fa #8300 da amonphi
Risposta da amonphi al topic Grafici WUG
Ciao Tony, se nemmeno tu sai darmi una soluzione credo che non ho molto da fare allora... Ho allegato una foto per testare il PHP, magari può essere di aiuto per trovare il problema.
Allegati:

Si prega Accedi a partecipare alla conversazione.

Di più
5 Anni 7 Mesi fa #8301 da Ciaschini
Risposta da Ciaschini al topic Grafici WUG
Ciao, quando ho installato i grafici ho avuto qualche problemino anche io ma sono passati ormai più di 4 anni e non ricordo di preciso.
Magari per riuscirti ad aiutare potresti condividere il link completo della pagina perché quella che hai linkato non funzionante apre il sito "yoursite.com"

Si prega Accedi a partecipare alla conversazione.

Tempo creazione pagina: 0.906 secondi