Page 2 of 10
Re: New Cumulus realtime console
Posted: Thu 13 Jan 2011 3:38 pm
by daj
bnwrx wrote:My server,which is GloHosting, won't upload a "folder" just files,
I think it must be a limitation of your FTP tool, rather than the server! What are you using?
Re: New Cumulus realtime console
Posted: Thu 13 Jan 2011 3:50 pm
by phtvs
bnwrx wrote:Thanks, that corrected the time issue..!
Now, about the icons. My server,which is GloHosting, won't upload a "folder" just files, which I did(the0.png and the1.png) so they are on the server. What must I do to get the script to load them? For now I am only trying to load the Day/Night icons, not the forecast icons. I went to the mentioned site but cannot find anything to download there, just a post with no attached file?
Thanks for your time !
Hi Bob,
Is it possible to manual make an folder at the server?
You can put the icons in the root of your server, but its not recommended to do that and you need to change the
console-config.php
To put the icons in the root of your server you need to change this lines in console-config.php
$daylighticon = "icons/2/".$isdaylight; //path to daylight icons
$icon = "icons/".$forecastnumber; // path to forecast icon set
change to:
$daylighticon = "/".$isdaylight; //path to daylight icons
$icon = "/".$forecastnumber; // path to forecast icon set
I use FileZilla for FTP program. Its free software and very good!
You can download FileZilla here:
http://filezilla-project.org/
The icons used for the forecast function can be downloaden at:
http://www.meteoduquebec.com/forum/view ... p?f=4&t=10
Maybe you need a registration at that forum before you can download. Site is in french but google translate can help you with that

Re: New Cumulus realtime console
Posted: Thu 13 Jan 2011 4:08 pm
by bnwrx
Theo, yes I had to register in order to download zip file. Thanks
Now I am still trying to upload the "Icon Folder", but no success yet. I can't figure out how to create a "Folder" on the server yet either. This is very frustrating to me, as I am not a wiz at computers, but I will keep trying!!
Re: New Cumulus realtime console
Posted: Thu 13 Jan 2011 4:15 pm
by daj
Bob, If you wish, PM me the file and I will upload, and then explain how I did it
(To create a new folder, use the "New Dir" button, top left of the FTP tool)
Re: New Cumulus realtime console
Posted: Thu 13 Jan 2011 4:16 pm
by phtvs
bnwrx wrote:Theo, yes I had to register in order to download zip file. Thanks
Now I am still trying to upload the "Icon Folder", but no success yet. I can't figure out how to create a "Folder" on the server yet either. This is very frustrating to me, as I am not a wiz at computers, but I will keep trying!!
Contact support (glohosting) is an option. I think that they can help you with the ftp problem.
The other option is to change the console-config.php.
If you can't do that, let me know, I will do that for you.
Re: New Cumulus realtime console
Posted: Thu 13 Jan 2011 4:18 pm
by daj
phtvs wrote:Contact support (glohosting) is an option. I think that they can help you with the ftp problem.
That's me

Re: New Cumulus realtime console
Posted: Thu 13 Jan 2011 4:20 pm
by Synewave
... and I had imagined there was whole team of support engineers wearing headsets!

Re: New Cumulus realtime console
Posted: Thu 13 Jan 2011 4:21 pm
by daj
I've got a headset if that helps with the illusion

Re: New Cumulus realtime console
Posted: Thu 13 Jan 2011 5:02 pm
by RayProudfoot
phtvs wrote:
I have attached a .zip file to my first post. You can unpack the file with winrar or unzip it with another zip unpacker!
Theo
Thanks Theo.
Neil, I appreciate a free unpackager is available but I never download rar files so it would only be needed for this one file. Thanks all the same.
Re: New Cumulus realtime console
Posted: Thu 13 Jan 2011 5:15 pm
by daj
Theo
I think there is a bug in the script.
I have been helping out Bob with uploading the icon set to his web space. He now has a folder named "icons" with all the necessary files. However, when I open the weatherconsole the icons do not show. If I look at the HTML code the script is producing you can see that the file names are wrong....
Code: Select all
<th nowrap><img src=icons/2/1.png.png alt="daylight-icon" width="90" height="90" border="0"></th>
<th colspan="2" nowrap><img src=console-banner.png alt="banner" width="550" height="90" border="0"></th>
<th width="252" nowrap><img src=icons/0.png.png alt="forecast-icon" width="90" height="90" border="0" align="middle"></th>
1.png.png and 0.png.png
I had a look at your PHP ..
Code: Select all
if ($forecastnumber = " "){
$icon = "icons/0.png";
}
if ($isdaylight = " "){
$daylighticon = "icons/2/1.png";
}
You can see you specifically add the '.png' at the end, however further down the PHP script (line 54 and 56) you also append the '.png' resulting in the wrong filename. (with a double .png)
I suspect if you change the first set of code (above) not to include '.png' it will work -- I have made the change for Bob and it works, but needs further testing
Re: New Cumulus realtime console
Posted: Thu 13 Jan 2011 5:27 pm
by phtvs
Hi David,
Correct. I made a mistake in the script. Thanks for reporting the bug!
The reason was that cumulus sometime dont add the forecast numbers to the realtime.txt.
So I changed the script the easy way and put that line in the script that makes the forecast icon show even if the forecast numbers are not in the realtime.txt file.
Dont know why cumulus sometimes forget the forecast numbers.
Same story for the isdaylight icons.
I have changed the script and updated the files in my first post.
Theo
Re: New Cumulus realtime console
Posted: Thu 13 Jan 2011 5:30 pm
by steve
phtvs wrote:The reason was that cumulus sometime dont add the forecast numbers to the realtime.txt.
Can you clarify what you mean? It must be putting something - zero?
Re: New Cumulus realtime console
Posted: Thu 13 Jan 2011 5:55 pm
by phtvs
steve wrote:phtvs wrote:The reason was that cumulus sometime dont add the forecast numbers to the realtime.txt.
Can you clarify what you mean? It must be putting something - zero?
Dont know what the problem is, but I have noticed that realtime.txt sometimes put a wrong value at the place of the forecast numbers.
Didnt noticed it before, but now that I use the realtime.txt for my script, (the icons are changing when the forecastnumbers are changing)
I noticed that sometimes there is an value out of the specified range. (field #49) Sometimes field 49 in realtime.txt is value "0c"
For the isdaylight field in realtime.txt (field #50) sometimes the field value is something else than 0 or 1. Noticed that the field has sometimes a value more than 1. Because my script is using this field to show a day/nightime icon, I have noticed the problem.
I dont know its a bug in cumulus, or just the problem that I want to read the realtime.txt file while its updated by cumulus at the same time.
Hope that you understand me. My English is not as good as my Dutch
Theo
Re: New Cumulus realtime console
Posted: Thu 13 Jan 2011 6:43 pm
by steve
phtvs wrote:just the problem that I want to read the realtime.txt file while its updated by cumulus at the same time.
I think it must be this, it's not really possible for the code to write the wrong format of values in there. And if it were, it would have caused problems with all the other software which uses realtime.txt and someone else would surely have noticed. Could you perhaps dump the contents of the file when your code detects a problem?
Is this on the PC, or on the web server? If on the web server, then you need to use the rename option, to avoid the possibility of the server having a partial file while it's being updated.
Re: New Cumulus realtime console
Posted: Thu 13 Jan 2011 7:14 pm
by phtvs
steve wrote:phtvs wrote:just the problem that I want to read the realtime.txt file while its updated by cumulus at the same time.
I think it must be this, it's not really possible for the code to write the wrong format of values in there. And if it were, it would have caused problems with all the other software which uses realtime.txt and someone else would surely have noticed. Could you perhaps dump the contents of the file when your code detects a problem?
Is this on the PC, or on the web server? If on the web server, then you need to use the rename option, to avoid the possibility of the server having a partial file while it's being updated.
Hi Steve,
The problem is on the server. Realtime.txt is updated very fast and reading from that file while cumulus is uploading it, its not so strange that it wont work correct. The apache error log on my server is showing the problem:
Code: Select all
[Thu Jan 13 16:25:19 2011] [error] [client xxxxx] File does not exist: /home/weer/domains/weerstation-lemmer.nl/public_html/cumulus/icons/0c.png, referer: http://www.weerstation-lemmer.nl/cumulus/weatherconsole.php
[Thu Jan 13 16:25:35 2011] [error] [client xxxxx] File does not exist: /home/weer/domains/weerstation-lemmer.nl/public_html/cumulus/icons/0c.png, referer: http://www.weerstation-lemmer.nl/cumulus/weatherconsole.php
[Thu Jan 13 16:25:50 2011] [error] [client xxxxx] File does not exist: /home/weer/domains/weerstation-lemmer.nl/public_html/cumulus/icons/0c.png, referer: http://www.weerstation-lemmer.nl/cumulus/weatherconsole.php
[Thu Jan 13 16:25:52 2011] [error] [client xxxxx] File does not exist: /home/weer/domains/weerstation-lemmer.nl/public_html/cumulus/icons/0c.png, referer: http://www.weerstation-lemmer.nl/cumulus/weatherconsole.php
[Thu Jan 13 16:26:07 2011] [error] [client xxxxx] File does not exist: /home/weer/domains/weerstation-lemmer.nl/public_html/cumulus/icons/0c.png, referer: http://www.weerstation-lemmer.nl/cumulus/weatherconsole.php
[Thu Jan 13 16:26:19 2011] [error] [client xxxxx] File does not exist: /home/weer/domains/weerstation-lemmer.nl/public_html/cumulus/icons/0c.png, referer: http://www.weerstation-lemmer.nl/cumulus/weatherconsole.php
Im not so sure what is the best solution. Renaming realtime.txt is an option. Another one is retrying to read if the first attempt fails.
The strange thing is that the problem only occasionally occurs. I have tested the script for more than 24 hours now and the problem occurs just the 6 times that the error log shows.
I apologize that I gave the impression that it is a bug in cumulus, while it probably is not
Theo