Indeed, the scripts were adapted to run in a div, but it is easier to use them in an iframe.
But then we have to add the time-zone also to the settings.
You see now why it is impossible to give support if you do not supply the link.
In your first post I quoted above, you refer to “weReports1part.php”
Now you say it is the history script.
The decimals are re-added for all periods. xxxx,1 hPa and xx,12 for inHg.
Just check if it will fit in the width as the period display has a lot of columns.
No decimals:
During the first months of the new WU-database the retrieved data had no decimals.
Later on WU added an extra URL-param to get the original data as uploaded.
Some periods will therefor show xxxx.0 hPa
This works and the display looks fine on my station using both Chrome and Edge browsers on Windows 10 and also with Safari 14.0 on my MacBook Pro. Thank you!
I wonder if this would be a good time to ask for a feature… Or should I ask this in the other thread? It would be nice for the wuhistory and wureports scripts to have the option of defaulting to English units for those of us on this other side of the Atlantic. As it is right now, the wureports doesn’t even offer unit conversion (unless I’m missing something).
Thanks again for all your work on these, Wim. Have a nice weekend!
Please check the start-scripts.
I think it is more then enough customising: 2 temps, 3 baros, 4 wind, 2 rain units to choose from.
You already changed lines 11-13, all other customising starts at line 17
Wim
#-----------------------------------------------
# HERE YOU NEED TO MAKE SOME CHANGES
#-----------------------------------------------
$wustart = '20-08-2016'; // Important the format is: dd-mm-YYYY for your first day of uploading data to WU. !
$wuid = 'KORCANNO14'; // your WU station name
$WUdatastr = 'https://armon.com/pwsWD/PWS_DailyHistory.php';
#
if ($wustart == '31-05-2029') { die( '<h3 style="color: red;">You should adapt lines 11, 12 and 13 before this script can run</h3>');}
#
$latitude = '50'; // for the seasons: a positive number for north of the equator, or a negative number for south
# temp values: ='°C', ='°F'
$uomTemp = '°C';
#$uomTemp = '°F';
# baro values: =' hPa' ' mb' ' inHg'
$uomBaro = ' hPa';
#$uomBaro = ' mb';
#$uomBaro = ' inHg';
# windspeed values: ' km/h' ' kts' ' m/s' ' mph'
$uomWind = ' km/h';
#$uomWind = ' kts';
#$uomWind = ' m/s';
#$uomWind = ' mph';
# rain values: ' mm' ' in'
$uomRain = ' mm';
#$uomRain = ' in';
# wind run values: ' km' ' mi'
$uomWrun = ' km';
#$uomWrun = ' mi';
#
$dateLongFormat = 'l d F Y';
#
# Be carefull changing the following settings
#
$pagewidth = '100%';
#
$includeHTML = true; // <head><body><css><scripts> are loaded, if set to false include the CSS also
#
$lang = 'en'; // your language. If no language file is found 'en' is used
$wsreportsDir = './'; // folder where the report scripts are located, leave as is if you are running this script from the same folder
$charset = 'UTF-8'; // 'ISO-8859-1' 'UTF-8'
I see an error_log in the wuhistory folder. It contains several lines (all basically the same, different time) as below:
[06-Nov-2020 11:47:43 America/Chicago] PHP Warning: Division by zero in /wuhistory/WU-History4.php on line 753
This seems to be related to the solar sensor, but I’ve double-checked the “startWUhistory.php” file and have set solar to false. I believe this is harmless, but thought I should report it. (Looking at the logs, this was also present with the previous version.)
New version to download in first message, removed this error and added setting to start the script in english or metric http://discourse.weather-watch.com/p/540880
The two php-scripts are changed ! Both should be replaced.
Succes, Wim
@ALL If running a “production” website, one should not set error-reporting on in the php.ini.
Even the smallest PHP-update can flood your error-log with identical errors when f.i. large arrays are processed, such as WU-files.
And most data we process is in arrays with loops to process them.
If you run into problems and want to see the php-errors and save them in your log, you can switch the error-reporting on with
using _test.php instead of index.php to start the dashboard
I only downloaded history and reports for the first time today (they are on the Menu), and I am still running the old WXDailyHistory.php on my 1907 dashboard.
I have read through this topic and made alterations as necessary for decimal places, but I may have missed something important. If so, I apologise. I just want to ask:
But not UK english, with wind in mph and everything else metric?
Also, I chose $color = ‘blue’; but I still get green. . .??
How about adding one more table as another weather parameter in reports with average temperature per day, month or year that are also included in WU data?
This could be an interesting extension to the script. There are some countries where meteorologists use a non-calendar based definition for the seasons based on the average daily temperatures, eg. spring begins when the daily averaged temperature permanently rises above 0 °C.
=D> Thanks, after so many years, this stupid typing error is found.
Please make a copy of wureports/wsReports1part.php first.
change line 350 and line 372 from
$windInc = 20;
to
$windInc = 2;
If that makes to much red colours set it at 4;
Have pleasant and quit NewYears eve, best wishes for 2021.
I have already noticed it, I don’t know why but in the last days of 2020 I have data gaps in table reports. However, from the beginning of 2021 the data updating from WU has again returned. Do I only have such a case or is there a bug somewhere to fix? http://pogodaslesin.beep.pl/pogoda/index.php?frame=Reports_at_WU