Page 37 of 41
Re: Cumulusutils
Posted: Sun 12 Apr 2020 9:03 am
by kocher
The file you want integrated in the base template is PHP and a lot of iframe. Of course you can link the file, but you cannot execute PHP directly from within. All PHP work is done on the server. Your file would need to be rewritten in javascript to be executed in the report area (with the LoadUtilsReport().
So, no PHP execution unless you fire up a php request and load the result in the report area.
It is the report area where userinfo is loaded (see the call down below).
Thank you very much Hans
I'll see what i can do
Re: Cumulusutils
Posted: Sun 12 Apr 2020 9:52 am
by kocher
I have managed to load the page I wanted, creating another html page with javascript code that "translates" the php code:
Code: Select all
<html><head>
<title>Review Website</title>
<script>function geturlvars()
{
var vars = window.location.href.slice(window.location.href.indexOf('?') + 1);
vars='http://kocher.es/cumulus-saratoga/div_wxstatus.php?'+vars;
return vars;
}</script>
</head>
<body bgcolor=#FFFFFF topmargin=0 bottommargin=0 leftmargin=0 rightmargin=0>
<script>document.write("<iframe border=0 FRAMEBORDER=0 scrolling=auto width=100% height=100% src='"+geturlvars()+"' name='topframe'></iframe>");</script>
</body>
</html>
It seems to work; This code, in principle, is able to load any page written in php:
http://kocher.es/cumulusMX/FWI/
http://kocher.es/cumulus-saratoga/div_wxstatus.html
The next wish is to get it to load on the same page as the call; that is, that it does not open a new page.
I'm not sure I'm doing a lot of nonsense

Re: Cumulusutils
Posted: Sun 12 Apr 2020 1:13 pm
by HansR
kocher wrote: ↑Sun 12 Apr 2020 9:52 am
I'm not sure I'm doing a lot of nonsense

Always good to practice.
But to be sure, that is something
I did already from the menu. I think that is a shorter route
If you can get me the actual php-code which does the led flashing, I'll see what I can do to mimic that.
Re: Cumulusutils
Posted: Sun 12 Apr 2020 1:55 pm
by laulau
Hi,
I'm also interested to have a status active page for my site.
@kocher: could you share the php code you're using to achieve that ?
Thanks
Re: Cumulusutils
Posted: Sun 12 Apr 2020 4:35 pm
by kocher
@Laulau
I'm also interested to have a status active page for my site.
@kocher: could you share the php code you're using to achieve that ?
Thanks
I'm going to make the code available to everyone today.
@Hans
If you can get me the actual php-code which does the led flashing, I'll see what I can do to mimic that.
As soon as I can I will provide it
Re: Cumulusutils
Posted: Sun 12 Apr 2020 6:02 pm
by kocher
The php page:
http://kocher.es/cumulus-saratoga/div_wxstatus.php
The page "translated into javasvript":
http://kocher.es/cumulus-saratoga/div_wxstatus.html
I attach the compressed files.
It consists of 6 files and 1 folder with 2 css files:
- div_wxstatus.php
- wxstatus-alarms.php
- wxstatus-iss.php
- wxstatus-records.php
- wxstatus-software.php
- div_wxstatus.html (the page that translates from php to javascript)
Note:
1)The first 2 files use Weatherdisplay data; I do not know if these same data can be obtained with Cumulus. Look at the code to check it
2)The file "wxstatus-records.php" works with a database; I think Laulau has the same as me
3)The file "wxstatus-software.php" must be edited to indicate those files that we are interested in monitoring so that in case of failure, the red light turns on
@
Hans
In the file "wxstatus-alarms.php" you can see what gif images are used and how they are programmed with conditions.
Re: Cumulusutils
Posted: Sun 12 Apr 2020 6:29 pm
by laulau
Merci

Re: Cumulusutils
Posted: Sun 12 Apr 2020 7:55 pm
by HansR
kocher wrote: ↑Sun 12 Apr 2020 6:02 pm
In the file "wxstatus-alarms.php" you can see what gif images are used and how they are programmed with conditions.
OK, Thnx, I'll see what I can do with it.
Re: Cumulusutils
Posted: Sun 12 Apr 2020 8:10 pm
by kocher
Pas de quoi 
Re: Cumulusutils
Posted: Sun 12 Apr 2020 10:34 pm
by Phil23
HansR wrote: ↑Sun 12 Apr 2020 8:49 am
@Phil: I really do not see what you are aiming at. Is it the cumulative rain you want a running average from?
Rather than try & put it into words & deal with the language barrier, I decided to just punch my numbers into Excel.
Then hopefully a picture is worth 1000 words.
The addition of the blue line below to the existing graph posted previously.
I think it's a good indication of what the past is like & how we are tracking.
Valuable for Primary Producers.
Cheers
Edit:- it's really good to see how 2020 is tracking below, particularly when looking at the long range forecast added at the end.
Capture.JPG
Capture2.JPG
Re: Cumulusutils
Posted: Mon 13 Apr 2020 5:05 am
by HansR
@Phil: Aha, get your point. But a horizontal line indicating the normal level of yearly rainfall would serve the same purpose wouldn't it?
Re: Cumulusutils
Posted: Mon 13 Apr 2020 8:16 am
by Phil23
Probably not quite,
Seasonal progress is important with the preparation for crops & their subsequent success.
The Summer/Winter crop planting largely follows that trend line.
Moist soft soil for the sowing phase, followed by good rain around the germination time then a slowing of the curve as it approaches harvest time.
That's basically what they dictate as a good season.
Edit;- Post inspired by discussions about winter crops that are being sown right now.
Re: Cumulusutils
Posted: Mon 13 Apr 2020 1:17 pm
by HansR
v3.0.4 is online
Location of all realtime / data generated by Cumulus is configurable to one location (the realtime were already, now the json data files are as well1).
Also the time should now be perfect all over the world for the station and for the viewer from anywhere. If you find a bug here (apart for some small anomaly's for timezones which are aberration with the TZ ) please let me know.
The cumulus graphs have been rewritten to accommodate for a variable location of the json files. Rewriting is always risky, let me know if you find problems.
Re: Cumulusutils
Posted: Mon 13 Apr 2020 7:17 pm
by meteosangonera
Hi,
I don't know if it's normal, but I updated yesterday to version 3.0.3 from version 2.4.6, and today I've updated to version 3.0.4 and several things have stopped working on my web:
The map of people using pwsFWI.
http://www.meteosangonera.es/mapafwi/
The graphs.
http://www.meteosangonera.es/graficasclimaticas/
The wind route on the records page.
http://www.meteosangonera.es/estaciones/#3101-tab-10
Everything else works as before
I probably forgot to make any changes when I updated.

Re: Cumulusutils
Posted: Mon 13 Apr 2020 7:19 pm
by HansR
OK, version 3.0.4 seems to have a problem, if I look at PaulMy's installation.
I debugged it from where I am and noticed the running of cumuluscharts has nested Ajax calls:
1) the main code is loading and
2) from within that code the config needs to be loaded.
As those calls are made Asynchrone, you can't make a call if the main code has not finished loading. I had those calls already separated and it worked on my machine. But if either the machine or the internet is slow, you might get a longer waiting time. To put it short: it's about timing. Well, won't go deeper to explain but this requires some workaround. And another beta

. Sorry for this, did not see this one coming.
If you did not yet install , skip this one.