Tom, Let's walk through what each is doing.
On Tuesday, 22 January 2019 09:39:18 UTC+10, [email protected] wrote: > > I'm a little confused which is nothing new. I have RTGD configured as > > [RealtimeGaugeData] > date_format = %Y.%m.%d %H:%M > rtgd_path = /home/weewx/public_html > scroller_source = WU > remote_server_url = http://www.XXX.com/weewx/ss/post_gauge-data.php > rtgd_file_name = gauge-data.txt > With these settings RTGD will be producing a loop based gauge-data.txt in /home/weewx/public_html on your weeWX machine. Assuming the http post is occurring error free, RTGD will also place a copy of this loop based gauge-data.txt on your web server. Where this copy of gauge-data.txt will be saved on your web server will depend on (1) the location of the post_gauge-data.php file on your web server and (2) the value assigned to $json_file in post_gauge-data.php. post_gauge-data.php is located in the weewx/ss directory relative to the root directory of you web server. If post_gauge-data.php is unmodified $json_file is set to './gauge-data.txt' so post_gauge-data.php will be placing a copy of the loop based gauge-data.txt in weewx/ss on your web server. In my skin.com for ss is have > > [CheetahGenerator] > # search_list_extensions = user.forecast.ForecastVariables > encoding = html_entities > [[ToDate]] > [[[index]]] > template = index.html.tmpl > # [[[data]]] > # template = gauge-data.txt.tmpl > With these settings the SteelSeries skin will produce ss/index.html but no gauge-data.txt I am getting the gauge-data.txt file created in the weewx/ss folder on my > web site every loop but I am also getting the gauge-data.txt file upload to > my weex folder at each archive interval. > As explained above the weewx/ss copy is due to the http post via post_gauge-data.txt. The gauge-data.txt in the weewx directory on your web server is likely due to the FTP or Rsync that is used to upload your site to your web server. Since RTGD is placing a copy of gauge-data.txt in the /home/weewx/public_html directory on your WeeWX machine gauge-data.txt just gets caught up with the rest of your sites files that are uploaded to your web server. Assuming you use the WeeWX FTP or Rsync report to upload your web sites files every archive period that would explain why this copy of gauge-data.txt is uploaded every 5 minutes and not every loop period. I thought by commenting out the two lines in the ss skin that would > prevent one file from being created. > Correct and it has. The SteelsSeries skin is not producing gauge-data.txt. I thought the loop file, created by RTGD, would go in the weex directory > but it seems as though it is in my ss directory since the ss directory is > being updated every loop. > > When I look at my public_html folder on my Raspi I see the gauge-data.txt > file in the root (weewx/public_html) but do not see the file in the > weewx/public_html/ss folder. > RTGD is the only thing creating gauge-data.txt but two copies appear on your web server; one copy is due to the http post via post_gauge-data.php and the second copy is due to the FTP/Rsync upload of your site. > So why am I getting two files and why is the loop going into the ss folder? > I have probably covered that sufficiently above. I guess the other unasked question is how to eliminate the confusion and have only one copy of gauge-data.txt appear on your web server. Well I could alter RTGD so that you can optionally turn off the local (to the WeeWX machine) saving of gauge-data.txt and that way there would be no file to upload via FTP/Rsync so that would get rid of the copy in the weewx directory of your web server. I will look at doing that. Alternatively you could alter your FTP/Rsync settings so that gauge-data.txt is not uploaded via FTP/Rsync. But that would require a bit of messing around with FTP/Rsync settings and possibly upset the upload of your other website files. Thirdly, and probably the easiest, is for you to change the rtgd_path setting to put gauge-data.txt in some directory that will not cause it to be uploaded to your web server. Something like this would do the trick: [RealtimeGaugeData] date_format = %Y.%m.%d %H:%M rtgd_path = /var/tmp This will put gauge-data.txt in /var/tmp on your WeeWX machine, well out of the way of any FTP/Rsync. You would need to do a config reload or restart WeeWX after this change. Gary -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
