seems it works :-). Now playing with skins... and soft of live Ajax-based website.
On Tuesday, January 31, 2023 at 5:50:11 PM UTC+1 Jim Munro wrote: > Html pages get generated if I use the simulator. You need to wait for an > archive interval of 5 minutes. There did not seem to be any problem > exporting the public_html to > volumes: > - "./config:/home/weewx/config:rw" > - "./config/public_html:/home/weewx/public_html:rw" > ensure public_html directory has chmod a+x on the docker host and check > after 5 min interval (typical). You should be able to see the webpage on > the localhost > > When configuring for the Vantage there was a problem. The python3-serial > package is not installed on the docker image. You can temporarily install > it with apt update and apt install python3-serial. You can restart the > container from portainer and the > the " No module named 'serial' (<class 'ModuleNotFoundError'>)" should go > away. I didnt have a Vantage station to test with but it looks like the > driver times out after 4 tries. You can also try setting debug to 1 in the > weewx.conf file for a bit more info in the log. > > Hope that helps. > > > On Monday, January 30, 2023 at 10:47:33 a.m. UTC-5 [email protected] wrote: > >> >> >> I am playing with the Weewx (https://github.com/martinwiest/WeeWX-Docker) >> distribution and since I am a sort of stuck I hope someone can help me. >> >> The issues I am facing: >> 1. HTML pages are not generates (except I force this through >> ./wee_reports ../weewx.conf >> 2. For some reason I can’t link the Public_HTML directory as volume @ >> local FS (docker-compose.yml : - >> "/home/weewx/public_html/:home/weewx/public_html/“) >> >> >> The steps I followed: >> >> 1. Create docker-compose.yml file. >> >> docker-compose.yml * >> version: '3.3' >> services: >> weewx: >> image: "martinwiest/weewx" >> container_name: weewx >> restart: always >> ports: >> - "80:80" >> volumes: >> - "./config:/home/weewx/config:rw" >> devices: >> - "/dev/ttyUSB0:/dev/ttyUSB0" >> environment: >> - TZ=Europe/Amsterdam >> - WEEWX_UID=weewx >> - WEEWX_GID=dialout >> - DEVICE_PORT=/dev/ttyUSB0 >> - WEEK_START=6 >> >> >> *NOTE:* >> 1) Tried to add @ Volumes - >> “./config/public_html:/home/weewx/public_html:rw” >> That doesn’t work. Is there a way to export this to the local File System? >> >> >> Install: >> >> *pi@raspberrypi:/home/weewx $ docker-compose up -d* >> Pulling weewx (martinwiest/weewx:)... >> latest: Pulling from martinwiest/weewx >> dc1f00a5d701: Pull complete >> cfeb1af30280: Pull complete >> 8b393d1865ed: Pull complete >> 0e1c4d45c50e: Pull complete >> 3b5fbcc85c0d: Pull complete >> 05bbe9de3bca: Pull complete >> dd2f8b247cea: Pull complete >> 2ba4ca8686bf: Pull complete >> a6635ba84832: Pull complete >> cdec713ae15f: Pull complete >> Digest: >> sha256:a6e7a45977e8e865a15c13aef8be1b58585c84db109d035a2e7bb9ac8a674543 >> Status: Downloaded newer image for martinwiest/weewx:latest >> Creating weewx ... done >> *pi@raspberrypi:/home/weewx $* >> >> >> >> *pi@raspberrypi:/home/weewx $ docker ps* >> CONTAINER ID IMAGE COMMAND >> CREATED STATUS PORTS >> NAMES >> 54ab9b7de7cc martinwiest/weewx "/docker-entrypoint.…" >> 41 seconds ago Up 25 seconds 0.0.0.0:80->80/tcp, :::80->80/tcp >> weewx >> >> >> *pi@raspberrypi:/home/weewx/config $ ls* >> archive plugins skins user weewx.log >> *pi@raspberrypi:/home/weewx/config $ more weewx.log* >> Jan 30 15:16:46 54ab9b7de7cc syslog.info syslogd started: BusyBox v1.30.1 >> Jan 30 15:16:46 54ab9b7de7cc user.info weewx[39] INFO __main__: >> Initializing weewx version 4.8.0 >> Jan 30 15:16:46 54ab9b7de7cc user.info weewx[39] INFO __main__: Using >> Python 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110] >> Jan 30 15:16:46 54ab9b7de7cc user.info weewx[39] INFO __main__: Platform >> Linux-5.15.84-v8+-aarch64-with-glibc2.31 >> Jan 30 15:16:46 54ab9b7de7cc user.info weewx[39] INFO __main__: Locale >> is >> 'LC_CTYPE=C.UTF-8;LC_NUMERIC=C;LC_TIME=C;LC_COLLATE=C;LC_MONETARY=C;LC_MESSAGES=C;LC_PAPER=C;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=C;LC_IDENTIFICATION=C' >> Jan 30 15:16:46 54ab9b7de7cc user.info weewx[39] INFO __main__: Using >> configuration file /home/weewx/weewx.conf >> Jan 30 15:16:46 54ab9b7de7cc user.info weewx[39] INFO __main__: Debug is >> 0 >> Jan 30 15:16:46 54ab9b7de7cc user.info weewx[39] INFO __main__: PID file >> is /var/run/weewx.pid >> Jan 30 15:16:46 54ab9b7de7cc user.info weewx[42] INFO weewx.engine: >> Loading station type Simulator (weewx.drivers.simulator) >> Jan 30 15:16:46 54ab9b7de7cc user.info weewx[42] INFO weewx.engine: >> StdConvert target unit is 0x1 >> Jan 30 15:16:46 54ab9b7de7cc user.info weewx[42] INFO weewx.wxservices: >> StdWXCalculate will use data binding wx_binding >> Jan 30 15:16:47 54ab9b7de7cc user.info weewx[42] INFO weewx.engine: >> Archive will use data binding wx_binding >> Jan 30 15:16:47 54ab9b7de7cc user.info weewx[42] INFO weewx.engine: >> Record generation will be attempted in 'hardware' >> Jan 30 15:16:47 54ab9b7de7cc user.info weewx[42] INFO weewx.engine: >> Using archive interval of 300 seconds (specified in weewx configuration) >> Jan 30 15:16:47 54ab9b7de7cc user.info weewx[42] INFO weewx.restx: >> StationRegistry: Registration not requested. >> Jan 30 15:16:47 54ab9b7de7cc user.info weewx[42] INFO weewx.restx: >> Wunderground: Posting not enabled. >> Jan 30 15:16:47 54ab9b7de7cc user.info weewx[42] INFO weewx.restx: >> PWSweather: Posting not enabled. >> Jan 30 15:16:47 54ab9b7de7cc user.info weewx[42] INFO weewx.restx: CWOP: >> Posting not enabled. >> Jan 30 15:16:47 54ab9b7de7cc user.info weewx[42] INFO weewx.restx: WOW: >> Posting not enabled. >> Jan 30 15:16:47 54ab9b7de7cc user.info weewx[42] INFO weewx.restx: >> AWEKAS: Posting not enabled. >> Jan 30 15:16:47 54ab9b7de7cc user.info weewx[42] INFO weewx.engine: >> 'pyephem' detected, extended almanac data is available >> Jan 30 15:16:47 54ab9b7de7cc user.info weewx[42] INFO __main__: Starting >> up weewx version 4.8.0 >> Jan 30 15:16:47 54ab9b7de7cc user.info weewx[42] INFO weewx.engine: >> Clock error is -0.19 seconds (positive is fast) >> Jan 30 15:16:47 54ab9b7de7cc user.info weewx[42] INFO weewx.engine: >> Using binding 'wx_binding' to database 'weewx.sdb' >> Jan 30 15:16:47 54ab9b7de7cc user.info weewx[42] INFO weewx.manager: >> Starting backfill of daily summaries >> Jan 30 15:16:47 54ab9b7de7cc user.info weewx[42] INFO weewx.manager: >> Daily summaries up to date >> Jan 30 15:16:47 54ab9b7de7cc user.info weewx[42] INFO weewx.engine: >> Starting main packet loop. >> >> >> At this moment http://<localhost>:80 gives a forbidden error. >> >> >> *Entering Container:* >> *pi@raspberrypi:/home/weewx $ docker exec -it weewx /bin/bash* >> >> *root@54ab9b7de7cc:/home/weewx/bin# pwd* >> /home/weewx/bin >> r*oot@54ab9b7de7cc:/home/weewx/bin# ./wee_reports ../weewx.conf* >> Using configuration file ../weewx.conf >> Generating for all time >> *root@54ab9b7de7cc:/home/weewx/bin#* >> >> At this moment http://<localhost>:80 gives the simulation page. >> >> >> Testing output: >> *root@54ab9b7de7cc:/home/weewx/bin# weewxd* >> LOOP: 2023-01-30 15:22:18 CET (1675088538) 'altimeter': >> '31.891835984821956', 'appTemp': '28.46010918752483', 'barometer': >> '31.099999998967093', 'cloudbase': '1944.323176426526', >> 'consBatteryVoltage': '12.727596736221205', 'dateTime': '1675088538', >> 'dewpoint': '27.203560993945757', 'ET': 'None', 'heatindex': >> '32.67858297022247', 'heatingVoltage': '11.501478543612714', 'humidex': >> '32.67858297022247', 'inDewpoint': '31.079533828013187', 'inHumidity': >> '29.999999958683617', 'inTemp': '63.00000002065819', 'inTempBatteryStatus': >> '0', 'maxSolarRad': '867.1336258327194', 'outHumidity': >> '79.99999996901272', 'outTemp': '32.67858297022247', >> 'outTempBatteryStatus': '0', 'pressure': '31.099999998967093', 'radiation': >> '403.45358657837164', 'rain': '0', 'rainBatteryStatus': '0', 'rainRate': >> '0.0', 'referenceVoltage': '12.412400390215923', 'rxCheckPercent': >> '27.260980524942426', 'supplyVoltage': '12.545640335546153', >> 'txBatteryStatus': '0', 'usUnits': '1', 'UV': '5.648350212097204', >> 'windBatteryStatus': '0', 'windchill': '32.67858297022247', 'windDir': >> '359.9999998140763', 'windGust': '6.197456769996279e-09', 'windGustDir': >> '359.9999998140763', 'windrun': 'None', 'windSpeed': '5.164547900449179e-09' >> LOOP: 2023-01-30 15:22:20 CET (1675088540) 'altimeter': >> '31.89183597638835', 'appTemp': '28.45807365032865', 'barometer': >> '31.099999990703814', 'cloudbase': '1944.3127063099937', >> 'consBatteryVoltage': '13.162200203988899', 'dateTime': '1675088540', >> 'dewpoint': '27.20178958368346', 'ET': 'None', 'heatindex': >> '32.67676549144743', 'heatingVoltage': '12.0', 'humidex': >> '32.67676549144743', 'inDewpoint': '31.07953369929752', 'inHumidity': >> '29.999999628152565', 'inTemp': '63.00000018592372', 'inTempBatteryStatus': >> '0', 'maxSolarRad': '867.0325553120347', 'outHumidity': >> '79.99999972111442', 'outTemp': '32.67676549144743', >> 'outTempBatteryStatus': '0', 'pressure': '31.099999990703814', 'radiation': >> '403.31088374704626', 'rain': '0', 'rainBatteryStatus': '0', 'rainRate': >> '0.0', 'referenceVoltage': '12.0', 'rxCheckPercent': '27.260980524942426', >> 'supplyVoltage': '10.967425046402347', 'txBatteryStatus': '0', 'usUnits': >> '1', 'UV': '5.646352372458647', 'windBatteryStatus': '0', 'windchill': >> '32.67676549144743', 'windDir': '359.9999983266865', 'windGust': >> '5.577711537085861e-08', 'windGustDir': '359.9999983266865', 'windrun': >> 'None', 'windSpeed': '4.648092932768577e-08’ >> >> >> >> Updating weewx.conf file / wee_config >> >> *Using configuration file /home/weewx/weewx.conf* >> Enter a brief description of the station, such as its location. For >> example: >> Santa's Workshop, North Pole >> description [My Little Town, Oregon]: Test Station Joche >> >> Specify altitude, with units 'foot' or 'meter'. For example: >> 35, foot >> 12, meter >> altitude [700, foot]: 10, meter >> >> Specify latitude in decimal degrees, negative for south. >> latitude [0.00]: >> Specify longitude in decimal degrees, negative for west. >> longitude [0.00]: >> >> You can register your station on weewx.com, where it will be included >> in a map. You will need a unique URL to identify your station (such as a >> website, or WeatherUnderground link). >> Include station in the station registry (y/n)? [n]: n >> >> Indicate the preferred units for display: ['us', 'metric', 'metricwx'] >> unit system [us]: metric >> >> Installed drivers include: >> 0) AcuRite (weewx.drivers.acurite) >> 1) ? (weewx.drivers.cc3000) No module named 'serial' >> 2) FineOffsetUSB (weewx.drivers.fousb) >> 3) Simulator (weewx.drivers.simulator) >> 4) TE923 (weewx.drivers.te923) >> 5) ? (weewx.drivers.ultimeter) No module named 'serial' >> 6) Vantage (weewx.drivers.vantage) >> 7) WMR100 (weewx.drivers.wmr100) >> 8) WMR300 (weewx.drivers.wmr300) >> 9) ? (weewx.drivers.wmr9x8) No module named 'serial' >> 10) WS1 (weewx.drivers.ws1) >> 11) WS23xx (weewx.drivers.ws23xx) >> 12) WS28xx (weewx.drivers.ws28xx) >> choose a driver [3]: 6 >> Specify the hardware interface, either 'serial' or 'ethernet'. >> If the station is connected by serial, USB, or serial-to-USB >> adapter, specify serial. Specify ethernet for stations with >> WeatherLinkIP interface. >> type [serial]: >> Specify a port for stations with a serial interface, for >> example /dev/ttyUSB0 or /dev/ttyS0. >> port [/dev/ttyUSB0]: >> Saved backup to /home/weewx/weewx.conf.20230130160509 >> >> Copy to weewx.conf to config directory (shared volume): >> *root@54ab9b7de7cc:/home/weewx# cp weewx.conf config/.* >> >> >> Check if new website will be generated on basis of the weatherstation >> (Vantage) >> *root@54ab9b7de7cc:/home/weewx/bin# ./wee_reports ../weewx.conf* >> Using configuration file ../weewx.conf >> Generating for all time >> >> .. >> >> This works — but after 5 minutes the info comes from the Simulator >> — >> >> Decided to restart the container. >> *pi@raspberrypi:/home/weewx $ sudo docker-compose stop* >> Stopping weewx ... done >> >> Start: >> *pi@raspberrypi:/home/weewx $ sudo docker-compose up -d* >> Starting weewx ... done >> *pi@raspberrypi:/home/weewx $* >> >> *pi@raspberrypi:/home/weewx $ docker ps* >> CONTAINER ID IMAGE COMMAND >> CREATED STATUS PORTS >> NAMES >> 54ab9b7de7cc martinwiest/weewx "/docker-entrypoint.…" >> 58 minutes ago Up 18 seconds 0.0.0.0:80->80/tcp, :::80->80/tcp >> weewx >> >> >> Nothing happens… >> >> Checking LOG FILE: >> >> *pi@raspberrypi:/home/weewx/config $ tail -30 weewx.log* >> Jan 30 16:06:33 54ab9b7de7cc user.info wee_reports[118] INFO >> weewx.reportengine: Copied 5 files to /home/weewx/public_html >> Jan 30 16:10:17 54ab9b7de7cc user.info weewx[42] INFO weewx.manager: >> Added record 2023-01-30 16:10:00 CET (1675091400) to database 'weewx.sdb' >> Jan 30 16:10:17 54ab9b7de7cc user.info weewx[42] INFO weewx.manager: >> Added record 2023-01-30 16:10:00 CET (1675091400) to daily summary in >> 'weewx.sdb' >> Jan 30 16:10:18 54ab9b7de7cc user.info weewx[42] INFO >> weewx.cheetahgenerator: Generated 8 files for report SeasonsReport in 1.09 >> seconds >> Jan 30 16:10:18 54ab9b7de7cc user.info weewx[42] INFO >> weewx.imagegenerator: Generated 15 images for report SeasonsReport in 0.58 >> seconds >> Jan 30 16:10:18 54ab9b7de7cc user.info weewx[42] INFO >> weewx.reportengine: Copied 0 files to /home/weewx/public_html >> Jan 30 16:14:17 54ab9b7de7cc syslog.info syslogd started: BusyBox v1.30.1 >> Jan 30 16:14:18 54ab9b7de7cc user.info weewx[34] INFO __main__: >> Initializing weewx version 4.8.0 >> Jan 30 16:14:18 54ab9b7de7cc user.info weewx[34] INFO __main__: Using >> Python 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110] >> Jan 30 16:14:18 54ab9b7de7cc user.info weewx[34] INFO __main__: Platform >> Linux-5.15.84-v8+-aarch64-with-glibc2.31 >> Jan 30 16:14:18 54ab9b7de7cc user.info weewx[34] INFO __main__: Locale >> is >> 'LC_CTYPE=C.UTF-8;LC_NUMERIC=C;LC_TIME=C;LC_COLLATE=C;LC_MONETARY=C;LC_MESSAGES=C;LC_PAPER=C;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=C;LC_IDENTIFICATION=C' >> Jan 30 16:14:18 54ab9b7de7cc user.info weewx[34] INFO __main__: Using >> configuration file /home/weewx/weewx.conf >> Jan 30 16:14:18 54ab9b7de7cc user.info weewx[34] INFO __main__: Debug is >> 0 >> Jan 30 16:14:18 54ab9b7de7cc user.info weewx[34] INFO __main__: PID file >> is /var/run/weewx.pid >> Jan 30 16:14:18 54ab9b7de7cc user.info weewx[37] INFO weewx.engine: >> Loading station type Vantage (weewx.drivers.vantage) >> Jan 30 16:14:18 54ab9b7de7cc user.err weewx[37] ERROR weewx.engine: >> Import of driver failed: No module named 'serial' (<class >> 'ModuleNotFoundError'>) >> Jan 30 16:14:18 54ab9b7de7cc user.crit weewx[37] CRITICAL weewx.engine: >> **** Traceback (most recent call last): >> Jan 30 16:14:18 54ab9b7de7cc user.crit weewx[37] CRITICAL weewx.engine: >> **** File "/home/weewx/bin/weewx/engine.py", line 119, in setupStation >> Jan 30 16:14:18 54ab9b7de7cc user.crit weewx[37] CRITICAL weewx.engine: >> **** self.console = loader_function(config_dict, self) >> Jan 30 16:14:18 54ab9b7de7cc user.crit weewx[37] CRITICAL weewx.engine: >> **** File "/home/weewx/bin/weewx/drivers/vantage.py", line 40, in >> loader >> Jan 30 16:14:18 54ab9b7de7cc user.crit weewx[37] CRITICAL weewx.engine: >> **** return VantageService(engine, config_dict) >> Jan 30 16:14:18 54ab9b7de7cc user.crit weewx[37] CRITICAL weewx.engine: >> **** File "/home/weewx/bin/weewx/drivers/vantage.py", line 1916, in >> __init__ >> Jan 30 16:14:18 54ab9b7de7cc user.crit weewx[37] CRITICAL weewx.engine: >> **** Vantage.__init__(self, **config_dict[DRIVER_NAME]) >> Jan 30 16:14:18 54ab9b7de7cc user.crit weewx[37] CRITICAL weewx.engine: >> **** File "/home/weewx/bin/weewx/drivers/vantage.py", line 514, in >> __init__ >> Jan 30 16:14:18 54ab9b7de7cc user.crit weewx[37] CRITICAL weewx.engine: >> **** self.port.openPort() >> Jan 30 16:14:18 54ab9b7de7cc user.crit weewx[37] CRITICAL weewx.engine: >> **** File "/home/weewx/bin/weewx/drivers/vantage.py", line 307, in >> openPort >> Jan 30 16:14:18 54ab9b7de7cc user.crit weewx[37] CRITICAL weewx.engine: >> **** import serial >> Jan 30 16:14:18 54ab9b7de7cc user.crit weewx[37] CRITICAL weewx.engine: >> **** ModuleNotFoundError: No module named 'serial' >> Jan 30 16:14:18 54ab9b7de7cc user.crit weewx[37] CRITICAL __main__: >> Unable to load driver: No module named 'serial' >> Jan 30 16:14:18 54ab9b7de7cc user.crit weewx[37] CRITICAL __main__: >> **** Exiting… >> >> >> *Seems an error…* >> >> I added: >> *pi@raspberrypi:/home/weewx/config/plugins $ ls -lart* >> total 1548 >> -rw-r--r-- 1 root root 1426893 Jan 30 12:32 vantage.py >> drwxr-xr-x 2 root root 4096 Jan 30 12:33 . >> -rw-r--r-- 1 root root 145582 Jan 30 12:33 vantage.rules >> drwxr-xr-x 6 weewx root 4096 Jan 30 16:13 .. >> >> But no succes. >> >> What is going wrong? >> Thanks. >> > -- 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]. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/a4aea0fc-a0a2-4807-9a2a-bb8d0aadf3cdn%40googlegroups.com.
