Page 1 of 1
Possible error in CumulusMX 4.3.1 b4064
Posted: Thu 12 Dec 2024 4:22 pm
by CarlosLSev
Hello, two days ago I updated CumulusMX from 4043 to 4064, in principle everything works but I have a script that has started to fail
I really don't know what the problem is
Using Third Party Upload Settings
in
Custom HTTP call - minutes interval
https://meteoviso.es/radsolar.php?radso ... sswd=xxxxx
Interval 1 minutes
This sends those parameters to my server to a file that my script uses
Since I updated it has been failing.
To rule out that it is something from CumulusMX, I tried to revert the installation to 4043, which seemed to work fine.
But I get error when starting.
I have copied all the files from 4043 on top of 4064.
Since it wasn't going, I restored the copy I made before 4064 and it works although the script continues to give an error.
My thought on going back to 4043 and seeing if the problem still occurs, Thanks
Re: Possible error in CumulusMX 4.3.1 b4064
Posted: Fri 13 Dec 2024 11:07 am
by mcrossley
I need to see the MXdiags log from when the HTTP Upload was/is failing to look at that.
MX v4.3.0 and above modifies the weather diary database. You cannot used the modified version with old versions of MX
To revert to version prior to v4.3 you have two options:
1. You DO NOT use the Weather Diary: Simply delete the /data/diary.db file. Old versions of MX will then run.
2. You DO use the Weather Diary: You will need to restore a copy of the /data/diary.db file from a time prior to upgrading to MX v4.3
Re: Possible error in CumulusMX 4.3.1 b4064
Posted: Fri 13 Dec 2024 11:20 am
by mcrossley
Wait! Your URL decoded string contains web tags. The HTTP utility has never supported web tags though?
Thinks- It would be a good idea if it did support them!
Re: Possible error in CumulusMX 4.3.1 b4064
Posted: Fri 13 Dec 2024 6:53 pm
by CarlosLSev
Hi max, let me continue investigating what the cause is. By the way, activate log ftp, the ftp.log file is created but without anything inside. I have created my website in a subfolder and in this the script works, it is updated with CumulusMX b4043 (I used a copy of the folder, copied the b4043 files over it and deleted diary.db and I run it from Windows, and it seems to work fine, on the other hand The normal website that is updated with CumulusMX b4064 from a Raspberry Pi said script works incorrectly Give me a few days and I'll try to figure out what's going on.
Re: Possible error in CumulusMX 4.3.1 b4064
Posted: Fri 13 Dec 2024 10:42 pm
by mcrossley
Another Ah! moment. We may be talking at cross purposes
I was erroneously thinking of the HTTP Files settings. You did say Custom HTTP
I'll take another look as well...
Re: Possible error in CumulusMX 4.3.1 b4064
Posted: Fri 13 Dec 2024 10:55 pm
by mcrossley
Can you confirm if the entry in the settings page is:
Code: Select all
https://meteoviso.es/radsolar.php?radsolar=<#SolarRad>&maxradsolar=<#CurrentSolarMax>&passwd=xxxxx
or
Code: Select all
https://meteoviso.es/radsolar.php?radsolar=%3C#SolarRad%3E&maxradsolar=%3C#CurrentSolarMax%3E&passwd=xxxxx
It may be just this web site that is URL encoding your text in the first post - it's always best to put it inside code tags.
Re: Possible error in CumulusMX 4.3.1 b4064
Posted: Fri 13 Dec 2024 11:03 pm
by mcrossley
My other thought is that SolarRad is now a nullable value. If you do not have a solar sensor connected, then in v4.3.1 it will now send a "-" rather than zero.
v4.3.2 will allow you to define what is returned for the "null" value of the web tag.
Re: Possible error in CumulusMX 4.3.1 b4064
Posted: Fri 13 Dec 2024 11:04 pm
by CarlosLSev
Code: Select all
http://www.meteoviso.es/radsolar.php?radsolar=<#SolarRad>&maxradsolar=<#CurrentSolarMax>&passwd=passwords
Re: Possible error in CumulusMX 4.3.1 b4064
Posted: Fri 13 Dec 2024 11:07 pm
by mcrossley
Not much use, you need to enclose the URL in the forum code tags (the </> button above ^^) when creating/editing a post.
Re: Possible error in CumulusMX 4.3.1 b4064
Posted: Sat 14 Dec 2024 2:32 am
by CarlosLSev
Let me do some checks today, I want to know if it is my problem or if b4064 has strange behavior. I'm going to test something today and I'll tell you, thank you.
Re: Possible error in CumulusMX 4.3.1 b4064
Posted: Sat 14 Dec 2024 9:46 am
by CarlosLSev
Hello, I have already been able to carry out the checks and the error, well my error in the script is that CumulusMX B4064 adds rweek in position 59 (rain last week) this has caused a mismatch.
File upload is successful, Custom HTTP
Custom HTTP call - minutes interval and the radsolar.php script was working fine. But my script was wrongly using the values
I had to go from
var ajaxtimeformat = realtime[1];
var percentage = realtime[59];
set_ajax_obs("ajaxporcen",porcen);
var rad1min = realtime[60];
set_ajax_obs("ajaxrad1min",rad1min);
var rad2min = realtime[61];
set_ajax_obs("ajaxrad2min",rad2min);
var percentage10m = realtime[62];
set_ajax_obs("ajaxporcen10m",porcen10m);
var percentage1h = realtime[63];
set_ajax_obs("ajaxporcen1h",porcen1h);
to
var ajaxtimeformat = realtime[1];
var percentage = realtime[60];
set_ajax_obs("ajaxporcen",porcen);
var rad1min = realtime[61];
set_ajax_obs("ajaxrad1min",rad1min);
var rad2min = realtime[62];
set_ajax_obs("ajaxrad2min",rad2min);
var percentage10m = realtime[63];
set_ajax_obs("ajaxporcen10m",porcen10m);
var percentage1h = realtime[64];
set_ajax_obs("ajaxporcen1h",porcen1h);
Sorry for the mistake and the time I may have lost you, it took me a long time to realize the new value in position 59 rweek rain. Thanks Mark
Everything is correct in CumulusMX b4064 and it was a mistake on my part, after this everything works fine again
Re: Possible error in CumulusMX 4.3.1 b4064
Posted: Sat 14 Dec 2024 11:05 am
by mcrossley
CarlosLSev wrote: ↑Sat 14 Dec 2024 9:46 am
Hello, I have already been able to carry out the checks and the error, well my error in the script is that CumulusMX B4064 adds rweek in position 59 (rain last week) this has caused a mismatch.
Err, rain week was added at the end of the realtime file (as all new fields are to avoid this type of problem), but that last field is now number 60 (indexing from 1, 59 if indexing from zero). I'm not sure where you are getting a realtime file from that has 63 fields. It isn't the MX generated one!
Re: Possible error in CumulusMX 4.3.1 b4064
Posted: Sat 14 Dec 2024 11:20 am
by CarlosLSev
It's part of my script, I add the 5 fields from logsolarpor.txt to realtime.txt I create a realtime.php and modify it in ajaxCUwx.js this line:
var realtimeFile = './realtime.txt';
for this other:
var realtimeFile = './realtime.php';
Content realtime.php
<?php echo file_get_contents('realtime.txt'),' ',file_get_contents('logsolarpor.txt'); ?>
In any case, CumulusMX works well when using new values from 59 onwards, when including new value it used rweek as part of those calculations giving incorrect values, after correcting it the script works well again Anyway, it's already solved, thanks. If you are curious, the script shows the icon and description in real time of the conditions of our station. If you would like to take a look at the original script at
https://forum.meteoclimatic.net/index.php?topic=3847.0