I’ve seen a folder on my hosting EwnWxsim that I understand is a Wxsim prediction in a format similar to Ewn. However, I can’t get it to work. I’ve tried to contact the developer but it hasn’t been possible
They have helped me from the beginning in setting up the website. It is likely that this person put the folder there, I cannot say for sure.
I have downloaded the zip that they indicated and now I have to configure it. I don’t know if I will be able to do it alone, since I am short on knowledge.
For now the only thing I have done is configure these three lines in config.php
wret.exe is another WxSim application to look at old forecasts and it can probably produce wret.jpg. wret isn’t run by default but I think you’ll need to run it to generate the JPG file and then upload the image.
Your first problem to solve: Your lastret.txt file has no data at the hour
This script only accepts data at the full hour11:00 12:00 as.o.
You have to set your WXSIM so that it generates the data on the hour and not 2 minutes after.
You can then ask questions on this forum.
But these scripts are complex, so find “local” same language help if you get stuck.
WXSIM - Retrieved Data for San Juan de Aznal. 37,36 6,03 82 Dec 7 2024 11:02a (local standard time)
Dec 7 ---------------------------------------------------------------------------------------
Saturday
TIME WEATHER AIR DEW WET WCF 850T W.DIR VST W.SP %RH S.IR WDIR THK TSCD DATE/TIME
11:02a CLEAR HEAVY DEW 55,6 51,9 53,6 55,6 50,1 360 92 1 88 317 N 5606 0 2024-12-07_10:02_UTC
No shower or thunderstorm activity expected...............................................
11:32a CLEAR HEAVY DEW 57,4 52,8 54,8 57,4 51,2 360 91 1 84 365 N 5612 0 2024-12-07_10:32_UTC
12:02p CLEAR MOD. DEW 59,5 53,3 56,0 59,5 52,4 360 90 1 80 401 N 5620 0 2024-12-07_11:02_UTC
12:32p SUNNY 61,9 53,6 57,1 61,9 53,7 360 90 2 74 422 N 5628 0 2024-12-07_11:32_UTC
1:02p SUNNY 63,8 53,7 57,9 63,8 55,0 360 89 2 70 430 N 5635 0 2024-12-07_12:02_UTC
1:32p M.SUNNY 65,4 53,7 58,6 65,4 54,9 360 88 3 66 424 N 5635 0 2024-12-07_12:32_UTC
<b>Fatal error</b>: Uncaught Error: Call to undefined function mb_detect_encoding() in /var/www/html/wxsim-ewn/wxsim/frc.php:254
Stack trace:
#0 /var/www/html/wxsim-ewn/wxsim/frc.php(47): html2utf8()
#1 /var/www/html/wxsim-ewn/wxsim/config.php(292): include('...')
#2 /var/www/html/wxsim-ewn/forecast.php(6): include('...')
#3 /var/www/html/wxsim-ewn/_test.php(5): include('...')
#4 {main}
thrown in <b>/var/www/html/wxsim-ewn/wxsim/frc.php</b> on line <b>254</b><br />
You have to contact your hosting provider as you are missing mb_detect_encoding which is a PHP-unctionality.
or
You could comment that line for now 254 in wxsim-ewn/wxsim/frc.php It now reads if(mb_detect_encoding($name, 'UTF-8', true)){$name=utf8_decode($name);}
change it to # if(mb_detect_encoding($name, 'UTF-8', true)){$name=utf8_decode($name);}
Hello again Wim, I know that it can be frustrating to help people with little knowledge, I understand.
In my language there are no forums where this configuration can be discussed, it’s a shame.
I have indeed noticed that the configuration of the wxsim output file always gives me 2 minutes after the time. I don’t think I have modified any wxsim option for this to happen. The execution of wxsimate is 10 minutes after the time and 15 minutes in the case of wxsim.
I think I have fixed the mb_detect_encoding error with sudo apt-get install php8.4-mbstring since the web runs under a VPS with Ubuntu Server. However, now other errors are generated.
I have configured wret. as the screen you attached.
If you have patience with me I think we will succeed.
<b>Deprecated</b>: Function utf8_decode() is deprecated since 8.2, visit the php.net documentation for various alternatives in <b>/var/www/html/wxsim-ewn/wxsim/frc.php</b> on line <b>254</b><br />
Those other messages are not errors. Of no importance now, just a message for the script author to adept the php code to remain compatible.
Please post a new topic with the heading
“How to set WXSIM to generate the data at a full hour”
Probably someone will tell you which setting to adept in wxsim.
Otherwise ask the author of wxsim. You paid good money for that product and I am sure the author can help you.
As soon as the data is correct and available we can make the HENKKA scripts run OK.
Step 1: The settings in config.php should be changed to
$path_to_langfiles = "./wxsim/lang/";
$path_to_lastret = "../lastret.txt"; # need to check this one later
$path_to_dataphp = "./wxsim/";
I’ve just looked through the settings and don’t see anything that can adjust the output times. I’ve only ever known them to be on the hour, or at 30 minute intervals (on the hour and 30 minutes past the hour) if you have that option selected.
Fatal error: Uncaught ValueError: max(): Argument #1 ($value) must contain at least one element in /var/www/html/wxsim-ewn/wxsim/data.php:218
Stack trace:
#0 /var/www/html/wxsim-ewn/wxsim/data.php(218): max()
#1 /var/www/html/wxsim-ewn/wxsim/data.php(184): getdaily()
#2 /var/www/html/wxsim-ewn/wxsim/_test.php(5): include('...')
#3 {main} thrown in /var/www/html/wxsim-ewn/wxsim/data.php on line 218
EDIT Dec 8 - 11:30 UTC removed fake error
I will copy your data files and see if I can find a cause for this.
Well, all those errors may have a cause, yesterday I was messing around with the configuration of WXSIM and WXSIMATE to see if I could set the hour to the hour as you indicated. I discovered that when I set the option to import data from weather display wxsimate indicated “effective time” at the hour.
Paradoxically this morning wxsimate had generated an exception error, it does this occasionally when working with the WD database. That is why I had to re-set it with the Weatherlink database with which it never fails.
I recently downloaded the script from the link you indicated. I just copied and ran the script and modified config.php to
$path_to_lastret = “/var/www/html/lastret.txt”;
Although I understand that as it was by default it was also correct.
The problem is that I have to solve the time issue. I’ve seen something on the forum that might help me
I’d like to keep trying, I have other WXSIM predictions as you mentioned, but I like EWN’s style.
Yes, because you have uploaded the latest version.
The :02 minutes are replaced by a modification I inserted in the latest version you downloaded.
Line 21-22 in wxsim/data.php removes the most common minutes around the full-hour with a :00 value
So it will work without much problems, just the PHP 8.x notices/warnings
I attach two updated scripts to remove those notices and warnings.
Make a copy of the two scripts in the wxsim folder and replace them with the new versions. move_to_wxsim-ewn-wxsim_folder2024-12-08.zip (11.8 KB)
Indeed, the error is no longer generated. Apart from having uploaded the latest version, I suspect that the correct path to lastret is now also indicated, I’m not sure that it was correctly indicated before.
The next step is the translation. In the root I have plaintext-parser-lang-es.txt so I think the correct thing would be in config.php
$path_to_langfiles = “/var/www/html”;
I’m not sure that by including it in the template saratoga will do the translation.
Jumm, strange, I copied plaintext-parser-lang-es.txt as is and errors are generated in that instruction, however the test works fine with other languages. The lines in my file say:
lang|Hot|Calor|
lang|Very hot|Mucho calor
lang|Cloudy in the morning|Nuboso por la mañana|
And in the other language files langlookup instead of lang.
Could that be why? It would be strange since it works in other predictions on my website.