Thanks Gary.  Great explanation and help as always.  I had sorta came to the 
conclusion that you explained.

I never really noticed having two copies until I was trying to get the gauges 
working with the Saratoga template.  I inadvertently had the path wrong 
(something I still have trouble with in Linux) and it was pointing to the weewx 
vs weewx/ss  directory.  The gauges were working because they found a 
gauge-data.txt file in the weewx directory but the gauges were not updating 
every loop.  I'm a little slow but I eventually discovered the second copy of 
gauge-data.txt.  As you know you usually get an error:not found from the gauges 
when the path is wrong.

I followed your advice and used the var/tmp path.

Now back to working on the Alternate Saratoga script trying to emulate your 
site. 😊

Tom

________________________________
From: [email protected] <[email protected]> on behalf of 
gjr80 <[email protected]>
Sent: Tuesday, January 22, 2019 2:27 AM
To: weewx-user
Subject: [weewx-user] Re: Real Time Gauges (RTGD) for Steel Series

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<https://nam02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.XXX.com%2Fweewx%2Fss%2Fpost_gauge-data.php&data=02%7C01%7C%7Cb938964ad1374a9516bc08d6804364e9%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636837424269762135&sdata=WZSQiAH0t4s9ujgdPc0INLHNGLk7zMDswyA5bgSlr0M%3D&reserved=0>
    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<https://nam02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fskin.com&data=02%7C01%7C%7Cb938964ad1374a9516bc08d6804364e9%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636837424269762135&sdata=Cxn1TW9jXZkF5Zfr9qLQsOTq7teYU%2FiEwKBLy9vNUtw%3D&reserved=0>
 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]<mailto:[email protected]>.
For more options, visit 
https://groups.google.com/d/optout<https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Foptout&data=02%7C01%7C%7Cb938964ad1374a9516bc08d6804364e9%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636837424269918384&sdata=ezo2RMsl5CCrB%2FQr06JIK%2F3fQsb6udRg88%2FVekZ%2Bt40%3D&reserved=0>.

-- 
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.

Reply via email to