WEEWX_ROOT partly failing

116 views
Skip to first unread message

Michael Waldor

unread,
Jan 5, 2024, 10:59:09 AM1/5/24
to weewx-user
Maybe my understanding of WEEWX_ROOT is wrong. But partly it worked thus I assume it is not working everywhere. I did set WEEWX_ROOT within weewx.conf onto some directory and copied a full weewx 4.6.2 installation over there. But the following folders were not found

WEEWX_ROOT/etc/weewx/skins
WEEWX_ROOT/var/www/html/weewx

I could fix that by introducing proper links like e.g.
mkdir /etc/weewx
cd !$
ln -s WEEWX_ROOT/etc/weewx/skin
cd /var
ln -s WEEWX_ROOT/var/www

It's really a minor issue, but maybe it should be fixed sometimes.

Regards, Michael

Tom Keffer

unread,
Jan 5, 2024, 6:56:29 PM1/5/24
to weewx...@googlegroups.com
Could you try again? I don't understand the point you are making. 

--
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/d6931dc9-214c-4a75-b1ae-b2bd063b2ca5n%40googlegroups.com.

Tom Hogland

unread,
Jan 5, 2024, 8:35:53 PM1/5/24
to weewx-user
Michael - 

WEEWX_ROOT is the root folder under which all the other folders live (such as HTML_ROOT or SKIN_ROOT). My WEEWX_ROOT is /, SKIN_ROOT is /etc/weewx/skins and HTML_ROOT is /var/www/html/weewx. Your skins would be in WEEWX_ROOT/SKIN_ROOT and your weather files will generate into WEEWX_ROOT/HTML_ROOT.

What do you have SKIN_ROOT and HTML_ROOT set to? And do those folders exist within the WEEWX_ROOT folder you created?

Tom

Michael Waldor

unread,
Jan 6, 2024, 3:53:06 AM1/6/24
to weewx-user
Maybe best is to illustrate my setup with the Linux commands to create it (in reality I didi it somehow different because differen hosts are involved):
WEEWX_ROOT=~/weewx-debug
mkdir $WEEWX_ROOT
cd $WEEWX_ROOT
(cd /; tar zcvf - usr/share/weewx)|tar zxvf -
(cd /; tar zcvf - etc/weewx)|tar zxvf -
mkdir -p var/www/html/weewx
mkdir -p var/lib/weewx
cp /var/lib/weewx/*.sdb var/lib/weewx

Within etc/weewx/weewx.conf I modified
WEEWX_ROOT = /home/MyHome/weewx-debug
...
SQLITE_ROOT = /home/MyHome/weewx-debug/var/lib/weewx

I enabled debug = 1
I did NOT change SKIN_ROOT and HTML_ROOT since the (maybe outdated) comments from weewx.conf say

    # Where the skins reside, relative to WEEWX_ROOT
    SKIN_ROOT = /etc/weewx/skins
   
    # Where the generated reports should go, relative to WEEWX_ROOT
    HTML_ROOT = /var/www/html/weewx

Maybe simply those comments are misleading? For my debugging I simply created symbolic links for skins and www. Probabely I should have changed SKIN_ROOT and HTML_ROOT instead? Just tested it right now - and YES it worked. Thus only the comments are wrong. Setting
SKIN_ROOT = /home/MyHome/weewx-debug/etc/weewx/skins
HTML_ROOT = /home/MyHome/weewx-debug/var/www/html/weewx
works fine without additional symbolic links!

From my perspective this is better as compared to the (hidden) use of WEEWX_ROOT. Thus maybe one only should correct the misleading comments within default weewx.conf?

Regards, Michael

Cameron D

unread,
Jan 6, 2024, 8:50:53 AM1/6/24
to weewx-user
The current docs for V4.10 as well as 5.0 say that "a relative path" for HTML_ROOT or SKIN_ROOT is below WEEWX_ROOT.  
If you define either as an absolute path (i.e. beginning with a "/"), then WEEWX_ROOT is ignored.

Tom Keffer

unread,
Jan 6, 2024, 9:31:30 AM1/6/24
to weewx...@googlegroups.com
Exactly. That's just path dynamics. I don't think we want to turn weewx.conf into a tutorial on paths.

Michael Waldor

unread,
Jan 6, 2024, 9:51:43 AM1/6/24
to weewx-user
That's fine to me - I only was irritated by the maybe old comment within distributed weewx.conf.dist. The behaviour is clear and fine.

Regards, Michael
Reply all
Reply to author
Forward
0 new messages