Author Topic: Running WeeWX in a container on a QNAP NAS  (Read 2605 times)

0 Members and 1 Guest are viewing this topic.

Offline BaseLine

  • Senior Contributor
  • ****
  • Posts: 184
Running WeeWX in a container on a QNAP NAS
« on: September 20, 2022, 08:49:38 AM »
Has any of you figured out how to run WeeWX in a container?
My attempts ended with Python errors etc. and I finally gave up. 

Why container? Because if I run a virtual (Ubuntu) image on my NAS, it wont be restarted on reboot but running containers are.

Thanks.
Sun cooked nothingburger of climate change hysteria with a side order of peak-oil nonsense fries.

Offline vreihen

  • El Niņo chaser
  • Forecaster
  • *****
  • Posts: 1216
  • K2BIG
Re: Running WeeWX in a container on a QNAP NAS
« Reply #1 on: September 20, 2022, 09:38:50 AM »
It has been done with Docker.  I'm pretty sure that there is info on the weewx-users Google Group.....
WU Gold Stars for everyone! :lol:

Offline BaseLine

  • Senior Contributor
  • ****
  • Posts: 184
Re: Running WeeWX in a container on a QNAP NAS
« Reply #2 on: September 20, 2022, 10:38:43 AM »
I do not have Google account and do not plan to get one. So, this is useless.

I used a Python image (Docker) and added what was missing.
Maybe I should go with full Ubuntu image instead.
Sun cooked nothingburger of climate change hysteria with a side order of peak-oil nonsense fries.

Offline BoDuke

  • Global Moderator
  • Contributor
  • *****
  • Posts: 132
  • Ambient Weather, Ecowitt, WeeWX, Custom PHP
Re: Running WeeWX in a container on a QNAP NAS
« Reply #3 on: September 20, 2022, 11:15:32 AM »
You can search and read (but not post) the weewx-user group messages without joining or having a Google account:

https://groups.google.com/g/weewx-user

Offline Gyvate

  • Forecaster
  • *****
  • Posts: 3297
Re: Running WeeWX in a container on a QNAP NAS
« Reply #4 on: September 22, 2022, 05:14:58 PM »
Has any of you figured out how to run WeeWX in a container?
My attempts ended with Python errors etc. and I finally gave up. 

Why container? Because if I run a virtual (Ubuntu) image on my NAS, it wont be restarted on reboot but running containers are.

Thanks.
yes, I got it running in an Ubuntu 18.4 docker container on my QNAP TS-453A
was some work but I finally succeeded - used the setup.py method for weewx
WS2350 1.6.7, GW1000(3) 1.7.7,WH2650 WiFi (2) 1.7.7 (test/backup), GW1100 2.3.1, GW2000(3) 3.1.1, HP2551 1.9.5,5.1.5;HP3500 1.7.2,WS3800 1.2.8, WN1910 1.2.3,WN1980 1.2.3;
Ecowitt WS90(2)1.3.5/1.4.0, WS80(2)1.2.5, WS68, WS69, WH40, WH31, WH31-EP, WN30, WN34L, WN35, WH32, WH32-EP, WH32B, WH57 [Lightning], WH41 [PM2.5], WH51, WH45, WH55
MeteobridgePro(2)[test,prod] 5.8 Mar 01 2024, 15185 - Blake-Larsen Sun Recorder - RPi4/weewx 4.8.0/4.10.2/CumulusMX 3283/Meteobridge RPi4B-2GB(3169)
Barani Meteoshield Pro, MetSpec Rad02 - Ecowitt 5763,34418;WU ISAARB3(WH4000SE),ISAARB22(HP2553), http://meshka.eu

Offline BaseLine

  • Senior Contributor
  • ****
  • Posts: 184
Re: Running WeeWX in a container on a QNAP NAS
« Reply #5 on: September 23, 2022, 01:27:31 PM »

yes, I got it running in an Ubuntu 18.4 docker container on my QNAP TS-453A
was some work but I finally succeeded - used the setup.py method for weewx

I have a TVS-472XT. I'll see if setup.py makes any difference. I think I have kind of a permission issues with writing logs etc.
Sun cooked nothingburger of climate change hysteria with a side order of peak-oil nonsense fries.

Offline Gyvate

  • Forecaster
  • *****
  • Posts: 3297
Re: Running WeeWX in a container on a QNAP NAS
« Reply #6 on: September 23, 2022, 01:44:04 PM »

yes, I got it running in an Ubuntu 18.4 docker container on my QNAP TS-453A
was some work but I finally succeeded - used the setup.py method for weewx

I have a TVS-472XT. I'll see if setup.py makes any difference. I think I have kind of a permission issues with writing logs etc.
at the container and OS end a few things need to be considered ...
here is what I did:
- the container has to be set into "host" mode in the advanced settings for network - not "NAT", which is the default setting - otherwise you cannot reach it from another device in the same network
- a webserver needs to be installed on ubuntu - I chose apache2
- the listening port of the webserver has to be changed from 80 to something else (I chose 8000) - otherwise you cannot get the skin either as you will compete with the NAS webserver on port 80
- a symbolic link needs to be created from /var/www/html/weewx to /home/weewx/public_html - otherwise you only get the webserver default page
- I also installed rsyslog - it's not installed with ubuntu by default - but with rsyslog you find your system log including the weewx messages in /var/log/syslog
- I chose the "old" weewx starting procedure with /etc/init.d/weewx  (see weewx documentation)
- after some customizing in skin.conf and weewx.conf - mainly for labels and for extra sensors - the Seasons skin is displayed perfectly
WS2350 1.6.7, GW1000(3) 1.7.7,WH2650 WiFi (2) 1.7.7 (test/backup), GW1100 2.3.1, GW2000(3) 3.1.1, HP2551 1.9.5,5.1.5;HP3500 1.7.2,WS3800 1.2.8, WN1910 1.2.3,WN1980 1.2.3;
Ecowitt WS90(2)1.3.5/1.4.0, WS80(2)1.2.5, WS68, WS69, WH40, WH31, WH31-EP, WN30, WN34L, WN35, WH32, WH32-EP, WH32B, WH57 [Lightning], WH41 [PM2.5], WH51, WH45, WH55
MeteobridgePro(2)[test,prod] 5.8 Mar 01 2024, 15185 - Blake-Larsen Sun Recorder - RPi4/weewx 4.8.0/4.10.2/CumulusMX 3283/Meteobridge RPi4B-2GB(3169)
Barani Meteoshield Pro, MetSpec Rad02 - Ecowitt 5763,34418;WU ISAARB3(WH4000SE),ISAARB22(HP2553), http://meshka.eu

Offline Gyvate

  • Forecaster
  • *****
  • Posts: 3297
Re: Running WeeWX in a container on a QNAP NAS
« Reply #7 on: September 24, 2022, 05:59:02 AM »
if you want to see the result: http://meshka.eu/weewx2

meanwhile I've learnt a bit more about Docker containers and how to share - directly or indirectly - NAS shared folders with the container
so once I find the time, I will set up a new container which incorporates all these things and migrate my weewx installation into the new container
WS2350 1.6.7, GW1000(3) 1.7.7,WH2650 WiFi (2) 1.7.7 (test/backup), GW1100 2.3.1, GW2000(3) 3.1.1, HP2551 1.9.5,5.1.5;HP3500 1.7.2,WS3800 1.2.8, WN1910 1.2.3,WN1980 1.2.3;
Ecowitt WS90(2)1.3.5/1.4.0, WS80(2)1.2.5, WS68, WS69, WH40, WH31, WH31-EP, WN30, WN34L, WN35, WH32, WH32-EP, WH32B, WH57 [Lightning], WH41 [PM2.5], WH51, WH45, WH55
MeteobridgePro(2)[test,prod] 5.8 Mar 01 2024, 15185 - Blake-Larsen Sun Recorder - RPi4/weewx 4.8.0/4.10.2/CumulusMX 3283/Meteobridge RPi4B-2GB(3169)
Barani Meteoshield Pro, MetSpec Rad02 - Ecowitt 5763,34418;WU ISAARB3(WH4000SE),ISAARB22(HP2553), http://meshka.eu

Offline BaseLine

  • Senior Contributor
  • ****
  • Posts: 184
Re: Running WeeWX in a container on a QNAP NAS
« Reply #8 on: September 25, 2022, 02:23:42 PM »
if you want to see the result: http://meshka.eu/weewx2

meanwhile I've learnt a bit more about Docker containers and how to share - directly or indirectly - NAS shared folders with the container
so once I find the time, I will set up a new container which incorporates all these things and migrate my weewx installation into the new container

Awesome, keep me posted and I will follow your lead :)
Sun cooked nothingburger of climate change hysteria with a side order of peak-oil nonsense fries.

Offline Gyvate

  • Forecaster
  • *****
  • Posts: 3297
Re: Running WeeWX in a container on a QNAP NAS
« Reply #9 on: September 25, 2022, 03:25:01 PM »
if you want to see the result: http://meshka.eu/weewx2

meanwhile I've learnt a bit more about Docker containers and how to share - directly or indirectly - NAS shared folders with the container
so once I find the time, I will set up a new container which incorporates all these things and migrate my weewx installation into the new container

Awesome, keep me posted and I will follow your lead :)
I made a new Docker container as you have to setup the shared folders of your NAS which you want to share with the container during creation - afterwards you can't change it anymore.
That I forgot/didn't understand when setting up the first container.
Maybe you can tweak it somehow deep in the internals, but that's not my thing.
You can circumvent the missing shares with some tricky scp command, but that's not very convenient to do.

Everything perfect as far as I can see - it was quite some manual installation of tools etc. as the ubuntu image available in the Container Store is much less "equipped" than a Raspian or Debian which comes e.g. with a RasPi.
Both containers now run as factual mirrors. And weewx runs flawlessly for the Seasons skin. A newly added WN35 (Leaf wetness) appeared right after installation in the Seasons skin.
That's for the Ecowitt Gateway driver (aka GW1000 driver).

I added a few service starts at reboot into the crontab (rsyslog, apache2, weewx - in this sequence - as they are not automatically started - there may be better ways to do that, but it works  ;))
WS2350 1.6.7, GW1000(3) 1.7.7,WH2650 WiFi (2) 1.7.7 (test/backup), GW1100 2.3.1, GW2000(3) 3.1.1, HP2551 1.9.5,5.1.5;HP3500 1.7.2,WS3800 1.2.8, WN1910 1.2.3,WN1980 1.2.3;
Ecowitt WS90(2)1.3.5/1.4.0, WS80(2)1.2.5, WS68, WS69, WH40, WH31, WH31-EP, WN30, WN34L, WN35, WH32, WH32-EP, WH32B, WH57 [Lightning], WH41 [PM2.5], WH51, WH45, WH55
MeteobridgePro(2)[test,prod] 5.8 Mar 01 2024, 15185 - Blake-Larsen Sun Recorder - RPi4/weewx 4.8.0/4.10.2/CumulusMX 3283/Meteobridge RPi4B-2GB(3169)
Barani Meteoshield Pro, MetSpec Rad02 - Ecowitt 5763,34418;WU ISAARB3(WH4000SE),ISAARB22(HP2553), http://meshka.eu

Offline Gyvate

  • Forecaster
  • *****
  • Posts: 3297
Re: Running WeeWX in a container on a QNAP NAS
« Reply #10 on: September 28, 2022, 03:31:42 AM »
Awesome, keep me posted and I will follow your lead :)
what's your weewx on QNAP NAS status ?
How far did you get ?
WS2350 1.6.7, GW1000(3) 1.7.7,WH2650 WiFi (2) 1.7.7 (test/backup), GW1100 2.3.1, GW2000(3) 3.1.1, HP2551 1.9.5,5.1.5;HP3500 1.7.2,WS3800 1.2.8, WN1910 1.2.3,WN1980 1.2.3;
Ecowitt WS90(2)1.3.5/1.4.0, WS80(2)1.2.5, WS68, WS69, WH40, WH31, WH31-EP, WN30, WN34L, WN35, WH32, WH32-EP, WH32B, WH57 [Lightning], WH41 [PM2.5], WH51, WH45, WH55
MeteobridgePro(2)[test,prod] 5.8 Mar 01 2024, 15185 - Blake-Larsen Sun Recorder - RPi4/weewx 4.8.0/4.10.2/CumulusMX 3283/Meteobridge RPi4B-2GB(3169)
Barani Meteoshield Pro, MetSpec Rad02 - Ecowitt 5763,34418;WU ISAARB3(WH4000SE),ISAARB22(HP2553), http://meshka.eu

Offline BaseLine

  • Senior Contributor
  • ****
  • Posts: 184
Re: Running WeeWX in a container on a QNAP NAS
« Reply #11 on: September 29, 2022, 06:08:18 AM »
I found out why weewx crashes. It seems it cant function without rsyslog.
Ubuntu container has no rsyslog installed. I had to install it and start rsyslogd manually.
So, I got weewx running. At least I can see it's logging but wont update the webpage.
Weather is absolute crap - cold and rainy, so maybe I'll spend some time figuring this out.
Sun cooked nothingburger of climate change hysteria with a side order of peak-oil nonsense fries.

Offline Gyvate

  • Forecaster
  • *****
  • Posts: 3297
Re: Running WeeWX in a container on a QNAP NAS
« Reply #12 on: September 29, 2022, 08:01:30 AM »
yes, as you may have read in my earlier post, there is no rsyslog in the ubuntu container so I had to install it; then weewx started running  8-)
regarding the webpage (you mean the [e.g. Seasons] skin I guess)
a) you need to have a webserver installed (apache2, nginx, ...)
b) you need to put the HTML_root in weewx.conf to /var/www/html/weewx, where the subdirectory weewx might first need to be created:
mkdir /var/www/html/weewx
and in weewx.conf
[StdReport]
HTML_ROOT = /var/www/html/weewx

then you should be able to see the updated skin pages via IP-address:your-selected-port/weewx
e.g. 192.168.1.99:8000/weewx

but, you need to have changed the listening port for your container webserver from 80 to 8000 (and restart the webserver)
in apache2 this done in 000-default.conf (/etc/apache2/sites-enabled/000-default.conf) first line
and in /etc/apache2/ports.conf - replace entry Listen 80 by Listen 8000

you cannot use port 80 in the container as it holds the same IP address and 80 conflicts with the webserver of your NAS - therefore you have to run/let listen the container webserver at another port - I chose 8000 - that's what I used in the examples
WS2350 1.6.7, GW1000(3) 1.7.7,WH2650 WiFi (2) 1.7.7 (test/backup), GW1100 2.3.1, GW2000(3) 3.1.1, HP2551 1.9.5,5.1.5;HP3500 1.7.2,WS3800 1.2.8, WN1910 1.2.3,WN1980 1.2.3;
Ecowitt WS90(2)1.3.5/1.4.0, WS80(2)1.2.5, WS68, WS69, WH40, WH31, WH31-EP, WN30, WN34L, WN35, WH32, WH32-EP, WH32B, WH57 [Lightning], WH41 [PM2.5], WH51, WH45, WH55
MeteobridgePro(2)[test,prod] 5.8 Mar 01 2024, 15185 - Blake-Larsen Sun Recorder - RPi4/weewx 4.8.0/4.10.2/CumulusMX 3283/Meteobridge RPi4B-2GB(3169)
Barani Meteoshield Pro, MetSpec Rad02 - Ecowitt 5763,34418;WU ISAARB3(WH4000SE),ISAARB22(HP2553), http://meshka.eu

Offline Gyvate

  • Forecaster
  • *****
  • Posts: 3297
Re: Running WeeWX in a container on a QNAP NAS
« Reply #13 on: September 29, 2022, 08:06:10 AM »
if in spite of all this you don't get updated pages (and weewx doesn't show the archiving of the data in the syslog), then probably your weewx driver/extension for your weather station console doesn't provide loop data. Or you haven't switched from Simulator to your station driver yet.
WS2350 1.6.7, GW1000(3) 1.7.7,WH2650 WiFi (2) 1.7.7 (test/backup), GW1100 2.3.1, GW2000(3) 3.1.1, HP2551 1.9.5,5.1.5;HP3500 1.7.2,WS3800 1.2.8, WN1910 1.2.3,WN1980 1.2.3;
Ecowitt WS90(2)1.3.5/1.4.0, WS80(2)1.2.5, WS68, WS69, WH40, WH31, WH31-EP, WN30, WN34L, WN35, WH32, WH32-EP, WH32B, WH57 [Lightning], WH41 [PM2.5], WH51, WH45, WH55
MeteobridgePro(2)[test,prod] 5.8 Mar 01 2024, 15185 - Blake-Larsen Sun Recorder - RPi4/weewx 4.8.0/4.10.2/CumulusMX 3283/Meteobridge RPi4B-2GB(3169)
Barani Meteoshield Pro, MetSpec Rad02 - Ecowitt 5763,34418;WU ISAARB3(WH4000SE),ISAARB22(HP2553), http://meshka.eu

Offline BaseLine

  • Senior Contributor
  • ****
  • Posts: 184
Re: Running WeeWX in a container on a QNAP NAS
« Reply #14 on: September 29, 2022, 08:48:53 AM »
From weewx.conf
Code: [Select]
# Root directory of the weewx data file hierarchy for this station
WEEWX_ROOT = /home/weewx

...

[StdReport]

    # Where the generated reports should go, relative to WEEWX_ROOT
    HTML_ROOT = public_html

Files should show up in /home/weewex/public_html/ but there is nothing there.

Web server is not the issue. It runs finer and I can configure it to read those files from anywhere.

Sun cooked nothingburger of climate change hysteria with a side order of peak-oil nonsense fries.

Offline Gyvate

  • Forecaster
  • *****
  • Posts: 3297
Re: Running WeeWX in a container on a QNAP NAS
« Reply #15 on: September 29, 2022, 09:44:38 AM »
does weewx produce reports in the first place ?
see syslog - should look like
Sep 25 01:10:19 TS-453A weewx[3911] INFO weewx.manager: Added record 2022-09-25 01:10:00 CEST (1664061000) to database 'weewx.sdb'
Sep 25 01:10:19 TS-453A weewx[3911] INFO weewx.manager: Added record 2022-09-25 01:10:00 CEST (1664061000) to daily summary in 'weewx.sdb'
Sep 25 01:10:33 TS-453A weewx[3911] INFO weewx.cheetahgenerator: Generated 8 files for report SeasonsReport in 7.86 seconds
Sep 25 01:10:37 TS-453A weewx[3911] INFO weewx.imagegenerator: Generated 27 images for report SeasonsReport in 3.46 seconds
Sep 25 01:10:37 TS-453A weewx[3911] INFO weewx.reportengine: Copied 0 files to /var/www/html/weewx
Sep 25 01:15:23 TS-453A weewx[3911] INFO weewx.manager: Added record 2022-09-25 01:15:00 CEST (1664061300) to database 'weewx.sdb'
Sep 25 01:15:23 TS-453A weewx[3911] INFO weewx.manager: Added record 2022-09-25 01:15:00 CEST (1664061300) to daily summary in 'weewx.sdb'
WS2350 1.6.7, GW1000(3) 1.7.7,WH2650 WiFi (2) 1.7.7 (test/backup), GW1100 2.3.1, GW2000(3) 3.1.1, HP2551 1.9.5,5.1.5;HP3500 1.7.2,WS3800 1.2.8, WN1910 1.2.3,WN1980 1.2.3;
Ecowitt WS90(2)1.3.5/1.4.0, WS80(2)1.2.5, WS68, WS69, WH40, WH31, WH31-EP, WN30, WN34L, WN35, WH32, WH32-EP, WH32B, WH57 [Lightning], WH41 [PM2.5], WH51, WH45, WH55
MeteobridgePro(2)[test,prod] 5.8 Mar 01 2024, 15185 - Blake-Larsen Sun Recorder - RPi4/weewx 4.8.0/4.10.2/CumulusMX 3283/Meteobridge RPi4B-2GB(3169)
Barani Meteoshield Pro, MetSpec Rad02 - Ecowitt 5763,34418;WU ISAARB3(WH4000SE),ISAARB22(HP2553), http://meshka.eu

Offline BaseLine

  • Senior Contributor
  • ****
  • Posts: 184
Re: Running WeeWX in a container on a QNAP NAS
« Reply #16 on: September 29, 2022, 10:07:10 AM »
Code: [Select]
cat /var/log/syslog | grep SeasonsReport
No.
Sun cooked nothingburger of climate change hysteria with a side order of peak-oil nonsense fries.

Offline Gyvate

  • Forecaster
  • *****
  • Posts: 3297
Re: Running WeeWX in a container on a QNAP NAS
« Reply #17 on: September 29, 2022, 10:30:20 AM »
do you have a station connected with a respective driver ?
station_type = ? in weewx.conf in the [Station] stanza ?
and what does the stanza station_type points to look like ?
is Seasons activated in the [StdReport] stanza ?
what does the [StdReport] stanza look like ?
WS2350 1.6.7, GW1000(3) 1.7.7,WH2650 WiFi (2) 1.7.7 (test/backup), GW1100 2.3.1, GW2000(3) 3.1.1, HP2551 1.9.5,5.1.5;HP3500 1.7.2,WS3800 1.2.8, WN1910 1.2.3,WN1980 1.2.3;
Ecowitt WS90(2)1.3.5/1.4.0, WS80(2)1.2.5, WS68, WS69, WH40, WH31, WH31-EP, WN30, WN34L, WN35, WH32, WH32-EP, WH32B, WH57 [Lightning], WH41 [PM2.5], WH51, WH45, WH55
MeteobridgePro(2)[test,prod] 5.8 Mar 01 2024, 15185 - Blake-Larsen Sun Recorder - RPi4/weewx 4.8.0/4.10.2/CumulusMX 3283/Meteobridge RPi4B-2GB(3169)
Barani Meteoshield Pro, MetSpec Rad02 - Ecowitt 5763,34418;WU ISAARB3(WH4000SE),ISAARB22(HP2553), http://meshka.eu

Offline BaseLine

  • Senior Contributor
  • ****
  • Posts: 184
Re: Running WeeWX in a container on a QNAP NAS
« Reply #18 on: September 29, 2022, 10:40:05 AM »
> do you have a station connected with a respective driver ?

Yes, "Using GW1000 driver version 0.5.0b5 (user.gw1000)"

> station_type = ? in weewx.conf in the [Station] stanza ?

station_type = GW1000

> and what does the stanza station_type points to look like ?

Code: [Select]
[GW1000]
    # This section is for the Ecowitt Gateway driver.

    # How often to poll the API, default is every 20 seconds:
    poll_interval = 10

    # The driver to use:
    driver = user.gw1000
    ip_address = 192.168.88.76
    port = 45000

> is Seasons activated in the [StdReport] stanza ?

Yes

> what does the [StdReport] stanza look like ?

Code: [Select]
[StdReport]

    # Where the skins reside, relative to WEEWX_ROOT
    SKIN_ROOT = skins

    # Where the generated reports should go, relative to WEEWX_ROOT
    HTML_ROOT = public_html

    # Uncomment and change to override logging for reports
    # log_success = True
    # log_failure = True

    # The database binding indicates which data should be used in reports.
    data_binding = wx_binding

    # 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

and so on. 


Sun cooked nothingburger of climate change hysteria with a side order of peak-oil nonsense fries.

Offline Gyvate

  • Forecaster
  • *****
  • Posts: 3297
Re: Running WeeWX in a container on a QNAP NAS
« Reply #19 on: September 29, 2022, 12:34:35 PM »
1. is weewx running ?
service weewx status
what does it write into the syslog ?
2. what does the weewx startup in syslog look like ? (debug = 1 in weewx.conf)
until first archive cycle (if this ever happens) - syslog for 5- 10 minutes from weewx startup.
3. you can run the Ecowitt Gateway driver (GW1000) stand-alone from the console.
Does it provide readings ?
« Last Edit: September 29, 2022, 12:37:11 PM by Gyvate »
WS2350 1.6.7, GW1000(3) 1.7.7,WH2650 WiFi (2) 1.7.7 (test/backup), GW1100 2.3.1, GW2000(3) 3.1.1, HP2551 1.9.5,5.1.5;HP3500 1.7.2,WS3800 1.2.8, WN1910 1.2.3,WN1980 1.2.3;
Ecowitt WS90(2)1.3.5/1.4.0, WS80(2)1.2.5, WS68, WS69, WH40, WH31, WH31-EP, WN30, WN34L, WN35, WH32, WH32-EP, WH32B, WH57 [Lightning], WH41 [PM2.5], WH51, WH45, WH55
MeteobridgePro(2)[test,prod] 5.8 Mar 01 2024, 15185 - Blake-Larsen Sun Recorder - RPi4/weewx 4.8.0/4.10.2/CumulusMX 3283/Meteobridge RPi4B-2GB(3169)
Barani Meteoshield Pro, MetSpec Rad02 - Ecowitt 5763,34418;WU ISAARB3(WH4000SE),ISAARB22(HP2553), http://meshka.eu

Offline BaseLine

  • Senior Contributor
  • ****
  • Posts: 184
Re: Running WeeWX in a container on a QNAP NAS
« Reply #20 on: September 30, 2022, 06:20:44 AM »
Quote
1. is weewx running ?
service weewx status
what does it write into the syslog ?

Yes,

Status of weewx weather system running

> 2. what does the weewx startup in syslog look like ? (debug = 1 in weewx.conf)

https://pastebin.com/E5RDKxCt

and https://pastebin.com/YtRyNtSB

> until first archive cycle (if this ever happens) - syslog for 5- 10 minutes from weewx startup.

See the previous pastebin link. It's the same.


> 3. you can run the Ecowitt Gateway driver (GW1000) stand-alone from the console.
Does it provide readings ?

Yes, as I have told you before, this is all OK

Quote
$PYTHONPATH=/usr/share/weewx/ python3 -m user.gw1000 --test-driver

Using configuration file /etc/weewx/weewx.conf
debug level is '1'

IP address obtained from station config
Port number obtained from station config
Battery state filtering ('False') using the default
/usr/share/weewx/user/gw1000.py:2780: DeprecationWarning: setDaemon() is deprecated, set the daemon attribute instead
  self.thread.setDaemon(True)
/usr/share/weewx/user/gw1000.py:2781: DeprecationWarning: setName() is deprecated, set the name attribute instead
  self.thread.setName('GatewayCollectorThread')

Interrogating GW2000 at 192.168.88.76:45000

2022-09-30 10:19:09 UTC (1664533149): 'dateTime': '1664533149', 'daymaxwind': '8.8', 'inHumidity': '39', 'inTemp': '23.0', 'luminosity': '37030.0', 'outHumidity': '78', 'outTemp': '11.0', 'p_dayRain': '1.0', 'p_monthRain': '50.1', 'p_rain': 'None', 'p_rainRate': '0.0', 'p_stormRain': '5.6', 'p_weekRain': '5.8', 'p_yearRain': '91.3', 'pressure': '1002.4', 'relbarometer': '1002.4', 'usUnits': '17', 'UV': '2', 'uvradiation': '54.0', 'windDir': '307', 'windGust': '2.2', 'windSpeed': '1.2', 'ws90_batt': '3.16', 'ws90_sig': '4'
Sun cooked nothingburger of climate change hysteria with a side order of peak-oil nonsense fries.

Offline Gyvate

  • Forecaster
  • *****
  • Posts: 3297
Re: Running WeeWX in a container on a QNAP NAS
« Reply #21 on: September 30, 2022, 06:23:28 AM »
what about:
Sep 30 10:00:21 NASO weewx[192] DEBUG weewx.reportengine: Cannot read skin configuration file /home/weewx/skins/Seasons/skin.conf for report 'SeasonsReport': Config file not found: "/home/weewx/skins/Seasons/skin.conf".
Sep 30 10:00:21 NASO weewx[192] DEBUG weewx.reportengine: Cannot read localization file /home/weewx/skins/Seasons/lang/en.conf for report 'SeasonsReport': Config file not found: "/home/weewx/skins/Seasons/lang/en.conf".

Maybe your weewx install was incomplete ...
WS2350 1.6.7, GW1000(3) 1.7.7,WH2650 WiFi (2) 1.7.7 (test/backup), GW1100 2.3.1, GW2000(3) 3.1.1, HP2551 1.9.5,5.1.5;HP3500 1.7.2,WS3800 1.2.8, WN1910 1.2.3,WN1980 1.2.3;
Ecowitt WS90(2)1.3.5/1.4.0, WS80(2)1.2.5, WS68, WS69, WH40, WH31, WH31-EP, WN30, WN34L, WN35, WH32, WH32-EP, WH32B, WH57 [Lightning], WH41 [PM2.5], WH51, WH45, WH55
MeteobridgePro(2)[test,prod] 5.8 Mar 01 2024, 15185 - Blake-Larsen Sun Recorder - RPi4/weewx 4.8.0/4.10.2/CumulusMX 3283/Meteobridge RPi4B-2GB(3169)
Barani Meteoshield Pro, MetSpec Rad02 - Ecowitt 5763,34418;WU ISAARB3(WH4000SE),ISAARB22(HP2553), http://meshka.eu

Offline BaseLine

  • Senior Contributor
  • ****
  • Posts: 184
Re: Running WeeWX in a container on a QNAP NAS
« Reply #22 on: September 30, 2022, 07:04:54 AM »
what about:
Sep 30 10:00:21 NASO weewx[192] DEBUG weewx.reportengine: Cannot read skin configuration file /home/weewx/skins/Seasons/skin.conf for report 'SeasonsReport': Config file not found: "/home/weewx/skins/Seasons/skin.conf".
Sep 30 10:00:21 NASO weewx[192] DEBUG weewx.reportengine: Cannot read localization file /home/weewx/skins/Seasons/lang/en.conf for report 'SeasonsReport': Config file not found: "/home/weewx/skins/Seasons/lang/en.conf".

Maybe your weewx install was incomplete ...

 :-x
This is what I have been going on about.

Quote
Files should show up in /home/weewex/public_html/ but there is nothing there.

I give up. It has become a total waste of my time. I can run this on a VM, if I have to and if I miss few hours of data when NAS is down or I forget to restart the VM, it wont change anything.

Only reason why I wanted to run it in a Docker container, is because containers are started automatically when NAS reboots.

Thanks for your time.
Cheers!
Sun cooked nothingburger of climate change hysteria with a side order of peak-oil nonsense fries.

Offline Gyvate

  • Forecaster
  • *****
  • Posts: 3297
Re: Running WeeWX in a container on a QNAP NAS
« Reply #23 on: September 30, 2022, 07:53:11 AM »
come on - shit happens ...
I can send you the standard Seasons skin directory content in a ZIP attached  8-)
Just copy it/unpack it into /home/weewx/skins/Seasons and it should work

Because it runs perfectly - my 1st install didn't work out either - needed a 2nd one  ;)
« Last Edit: September 30, 2022, 07:57:10 AM by Gyvate »
WS2350 1.6.7, GW1000(3) 1.7.7,WH2650 WiFi (2) 1.7.7 (test/backup), GW1100 2.3.1, GW2000(3) 3.1.1, HP2551 1.9.5,5.1.5;HP3500 1.7.2,WS3800 1.2.8, WN1910 1.2.3,WN1980 1.2.3;
Ecowitt WS90(2)1.3.5/1.4.0, WS80(2)1.2.5, WS68, WS69, WH40, WH31, WH31-EP, WN30, WN34L, WN35, WH32, WH32-EP, WH32B, WH57 [Lightning], WH41 [PM2.5], WH51, WH45, WH55
MeteobridgePro(2)[test,prod] 5.8 Mar 01 2024, 15185 - Blake-Larsen Sun Recorder - RPi4/weewx 4.8.0/4.10.2/CumulusMX 3283/Meteobridge RPi4B-2GB(3169)
Barani Meteoshield Pro, MetSpec Rad02 - Ecowitt 5763,34418;WU ISAARB3(WH4000SE),ISAARB22(HP2553), http://meshka.eu

Offline BaseLine

  • Senior Contributor
  • ****
  • Posts: 184
Re: Running WeeWX in a container on a QNAP NAS
« Reply #24 on: September 30, 2022, 08:22:32 AM »
It seems that the installation process wants to use "tools" that are not available in container environment and craps out without continuing.

For example : nvoke-rc.d: could not determine current runlevel

It's kinda bizarre because much more complicated software can be installed and used. Who ever wrote this installation script for deb, did not bother to test it properly or was just lazy. 
Sun cooked nothingburger of climate change hysteria with a side order of peak-oil nonsense fries.