Page 1 of 1

CUTags.php not updating

Posted: Tue 14 Mar 2017 1:19 am
by acatalano
I've had Saratoga templates working nicely on my website www.apcat.org for over a year. My SD card seems to be failing, (for the second time) and although I have an image backup, I thought I'd bypass NOOBs, and update to the latest version of OS for the RPi ("Jessie"), install the latest 3.0.0.3043 of CumulusMX, expand the OS to the full 32 GB so I could tolerate more wear & tear on the SD card etc., Clearly there is more homework to do as regards adapting to Jessie (such as mounting a remote server directory), but that is not the issue today.

Although I have used the latest CumulusMX.exe and mono after expaning the "Jessie" download, and I have copied over my Cumulus.ini file, there are issues with updating CUTags.php. Otherwise the CumulusMX program runs fine.

When I got the website running years ago, I somehow used a folder /home/pi/CumulusMX/web instead of /webfiles (like the instructions within CUTags.php say). I still don't recall how or why I did this, and it may be irrelevant. In any event in the extra internet files I have the correct folder on the RPi and website (public_html) specified, but the data does not seem to be coming over. Note that the website seems to work only because I have Realtime working.

Website is www.apcat.org

I think there is a simple solution that I'm just missing or I have a typo somewhere, but I just don't see it!

Re: CUTags.php not updating

Posted: Tue 14 Mar 2017 2:27 am
by jlmr731
I see you have CUtags.php on your site but dont think its current showing 17:50 when it should be 20:21 or so for you timezone.
Are you able to pull up CumulusMX dashboard in a web browser? goto ipadd of your pi and port 8998 so pi.ip:8998 then go to the settings extra web files section and put in the path to your CUtags.txt like web/CUtags.txt should work if in the web subdir of CumulusMX then of course enter in the full path to your web server dir live /home/pi/public_html/CUtags.php click the prosses button and it should work for ya

Re: CUTags.php not updating

Posted: Tue 14 Mar 2017 9:19 am
by mcrossley
acatalano wrote:expand the OS to the full 32 GB so I could tolerate more wear & tear on the SD card etc.
I don't think you need to do that, but it won't do any harm either, I'm pretty sure the SD card will wear level the writes across all its memory cells whatever the partition size. But bigger cards are better as they have more cells to go at.

My current 16 GB SD card is 14 months old now, it runs MX with 5 second realtime updates and 5 minute logging, plus the web server for another site I host which is using NGINX and PHP. Not sure how much longer it will last, but it is much more power friendly than the spinning disk I used before. I'll think about moving to a small SSD when it finally fails. I just wish the raspberry pi had a proper disk interface like the banana pi.

Re: CUTags.php not updating

Posted: Sun 19 Mar 2017 10:07 pm
by acatalano
I'm sorry for not replying to your suggestions sooner. I have been traveling and am only now back at the station.

Yes I am able to go to the localhost or IPaddress:8998 and open up a web page, see the gauges and settings just fine.

The problem seems to be that the file that is always being updated with the station data has the extension tmp on the end. So if I have CUtags.txt specified in my extrafiles to be "processed, I actually wind up with the file CUtags.txttmp that has updated data. This file is listed as a php file, not a text file. If I then upload the CUtags.txttmp to the destination name CUtags.php I wind up with another updated file CUtags.txttmptmp !!!!!!!!

Even though I believe I have the proper local and destination filename correctly specified, the file extension keeps getting appended with tmp!

Re: CUTags.php not updating

Posted: Sun 19 Mar 2017 10:18 pm
by steve
The process is explained here - http://wiki.sandaysoft.com/a/Customised ... mplates.27

Cumulus appends 'tmp' to the filename of the local template file for the name of the processed file so that it doesn't overwrite the original input file. It then uploads the contents of that 'tmp' file to your server and tells the server to create a file using the remote filename that you specify. The upload may also involve an intermediate file on the server with 'tmp' on the end if you have specified the 'rename' option.

If you are absolutely certain that you have the remote filename (including the path) correct, then you need to turn on ftp logging and look at ftplog.txt to see why the file isn't appearing where you think it should be appearing.

Re: CUTags.php not updating

Posted: Thu 23 Mar 2017 3:30 pm
by acatalano
Steve

Thanks VERY much for the favor of a reply on the subject. It's amazing to me how easy it is for me to "see" something, but yet,- not see it. Your message caused me go go back to the original saratoga CUtags file. I had convinced myself it was CUtags.txt uploading to CUtags.php. Well that's not right. It was CUtagsT.htm to CUtags.php. Correcting that has solved that one particular problem.

However, I cannot get realtime.txt to update at all. I had it setup in the "extra files" dialog on the RPi, but nothing happens. I deleted the existing realtime.txt to see if it would re-create the file and it does not. However, I found that Cumulus seems to be creating another file in real time called Cumulusrealtime.txt in the /home/pi/ directory. So I am using that and have disabled the realtime.txt file in"extra files".

So with these changes the data seems to be accurate (though solution ain't pretty), at least to a point. The "cumulus weather data" in the status page is still grossly wrong. I have no idea where this data (and error) is coming from. If you have any insight it would be most appreciated.

One further observation I have made since creating cumulus.service and running it on startup via systemd: I can load the gauges via localhost:8998 or via IPAddress:8998, no problem. AND I can load the localhost/extrawebpages.html (might have the actual filename wrong there) and make changes to it. But all the other things like station settings and internet setting will not come up! I have to edit cumulus.ini in nano for that.

One further observation about that...if I disable systemd cumulus service and start it from the command line,-it all works as it should! All the pages load properly.

Re: CUTags.php not updating

Posted: Thu 23 Mar 2017 3:44 pm
by steve
Assuming that the realtime.txt file you refer to is the standard Cumulus realtime.txt, then you don't need that as an extra file, you just enable the appropriate realtime settings. I don't know what Cumulusrealtime.txt is, it's not a standard Cumulus file.

Re: CUTags.php not updating

Posted: Thu 23 Mar 2017 6:00 pm
by acatalano
The problem has been that I expected to actually "see" a file named Realtime.txt in the webfiles folder. I didn't understand that this was supposed to happen "out of sight", so I kept looking for it, it didn't appear so I messed everything up trying to get it to show up. Of course it never would so I kept trying things to make it happen; set it up in extra files etc., :bash: There is such a thing as trying too hard I guess...

BTW my comment on systemd really holds. In order to really change Cumulus.ini I had to disable systemd, reboot, start Cumulus from the command line and go to internet settings via the web browser to make it happen.

Many thanks again for all your help!