Belchertown skin not linked to nginx

414 views
Skip to first unread message

David Prellwitz

unread,
Mar 6, 2021, 6:12:47 PM3/6/21
to weewx-user
I installed the Belchertown skin; configured weewx.conf and skin.conf; stopped and started weewx; corrected duplication error in weewx.conf and stopped/restarted weews - no errors. Checked file date/times in /home/weewx/public_html/Belchertown_html directory and files are being updated.  However, when i look at 'localhost/weewx' i get the original skin. when i enter 192.168.82.24 (url of this machine) i get the nginx welcome screen.

I believe it's a config or a setup issue on my part, but i don't know where to look. I'm sure i've failed to link the Belchertown skin to the web engine, just not sure how that link is setup. Suggestions as to where to look?
/David

Dave Webb KB1PVH

unread,
Mar 6, 2021, 6:23:04 PM3/6/21
to weewx...@googlegroups.com
Try localhost/weewx/belchertown

Dave - KB1PVH




Sent from my Galaxy S21

--
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 weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/0032546b-89c0-4176-9b58-0cf14a698635n%40googlegroups.com.

David Prellwitz

unread,
Mar 6, 2021, 6:35:15 PM3/6/21
to weewx-user
kool! thanks!

David Prellwitz

unread,
Mar 7, 2021, 4:36:35 PM3/7/21
to weewx-user
New issue; i can't get graphs.conf to work, irrespective of where i put it. It's now in /home/weewx/skins/belchertown directory with graphs.conf.example file. I've even changed example filename - still can't get belchertown skin to use the minor changes i made to the graphs. It has to be a configuration issue, something i've overlooked. help!
/David

David Prellwitz

unread,
Mar 7, 2021, 8:11:59 PM3/7/21
to weewx-user
More info - looking at syslog, i notice that 8, 11, 15 season files generated, but  are written to /home/weewx/public_html. Sometimes i'll get 2 files written to /home/weewx/public_html/weewx.  But, still no updates on belchertown web page. I'm now officially confused as to where skin.conf, graphs.conf need to be in relationship to /home/weewx.
/David

Timothy L

unread,
Mar 7, 2021, 10:23:41 PM3/7/21
to weewx...@googlegroups.com
Maybe this thread is what you are having a problem with.

Try going to another computer on the network and enter the address of the weewx belchertown address computer.

David Prellwitz

unread,
Mar 8, 2021, 12:30:41 AM3/8/21
to weewx-user
lecoqacr - i can access the belchertown link from my mobile, which is sharing the same meshed net. Interesting, both Belchertown homepages show a "last updated" date as yesterday noon; i've restarted all aspects of this machine (Debian 10 on a Dell laptop), from the laptop thru weewx (three times) and wee-reports (atleast 10 times). but all of the Belchertown pages show yesterday noon as the last update. However, the Weewx default skin updates and shows current data. That's why i think its an issue with my weewx.conf/skin.conf/graphs.conf files - and/or their location...

gjr80

unread,
Mar 8, 2021, 3:28:19 AM3/8/21
to weewx-user
Hi,

I suggest as a start you edit weewx.conf, set debug=1, save weewx.conf and the restart WeeWX. Let WeeWX run for at least two report cycles and then post a log extract here showing the entire WeeWX startup and the two report cycles. Then we can see what WeeWX and the skins are doing.

Gary

Message has been deleted

gjr80

unread,
Mar 8, 2021, 9:48:30 PM3/8/21
to weewx-user
David,

Looking at a generated web page is looking at the end product, there are a whole pile of intermediate steps before you get there. Best to work through from the beginning to locate where the issue is.

From your log extract it appears that your system is obtaining data from your station, saving it to archive and running reports as expected. So no problems there. Looking at your [StdReport] stanza in weewx.conf you have:

[StdReport]
    # Where the skins reside, relative to WEEWX_ROOT
    SKIN_ROOT = skins

    [[Belchertown]]
        skin = Belchertown
    HTML_ROOT = /home/weewx/public_html/weewx
        [[[Extras]]]

            footer_copyright_text = "BelchertownWeather.com"
            forecast_enabled = 1
            forecast_api_id = "obfuscated"
            forecast_api_secret = "obfuscated"
            earthquake_enabled = 1
            earthquake_server = USGS
            twitter_enabled = 0
            belchertown_debug = 1
           
   
    # Where the generated reports should go, relative to WEEWX_ROOT
    # HTML_ROOT = /home/weewx/public_html/weewx
   
    # The database binding indicates which data should be used in reports.
    data_binding = wx_binding
   
    # Whether to log a successful operation
    log_success = True
   
    # Whether to log an unsuccessful operation
    log_failure = True
   
    # Each of the following subsections defines a report that will be run.
    # See the customizing guide to change the units, plot types and line
    # colors, modify the fonts, display additional sensor data, and other
    # customizations. Many of those changes can be made here by overriding
    # parameters, or by modifying templates within the skin itself.
   
    [[SeasonsReport]]
        # The SeasonsReport uses the 'Seasons' skin, which contains the
        # images, templates and plots for the report.
        skin = Seasons
        enable = true

The issue I can see is that you have the Belchertown skin and the Seasons skin both sending their generated output to the same directory. Not a problem in itself but if there are any files of the same name generated by both skins then the Seasons skin version will overwrite the Belchertown version (skins are processed in the order they appear in [StdReport]). In your case both skins produce index.html so the Belchertown index.html will always be overwritten. Depending on how your web server is setup you either won't be able to view the Belchertown main page or you will see an old version; you definitely will not see a current Belchertown index.html. You have two options; (1) turn off the Seasons skin with enable = False or (2) send the output of each skin to a different directory. To do the latter change the HTML_ROOT setting under [[Belchertown]], perhaps to /home/weewx/public_html/weewx/belchertown.

The other side of the equation is your web server. You are not having WeeWX FTP or Rsync any files so I presume your web server is on your WeeWX machine. In that case you should be able to configure your web server to serve files from /home/weewx/public_html. Depending on how you set the web server up and where you have WeeWX save your Belchertown files you should be able to access both the Seasons skin and Belchertown skin files from  browser using an address like http://web_server_address/weewx and http://web_server_address/weewx/belchertown. Exactly what goes after the web server address depends on how you configure WeeWX HTML_ROOT and how you setup your web server.

See how you go and get back to us if you have problems.

In terms of numbers of files generated and copied, use that as a guide only. The number of files generated can vary depending on settings in skin.conf, if analysed in conjunction with the skin.conf settings you can draw some detailed conclusions but otherwise just treat it as an indication that 'the skin is being run'. Likewise copied files, it can be quite normal to have zero files copied even though the skin is generating numerous files. It all depends on how the copy generator is configured; the main purpose of the copy generator is not for copying skin generated files it is more for copying static or non-WeeWX generated files.

Gary
On Tuesday, 9 March 2021 at 07:30:30 UTC+10 david.a....@gmail.com wrote:
I've been running debug since the beginning! Attached is a  text file with 200 line extract of syslog, 100 lines of "/var/log/debug",  100 lines of "/var/log/messages"; next is a copy of my weewx.conf. Let me know if you'd like to have skin.conf and graphs.conf.
/David

David Prellwitz

unread,
Mar 9, 2021, 12:53:24 AM3/9/21
to weewx-user
Gary:
no joy. changed weewx.conf to show Belchertown HTML_ROOT as you suggested ("/home/weewx/public_html/weewx/belchertown"), stopped weewx, started weewx, ran weewx status. waited for updates, browsed to http://192.168.86.28/weewx and got the original weewx skin with correct info. Then browsed to http://192.168.86.28/weewx/belchertown and got the old belchertown skin with March 6, 2021 at 1:55 pm. (Same problem i started with.) no errors or problems indicated on syslog, debug or messages. I checked the file/directory structure in /home/weewx/public_html and see that there is a belchertown and a weewx subdirectories. However, the files in /home/public_html/belchertown show a date of Mar 6, 2021 at 13:55 - same as the offending pages. When i checked the .../public_html/belchertown directory, However, there is NOT a /home/weewx/publich_html/weewx/belchertown subdirectory.

More interesting stuff: i looked at the index.html file in "../public_html/weewx" directory and it has the correct belchertown date/time and it contains the corrected labels/headers and chart specifics i'd modified. When i looked at the index.html file in "../public_html/belchertown" directory it contains the March 6 layout (first modifications to only change the title name). Whatever is happening means wherever weewx is putting the html files for the newer Belchertown files is not the same place that the web engine (nginx) is not picking them up from.
/D




On Monday, March 8, 2021 at 12:28:19 AM UTC-8 gjr80 wrote:

gjr80

unread,
Mar 9, 2021, 1:11:54 AM3/9/21
to weewx-user
OK. Let's forget about the browser for the time being and work with the files in /home/weewx/public_html, get them right and the browser will fall into place. Since you have made various changes to where WeeWX generated files are going, but seem to have that set correctly now, go ahead and delete everything in /home/weewx/public_html. Everything includes files and directories. WeeWX will re-generate it all on the next report cycle, then next report cycle might take a little longer depending on how much historical data you have as WeeWX will re-generate all NOAA format files. No need to stop/start or restart WeeWX, just make sure that you get everything deleted before a report cycle starts and not during.

Monitor the log and once that next report cycle has completed have a look at what files/directories are where in /home/weewx/public_html and when are they timestamped.

Gary

David Prellwitz

unread,
Mar 9, 2021, 3:48:15 AM3/9/21
to weewx-user
Gary:
well, i should not make major changes while tired.... I (unfortunately) wiped out my own user directory ("/home/david/...) so i'll have to live with that. Lost some files and copies of modified conf files, but not much else was lost...

I did wipe out the contents of public_html directory and it's subdirectories. I must have interrupted a reporting cycle as syslog had some serious errors. once i restarted weewx it all ran successfully. However, still no joy. Now when i go to http://192,168.86.28/weewx/belchertown i get a 404 error (not found). the default skin (http://192,168.86.28/weewx) runs fine. Files all seem to have a current date/time, but i still don't get a belchertown page loaded.
/David

gjr80

unread,
Mar 9, 2021, 4:06:24 AM3/9/21
to weewx-user
Yes, deleting while tired is to be avoided. Interrupting a reporting cycle is not critical, just means you probably deleted some files that WeeWX had just generated, WeeWX will get over it.

So forgetting about the browser, does /home/weewx/public_html/weewx/belchertown contain any files and directories? Are they current, check the content with an editor. If they are current your issue is an nginx config issue, if they are not current then you have a really bizarre WeeWX/Belchertown skin problem.

Gary

David Prellwitz

unread,
Mar 9, 2021, 5:08:20 AM3/9/21
to weewx-user
Gary, they seem to be current. I read index.html files in ../public_html/weewx/ and /belchertown and they shows labels and some epoch time that appears to be current. All the files in /public_html, weewx and belchertown all seems to have current files. I still get a 404 error when trying to open. default skin/browser still works.
/David

gjr80

unread,
Mar 9, 2021, 5:21:19 AM3/9/21
to weewx-user
Just to remove all possibility of misinterpretation with abbreviated paths etc. You are saying /home/weewx/public_html/weewx/index.html and /home/weewx/public_html/weewx/belchertown/index.html both exist and appear to be current? And also when you put http://192.168.86.28/weewx into your browser it displays the Seasons skin main page and the data is current, but when you use http://192.168.86.28/weewx/belchertown you get a 404 error?

Gary

David Prellwitz

unread,
Mar 9, 2021, 3:56:47 PM3/9/21
to weewx-user
Gary:
yes to all. here's some examples. First file is a set of extracts from syslog; then annotated extracts from the index.html files in ../public_html and ../public_html/weewx/belchertown directories; then an annotated tree structure taken at /home/weewx/public_html; then screen shots from http://192.168.86.28/  - then screen shot from http://192.168.86.28/weewx and last from http://192.168.86.28/weewx/belchertown . as i noted in my extracts, both the index files show current info (i think). When i look in /home/weewx/public_html/weewx directory it's empty except for the /belchertown subdirectory.  I also did "locate" commands for all occurrences of "index.html" and nothing seemed out of place. So, i'm not sure where weewx and belchertown execution put their respective web files. Nor am i aware of where nginx will pick up those files. It seems that the default weewx skin operates correctly, that means weewx is operational and correct (i think). the syslog shows that weewx generates reports for belchertown using the skin.conf in belchertown skins directory. almost all of the features of belchertown skin seem to be working... so i'm officially lost! thanks for the assistance.
localhost-weewx-belchertown-screenshot.png
weewx-index_html-extracts.txt
weewx-syslog-1.txt
localhost-screenshot.png
weewx-public_html-tree.txt
localhost-weewx-screenshot.png

David Prellwitz

unread,
Mar 9, 2021, 6:58:32 PM3/9/21
to weewx-user
Gary:
more - i've been studying the nginx package. I followed the configuration file links. they start at /etc/nginx in the nginx.conf file. It links /etc/nginx/sites-enabled; which redirects to /etc/nginx/sites-avaialble. that configuration file links to 'default' which has a declaration to include 'root' with /var/www/html which contains the first mention of weewx; that links is a redirection to /home/weewx/public_html directory. No mention of belchertown anywhere.

I'm thinking that I need a reference to the "/home/weewx/public_html/weewx/belchertown" somewhere in this chain, otherwise nginx can't find the config, html and image files. what do you think? attached is a text file of my findings on the nginx configuration setup.
/David
nginx-configs.txt

David Prellwitz

unread,
Mar 9, 2021, 7:53:48 PM3/9/21
to weewx-user
Gary, did one more test - i copied all of the files in "/home/weewx/public_html/weewx/belchertown" to "/home/weewx/public_html/belchertown" and ran the browser to 'localhost/weewx/belchertown' - i worked!!! that means i need to modify the conf file to point to "/home/weewx/public_html/belchertown" instead of "/home/weewx/public_html/weewx/belchertown"

David Prellwitz

unread,
Mar 9, 2021, 8:14:29 PM3/9/21
to weewx-user
Gary, more GOOD news, i changed HTML_ROOT statement in weewx.conf for [[Belchertown]] to  "HTML_ROOT = /home/weewx/public_html/belchertown" then made some minor title changes to skin.conf in belchertown and it works!

I think that nginx was looking at the base of /home/weewx/public_html for all implementations of localhost. So, any calls to http://localhost/weewx gets the basic pages found in /public_html; but calls to http://localhost/weewx/belchertown will get the belchertown pages (off of ../public_html/belchertown') instead of the ../public_html pages. 

I think it's now working! Thanks!
/David

gjr80

unread,
Mar 10, 2021, 5:35:28 AM3/10/21
to weewx-user
David,

Apologies I have not had much time for WeeWX today. In any case it is good that you have it working.

Gary

David Prellwitz

unread,
Mar 10, 2021, 12:02:53 PM3/10/21
to weewx-user
Gary, hope all's okay (covid19 and all). is there a way to change the general layout of the homepage? wife wants something different, large day, date, time with summaries of weather conditions, leave most of the details to lower pages. thanks!

gjr80

unread,
Mar 10, 2021, 3:43:51 PM3/10/21
to weewx-user
Which homepage? Seasons or Belchertown?

Gary

David Prellwitz

unread,
Mar 11, 2021, 4:55:05 AM3/11/21
to weewx...@googlegroups.com
Belchertown. I just don't fully understand how each of the index, graphs, skins and image file work to produce the homepage. More studying on my part! Can you give me a rough outline of how the main homepage is generated? Where static and dynamic content is assembled for nginx to publish basic page? I'll try to read up on the chart generator also. Thanks for the assists! 

You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/l1APLTi8iHQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/50a712f7-4c59-4384-9430-4d86359621b4n%40googlegroups.com.

gjr80

unread,
Mar 11, 2021, 4:59:43 AM3/11/21
to weewx-user
Sorry David, you’ll need someone else to help customise Belchertown, I’ve never used it. There are plenty here who do, perhaps one of them will help or Pat may reply.

Gary

Karen K

unread,
Mar 11, 2021, 6:25:55 AM3/11/21
to weewx-user
Belchertown is a very complex skin with lots of JavaScript and Python scripts contributing some values. Major changes in layout require deep study of the internal structure. If you have to fulfill special requirements in layout, may be you want to start based on another skin like Seasons.

vince

unread,
Mar 11, 2021, 10:57:15 AM3/11/21
to weewx-user
On Thursday, March 11, 2021 at 3:25:55 AM UTC-8 kk44...@gmail.com wrote:
Belchertown is a very complex skin with lots of JavaScript and Python scripts contributing some values. Major changes in layout require deep study of the internal structure. If you have to fulfill special requirements in layout, may be you want to start based on another skin like Seasons.


Agree.  Belchertown supports only minimal configurability within some pretty strict bounds.   Figuring it all out end to end would require examining the source html and the reasonably complicated javascript code under the hood.  This is non-trivial especially for folks new to doing that kind of stuff.

 

David Prellwitz

unread,
Mar 12, 2021, 7:00:03 PM3/12/21
to weewx-user
Thanks! I started with Belchertown because of the rich amount of documentation and help that's available. If not Belchertown, then what would you both suggest i start with to build up a better understanding of weewx, skins, graphs and weather info presentation?
/David

gjr80

unread,
Mar 12, 2021, 7:55:52 PM3/12/21
to weewx-user
David,

I guess it really depends where you want to start and where you want to go. Its hard to beat the Standard skin for it's simplicity; it's a series of fairly basic pages that just use basic html, WeeWX tags and plots. There is no specific documentation for the Standard skin but fairly much all the components except the html (ie the WeeWX tags and plots) are covered in the Customization Guide under the Customizing reports, The cheetah generator and The image generator sections. The Standard skin has been superseded as the default WeeWX skin by the Seasons skin, but the Standard skin is still shipped and installed with WeeWX, it is just disabled by default. The Seasons skin is a step up from the Standard skin, it still uses basic html and WeeWX tags and plots but with a better layout/appearance. Seasons is much more modular and in that regard it can be a bit hard to follow (and work out what to change and where to change it if you do want to change something). New users must grapple with the 'flow and structure' of the templates as well as getting their heads around WeeWX tags and plots. Again no specific documentation other than the general tag and plot documentation in the Customization Guide. Belchertown is a step up again with a very smart looking display but using significantly more JavaScript and external JavaScript libraries to get the responsive design and third party plots. Pat has documented it well.

I guess it really comes down to your current skills and what you are seeking as the end point. Despite the documentation I would expect diving head first into extensively modifying the look and feel of Belchertown could be an exercise in frustration. By the same token I expect you probably don't want the look and feel of the Standard skin so spending a lot of time on it may end up being wasted time. Perhaps spend a little time with Standard, changing it, breaking it etc to get the feeling of tags and plots and then see where you want to go.

Gary

vince

unread,
Mar 12, 2021, 9:21:10 PM3/12/21
to weewx-user
David - you seem to be fishing, but it's not clear for what exactly.  There are hundreds of pages of documentation about weewx on the wiki and in the various guides.  There are thousands of posts.   There is so much documentation out there I can't even guess what you're not finding or what you're looking for.

If you want a super-simple skin that is installable via the extension installer, see my skin (here) that displays the outside temperature and its graph.   Try installing that.  Then change its look+feel.  Add or change the elements or fonts.   Change the graph.  Add more graphs. Go wild.  Learn by experimentation.

Otherwise I'm at a loss for what you're trying to do.

Reply all
Reply to author
Forward
0 new messages