WDC Skin

779 views
Skip to first unread message

David Bätge

unread,
May 14, 2022, 7:13:39 AMMay 14
to weewx-user
Hi guys!

I just wanted to do some advertisement for a new weewx Skin, I developed: https://github.com/Daveiano/weewx-wdc

The visual part is based on another weather app, I wrote earlier this year: https://daveiano.github.io/weather-data-center/

Please feel free to check it out, a working demo is hosted here: https://www.weewx-hbt.de/

Key features included:
- Clear and beautiful UI thanks to IBM Carbon and nivo
- Configurable Statistic Tiles and Diagram tiles
- Combinable diagrams via skin.conf
- Responsive
- Day, week, month, year and all-time pages
- Archive and NOAA Reports
- Almanac
- Translated for DE and EN
- Tabular representation with Carbon Data Tables

I consider the skin as feature-complete but I will do some updates in the coming weeks to optimize some things like responsiveness or perhaps add some more statistics.

I am a software developer but I never worked with python before. I have been looking for an opportunity to work with python for a long time, so working with weewx and creating a skin did that for me. I am really caught by how things work together in weewx, a great piece of software.

f4n...@gmail.com

unread,
May 26, 2022, 6:04:58 AMMay 26
to weewx-user
Thanks a lot for this skin (and the weather data visualizing app), looks very clean! 

Is it possible to set custom values for font and graph size, amount of rows and border size so everything including graphs could be made visible at a glance without or less scrolling?

Any chance for a web version of the weather data center, so one could publish the visualized csv's to the web? Or even comibne it with weewx live data in one page? Just a thought

David Bätge

unread,
May 26, 2022, 8:49:31 AMMay 26
to weewx-user
Thank you for your feedback, very appreciated!

Is it possible to set custom values for font and graph size, amount of rows and border size so everything including graphs could be made visible at a glance without or less scrolling?
Currently, this is not possible. The skin uses the IBM Carbon Design System, so these values are more or less predefined. But you are right, using the space and layouting all the graphs were one of the most challenging parts of this. I am also not yet 100% happy with it. Perhaps I could predefine some "Spacing variations", like a dense one and a wide one for example.

Any chance for a web version of the weather data center, so one could publish the visualized csv's to the web? Or even comibne it with weewx live data in one page? Just a thought
Do you mean like an export Button on the Desktop Application to export all data as HTML pages? Well you can also use the WDC Skin with weewx and import all data to weewx via csv, generate the report and there you go ;)

tarob...@gmail.com

unread,
May 27, 2022, 8:30:21 AMMay 27
to weewx-user
Trying to install from zip (also tried from tar.gz) and getting the following:

"sudo wee_extension --install=weewx-wdc.zip
Request to install 'weewx-wdc.zip'
Extracting from zip archive weewx-wdc.zip
Traceback (most recent call last):
  File "/usr/share/weewx/wee_extension", line 92, in <module>
    main()
  File "/usr/share/weewx/wee_extension", line 84, in main
    ext.install_extension(options.install)
  File "/usr/share/weewx/weecfg/extension.py", line 130, in install_extension
    self.install_from_dir(extension_dir)
  File "/usr/share/weewx/weecfg/extension.py", line 183, in install_from_dir
    shutil.copy(source_path, destination_path)
  File "/usr/lib/python3.7/shutil.py", line 245, in copy
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/usr/lib/python3.7/shutil.py", line 120, in copyfile
    with open(src, 'rb') as fsrc:
FileNotFoundError: [Errno 2] No such file or directory: '/var/tmp/weewx-wdc-1.2.0/skins/weewx-wdc/service-worker.js'
"

I can see the service-worker.js is located in a different directory than where the install is looking. It is located "weewx-wdc-1.2.0\skins\weewx-wdc\src\js\service-worker.js"

David Bätge

unread,
May 27, 2022, 5:31:53 PMMay 27
to weewx-user
The file location is correct, but you need to use the .zip which is attached to a release.

The latest release is v1.2.0, the download path for the zip is https://github.com/Daveiano/weewx-wdc/releases/download/v1.2.0/weewx-wdc-v1.2.0.zip
Release page is here: https://github.com/Daveiano/weewx-wdc/releases/tag/v1.2.0 (its the first linked zip)

Background: The files in the src/ directory are the Source files (TypeScript, SCSS). When creating a release, the source files get transformed and optimized, the output location of these transformed files is the location from the install.py. The release.zip should contain all these transformed files (like service-worker.js), but if you download the current state of the repo, these files are not included, hence the error. 

Please let me know if this helps and solves the problem, I will also add a notice about it on the readme page.

tarob...@gmail.com

unread,
May 27, 2022, 8:19:15 PMMay 27
to weewx-user
Got it working. I see it can't install from zip. Need to extract to directory and install from that location. Thank you.

David Bätge

unread,
May 27, 2022, 8:25:38 PMMay 27
to weewx-user
Yes, that's correct, I think weewx wants the zip to contain only one folder which contains the whole extension. (if you want to directly install from zip without the "extract to folder" step)

Glad I could help you!

tarob...@gmail.com

unread,
May 28, 2022, 12:38:07 PMMay 28
to weewx-user
The skin displays but there are quite a bit of errors (see below).

May 28 12:35:16 raspberrypi weewx[8931] INFO weewx.manager: Added record 2022-05-28 12:35:00 EDT (1653755700) to database 'weewx.sdb'
May 28 12:35:16 raspberrypi weewx[8931] INFO weewx.manager: Added record 2022-05-28 12:35:00 EDT (1653755700) to daily summary in 'weewx.sdb'
May 28 12:35:20 raspberrypi weewx[8931] INFO weewx.cheetahgenerator: Generated 8 files for report SeasonsReport in 1.54 seconds
May 28 12:35:21 raspberrypi weewx[8931] INFO weewx.imagegenerator: Generated 15 images for report SeasonsReport in 0.95 seconds
May 28 12:35:21 raspberrypi weewx[8931] INFO weewx.reportengine: Copied 0 files to /var/www/html/weewx
May 28 12:35:23 raspberrypi weewx[8931] ERROR weewx.cheetahgenerator: Evaluation of template /etc/weewx/skins/weewx-wdc/year-%Y.html.tmpl failed with exception '<class 'TypeError'>'
May 28 12:35:23 raspberrypi weewx[8931] ERROR weewx.cheetahgenerator: **** Ignoring template /etc/weewx/skins/weewx-wdc/year-%Y.html.tmpl
May 28 12:35:23 raspberrypi weewx[8931] ERROR weewx.cheetahgenerator: **** Reason: '>=' not supported between instances of 'NoneType' and 'float'
May 28 12:35:23 raspberrypi weewx[8931] ERROR weewx.cheetahgenerator: ****  Traceback (most recent call last):
May 28 12:35:23 raspberrypi weewx[8931] ERROR weewx.cheetahgenerator: ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 348, in generate
May 28 12:35:23 raspberrypi weewx[8931] ERROR weewx.cheetahgenerator: ****      unicode_string = compiled_template.respond()
May 28 12:35:23 raspberrypi weewx[8931] ERROR weewx.cheetahgenerator: ****    File "_etc_weewx_skins_weewx_wdc_year__Y_html_tmpl.py", line 183, in respond
May 28 12:35:23 raspberrypi weewx[8931] ERROR weewx.cheetahgenerator: ****    File "/usr/lib/python3/dist-packages/Cheetah/Template.py", line 1707, in _handleCheetahInclude
May 28 12:35:23 raspberrypi weewx[8931] ERROR weewx.cheetahgenerator: ****      self._CHEETAH__cheetahIncludes[_includeID].respond(trans)
May 28 12:35:23 raspberrypi weewx[8931] ERROR weewx.cheetahgenerator: ****    File "_etc_weewx_skins_weewx_wdc_includes_climatological_days_inc.py", line 277, in respond
May 28 12:35:23 raspberrypi weewx[8931] ERROR weewx.cheetahgenerator: ****    File "_etc_weewx_skins_weewx_wdc_includes_climatological_days_inc.py", line 106, in __errorCatcher6
May 28 12:35:23 raspberrypi weewx[8931] ERROR weewx.cheetahgenerator: ****    File "<string>", line 1, in <module>
May 28 12:35:23 raspberrypi weewx[8931] ERROR weewx.cheetahgenerator: ****    File "/usr/share/weewx/user/stats_util.py", line 175, in get_climatological_day
May 28 12:35:23 raspberrypi weewx[8931] ERROR weewx.cheetahgenerator: ****      return len(list(days))
May 28 12:35:23 raspberrypi weewx[8931] ERROR weewx.cheetahgenerator: ****    File "/usr/share/weewx/user/stats_util.py", line 173, in <lambda>
May 28 12:35:23 raspberrypi weewx[8931] ERROR weewx.cheetahgenerator: ****      days = filter(lambda x: x.raw >= value, list(day_series.data))
May 28 12:35:23 raspberrypi weewx[8931] ERROR weewx.cheetahgenerator: ****  TypeError: '>=' not supported between instances of 'NoneType' and 'float'
May 28 12:35:35 raspberrypi weewx[8931] ERROR weewx.cheetahgenerator: Evaluation of template /etc/weewx/skins/weewx-wdc/statistics.html.tmpl failed with exception '<class 'TypeError'>'
May 28 12:35:35 raspberrypi weewx[8931] ERROR weewx.cheetahgenerator: **** Ignoring template /etc/weewx/skins/weewx-wdc/statistics.html.tmpl
May 28 12:35:35 raspberrypi weewx[8931] ERROR weewx.cheetahgenerator: **** Reason: '>=' not supported between instances of 'NoneType' and 'float'
May 28 12:35:35 raspberrypi weewx[8931] ERROR weewx.cheetahgenerator: ****  Traceback (most recent call last):
May 28 12:35:35 raspberrypi weewx[8931] ERROR weewx.cheetahgenerator: ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 348, in generate
May 28 12:35:35 raspberrypi weewx[8931] ERROR weewx.cheetahgenerator: ****      unicode_string = compiled_template.respond()
May 28 12:35:35 raspberrypi weewx[8931] ERROR weewx.cheetahgenerator: ****    File "_etc_weewx_skins_weewx_wdc_statistics_html_tmpl.py", line 191, in respond
May 28 12:35:35 raspberrypi weewx[8931] ERROR weewx.cheetahgenerator: ****    File "/usr/lib/python3/dist-packages/Cheetah/Template.py", line 1707, in _handleCheetahInclude
May 28 12:35:35 raspberrypi weewx[8931] ERROR weewx.cheetahgenerator: ****      self._CHEETAH__cheetahIncludes[_includeID].respond(trans)
May 28 12:35:35 raspberrypi weewx[8931] ERROR weewx.cheetahgenerator: ****    File "_etc_weewx_skins_weewx_wdc_includes_climatological_days_inc.py", line 277, in respond
May 28 12:35:35 raspberrypi weewx[8931] ERROR weewx.cheetahgenerator: ****    File "_etc_weewx_skins_weewx_wdc_includes_climatological_days_inc.py", line 106, in __errorCatcher6
May 28 12:35:35 raspberrypi weewx[8931] ERROR weewx.cheetahgenerator: ****    File "<string>", line 1, in <module>
May 28 12:35:35 raspberrypi weewx[8931] ERROR weewx.cheetahgenerator: ****    File "/usr/share/weewx/user/stats_util.py", line 175, in get_climatological_day
May 28 12:35:35 raspberrypi weewx[8931] ERROR weewx.cheetahgenerator: ****      return len(list(days))
May 28 12:35:35 raspberrypi weewx[8931] ERROR weewx.cheetahgenerator: ****    File "/usr/share/weewx/user/stats_util.py", line 173, in <lambda>
May 28 12:35:35 raspberrypi weewx[8931] ERROR weewx.cheetahgenerator: ****      days = filter(lambda x: x.raw >= value, list(day_series.data))
May 28 12:35:35 raspberrypi weewx[8931] ERROR weewx.cheetahgenerator: ****  TypeError: '>=' not supported between instances of 'NoneType' and 'float'
May 28 12:35:35 raspberrypi weewx[8931] INFO weewx.cheetahgenerator: Generated 9 files for report WdcReport in 14.05 seconds
May 28 12:35:35 raspberrypi weewx[8931] INFO weewx.reportengine: Copied 0 files to /var/www/html/weewx/wdc

David Bätge

unread,
May 28, 2022, 2:54:15 PMMay 28
to weewx-user
From the logs, it looks like there are some temperature values missing in your database (that's where the NoneType came from). Like your station stopped working for 2 or 3 days!?
I added a check to address this issue. Could you please replace /usr/share/weewx/user/stats_util.py with the attached stats_util.py?

Any chance I could get a copy of your weewx database to test and verify this?

For reference: I also added a issue on GH for this: https://github.com/Daveiano/weewx-wdc/issues/9
stats_util.py

Troy Roberts

unread,
May 29, 2022, 12:05:45 PMMay 29
to weewx...@googlegroups.com
I'm testing this on my "Test" weewx on a 2nd raspberry pi. It's running in simulation mode so I don't think there are any missing values. If you still need the db let me know.

Troy

--
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/sDK4kzO4vBw/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/8016299e-8795-4847-b29f-b7aaa2260252n%40googlegroups.com.

David Bätge

unread,
May 29, 2022, 5:12:21 PMMay 29
to weewx-user
Oh ok, in that case, if you could post your weewx.conf, that's enough I think. Thank you very much!

Troy Roberts

unread,
May 29, 2022, 5:28:53 PMMay 29
to weewx...@googlegroups.com
weewx.conf

David Bätge

unread,
May 29, 2022, 8:13:16 PMMay 29
to weewx-user
Ok, I ran the skin successfully with the Simulator driver for a few hours. Curious about what happens if I stop weewx for some days and then restart it, the driver should resume producing data with the current date/time. But in the meantime there is missing data, I guess.


Would be great to get the DB, would save me some time trying things out :)

Troy Roberts

unread,
May 30, 2022, 6:53:56 AMMay 30
to weewx...@googlegroups.com
Shared the db via drive. Haven't tried the updated stats but will let you know when I do.

David Bätge

unread,
May 30, 2022, 11:16:10 AMMay 30
to weewx-user
Thank you very much!

I was able to reproduce the issue you described. It was like I said, due to missing data (days without any values). I will include a Bugfix for this in the next release. Attached is an updated stats_util.py.

Again - Thank you very much. Every feedback is appreciated!

stats_util.py

Troy Roberts

unread,
May 30, 2022, 1:34:33 PMMay 30
to weewx...@googlegroups.com
It's working without errors. Thanks again!

f4n...@gmail.com

unread,
May 31, 2022, 8:45:52 AMMay 31
to weewx-user
Currently, this is not possible. The skin uses the IBM Carbon Design System, so these values are more or less predefined. But you are right, using the space and layouting all the graphs were one of the most challenging parts of this. I am also not yet 100% happy with it. Perhaps I could predefine some "Spacing variations", like a dense one and a wide one for example.

So the spacing can be predefined, but not the graph and font on the cards/tiles size?  If so, yeah maybe you can do something with the spacing or the possibility to move "current weather conditions" into the left menu like sort of a widget, but to only show the graphs in the content area or the possibility to prioritize them. As an optional skin setting for example. But if they could in any way be made as small as the ones in the new bootstrap skin "fuzzy-archer 3.0" this would be amazing. If you two could ever mix up your skins, this would probably be the most functional and clear skin ever :) 

These are just suggestions though, I know tastes are different, but imo weewx stil lacks an interactive alternative or version of the very clear seasons skin where nearly all values and graphs are visible at a glance. I just like to zoom in if needed, instead of scrolling.

Do you mean like an export Button on the Desktop Application to export all data as HTML pages? Well you can also use the WDC Skin with weewx and import all data to weewx via csv, generate the report and there you go ;)

Well, true, nearly forgot about that option. That way, a custom menu entry in the WDC Skin to e.g. station info/news content would be the icing on the cake :)

David Bätge

unread,
May 31, 2022, 7:08:26 PMMay 31
to weewx-user
So the spacing can be predefined, but not the graph and font on the cards/tiles size?  If so, yeah maybe you can do something with the spacing or the possibility to move "current weather conditions" into the left menu like sort of a widget, but to only show the graphs in the content area or the possibility to prioritize them. As an optional skin setting for example. But if they could in any way be made as small as the ones in the new bootstrap skin "fuzzy-archer 3.0" this would be amazing. If you two could ever mix up your skins, this would probably be the most functional and clear skin ever :) 
In theory, you can change everything. But I would like to stick with the values (spacing, sizes, etc) the Design System provides. Yes, I had the same idea: Provide a config to enable a "more weewx like layout". This would be like you said: Current conditions on the left and graphs on the right. One could then switch between a "Classic" and "Alternative" Layout via skin.conf.
I had a look at fuzzy-archer 3.0, cool skin!

Well, true, nearly forgot about that option. That way, a custom menu entry in the WDC Skin to e.g. station info/news content would be the icing on the cake :)
You mean station info/news content as a configurable menu link to let the user link to any generated Blog/News/whatever page, right?

Thank you for all these suggestions and feedback! I really like the idea of an Classic/Alternative Layout switch, btw :)

f4n...@gmail.com

unread,
Jun 3, 2022, 10:38:06 AMJun 3
to weewx-user
Thank you for all these suggestions and feedback! I really like the idea of an Classic/Alternative Layout switch, btw :)

Glad you like my feedback and ideas! This will be a great feature, customization is everything imo 

You mean station info/news content as a configurable menu link to let the user link to any generated Blog/News/whatever page, right?

I mean kind of like the "about" page on the fuzzy-archer skin, where one can put custom content in it, as it seems there can be more than 1 additional page and menu entry. I'm not sure how it's done, if the page content is written in the skin config directly or if it somehow embeds an additional html page into the content area(?)

Another great thing would be, if the station/hardware info could somehow be overwritten or complemented with an additional info field, if the driver doesn't pass enough information, as it's the case with an SDR setup or the interceptor driver: It just shows "sdr" or "ecowitt-client" instead of, as an example, "WS80 over SDR" or "WS80 with ecowitt-client / GW1000". It would be sufficient if there would just be an additonal customizable text field below "weewx 4.x.x with ecowitt-client" which would show e.g. "Sensor: WSxx" or "Station hardware: WSxx with GW1100". But it should be able to read it out of the weewx.conf, if it can be defined there somehow, because in a multiple instance weewx setup the skin.conf is the same for all instances. But yeah not sure if this makes sense or if it should rather be adressed by weewx itself, I know it's just a little detail but would be neat :)

tarob...@gmail.com

unread,
Jun 3, 2022, 7:07:16 PMJun 3
to weewx-user
Ran this on my test rpi (simulator mode) with data going back to late Dec 2021. Took about ~70 secs to generate WdcReport. I copied over my up weewx db (data from mid 2020 to present) and it takes about ~180 sec to generate a WdcReport. Any ways to optimize the reports to get the report generation time down? For comparison, takes less than a sec for SeasonsReport.

David Bätge

unread,
Jun 4, 2022, 5:11:15 AMJun 4
to weewx-user
I copied over my up weewx db (data from mid 2020 to present) and it takes about ~180 sec
Like the name of the Skin suggests, you will need a Data Center to run the Skin :D Just kidding, the long generation time is on my list, I will see what I can do about it in the coming weeks.

I mean kind of like the "about" page on the fuzzy-archer skin, where one can put custom content in it, as it seems there can be more than 1 additional page and menu entry. I'm not sure how it's done, if the page content is written in the skin config directly or if it somehow embeds an additional html page into the content area(?)
I got you. Sounds like a good addition. One could also provide pictures of the station or extreme weather events or whatever. This would personalize the skin for each user, definitely a good Addition.

Another great thing would be, if the station/hardware info could somehow be overwritten or complemented with an additional info field, if the driver doesn't pass enough information, as it's the case with an SDR setup or the interceptor driver: It just shows "sdr" or "ecowitt-client" instead of, as an example, "WS80 over SDR" or "WS80 with ecowitt-client / GW1000". It would be sufficient if there would just be an additonal customizable text field below "weewx 4.x.x with ecowitt-client" which would show e.g. "Sensor: WSxx" or "Station hardware: WSxx with GW1100". But it should be able to read it out of the weewx.conf, if it can be defined there somehow, because in a multiple instance weewx setup the skin.conf is the same for all instances. But yeah not sure if this makes sense or if it should rather be adressed by weewx itself, I know it's just a little detail but would be neat :)
Like I said in the first post, I'm new to the weewx ecosystem, so everything I write now is speculation: (without further investigation) this sounds more like a Driver issue? The driver should provide the station data to weewx (and the skin). Not sure about adding this as configuration to weewx.conf. I don't know if weewx would support this out of the box. The Extras Section (https://weewx.com/docs/customizing.htm#Extras) inside the skin.conf would be suitable for this, but then you will need to set this for every weewx-wdc installation. I will keep this in mind and do some investigation.

David Bätge

unread,
Jun 30, 2022, 6:44:54 PMJun 30
to weewx-user
I just wanted to inform you that I released v1.3.0 of weewx-wdc, new features are: 


Here is a demo of the release: https://www.weewx-hbt.de/

I am also working on a second "more weewx like" layout for the skin, preview can be seen here: https://www.weewx-hbt.de/classic/

Feedback is always appreciated!

jterr...@gmail.com

unread,
Jul 4, 2022, 12:45:11 PMJul 4
to weewx-user
I don't know if it is by design or if it is a bug, but when one navigate to a given month - for instance March 2021 on your site -  the 2022 year and months are no more shown in the left navigation bar, and it is therefore not possible to select and load directly to any month of 2022.

David Bätge

unread,
Jul 4, 2022, 3:35:22 PMJul 4
to weewx-user
Well, good catch! This is indeed a bug and not intended.

I will have a look into that!

David Bätge

unread,
Jul 29, 2022, 2:11:59 PMJul 29
to weewx-user
The skin just got a new release, the changes are (also see the release notes: https://github.com/Daveiano/weewx-wdc/releases/tag/v2.0.0): 
  • Added classic layout, preview here: https://weewx-hbt.de/classic 
  • More customisation via skin.conf: diagram height, digram aggregate_type, Time formats, some basic diagram options like line width or point size (please see the readme for more information)
  • windDir ordinals display support, new chart type: windRose 
  • Some Frontend JavaScript optimization results in smaller files and better performance
The new version can be seen here: https://www.weewx-hbt.de/

More info about the new customization options or the wind rose diagram can be found in the readme: https://github.com/Daveiano/weewx-wdc

Feedback is always welcome!

tarob...@gmail.com

unread,
Jul 30, 2022, 2:40:47 PMJul 30
to weewx-user
Installed the new version of WDC skin (v2.0.0). I uninstalled the older skin using wee_extension --uninstall and installed the new version using wee_extension --install. I stopped weewx and started it again. Checking out the log, everything is running fine, no errors. However, the WDC page has headings but no charts. Here is a post of the log file before and after updating when running the wdc report: Really difficult for me to troubleshoot as the log isn't showing any issues.

Jul 30 13:46:16 raspberrypi weewx[12721] INFO weewx.cheetahgenerator: Generated 9 files for report WdcReport in 27.19 seconds
Jul 30 13:46:16 raspberrypi weewx[12721] INFO weewx.reportengine: Copied 0 files to /var/www/html/weewx/wdc

---First run after installing new version---
Jul 30 14:09:29 raspberrypi weewx[1682] INFO weewx.cheetahgenerator: Generated 64 files for report WdcReport in 211.60 seconds
Jul 30 14:09:29 raspberrypi weewx[1682] INFO weewx.reportengine: Copied 10 files to /var/www/html/weewx/wdc

--Each run after---
Jul 30 14:11:16 raspberrypi weewx[1682] INFO weewx.cheetahgenerator: Generated 9 files for report WdcReport in 28.28 seconds
Jul 30 14:11:16 raspberrypi weewx[1682] INFO weewx.reportengine: Copied 0 files to /var/www/html/weewx/wdc

Screenshot of what the webpage looks like:
2022-07-30.png

David Bätge

unread,
Jul 30, 2022, 4:37:32 PMJul 30
to weewx-user
Ok, this seems odd. Could you try to remove all previously generated files in the output directory (typically "/home/weewx/public_html/" or "/var/www/html/weewx/", see https://www.weewx.com/docs/usersguide.htm#Where_to_find_things)?

I guess there is something wrong with the Javascript and Stylesheets, the paths have changed from v1.x to v2.x. Can you verify that the files 
/dist/main.js and /dist/main.css exist on your webserver? E.g. on my page its https://www.weewx-hbt.de/dist/main.js and https://www.weewx-hbt.de/dist/main.css

Did you try to open the webpage in an incognito window? Perhaps there is something with the caches messed up.

Btw: Is your webpage public available so I could take a look by myself?

Troy Roberts

unread,
Jul 30, 2022, 9:16:57 PMJul 30
to weewx...@googlegroups.com
I removed all files in /var/www/html/weewx/wdc and before removing I did verify that */dist did contain main.js and main.css. After removing, the report ran again but it did not update those /dist folder or files. I stopped weewx and started again and the /dist files are there but website is still showing the same.

My weewx is not public but I can zip and send the entire folder to you.

David Bätge

unread,
Jul 31, 2022, 5:29:30 AMJul 31
to weewx-user
Ok, I will have a look if you send me the output! E-Mail is david....@gmail.com

David Bätge

unread,
Jul 31, 2022, 10:25:39 AMJul 31
to weewx-user
I had a look over the generated files. The path (/var/www/html/weewx/wdc) is not your webservers root path, right? You are accessing the page via http://your-server.com/wdc, right?

In this case, you have found a bug: The skin currently only works if deployed in the webservers root directory. 
If this is the case, please try to replace the template file "weewx-wdc/includes/html-head.inc" with the updated, attached file and re-generate. This should do the trick.

If so, I will include this change in a bugfix release!
html-head.inc

Troy Roberts

unread,
Jul 31, 2022, 10:30:09 AMJul 31
to weewx...@googlegroups.com
That is correct, it is not running in root, but */wdc. I will replace the file when I get home and let you know if that fixes it.


tarob...@gmail.com

unread,
Jul 31, 2022, 1:29:56 PMJul 31
to weewx-user
The new html-head.inc worked, thanks David!

One other thing to mention, the scale for barometric pressure when using standard units (inHg) needs to be tighter. See screenshot:
2022-07-31.png

David Bätge

unread,
Jul 31, 2022, 7:51:19 PMJul 31
to weewx-user
Thank you for finding and helping to solve a bug!

Yes, the rounding for inHg does not make sense (one decimal place). This will also be included in an upcoming 2.0.1 bugfix release.

Andrea Di Saverio

unread,
Aug 1, 2022, 6:32:23 PMAug 1
to weewx-user
Hello,
not sure if this is the right place or if it's better to start a new thread. In that case, please let me know.
Anyway...

I was trying to install Daveiano's skin to my weewx installation, on my raspberry, but the attempt failed. This the log:
    
    pi@raspberrypi:~ $ wee_extension --install=/home/pi/weewx-wdc-v1.3.3/
    Request to install '/home/pi/weewx-wdc-v1.3.3/'
    Traceback (most recent call last):
      File "/usr/share/weewx/wee_extension", line 92, in <module>
        main()
      File "/usr/share/weewx/wee_extension", line 84, in main
        ext.install_extension(options.install)
      File "/usr/share/weewx/weecfg/extension.py", line 137, in install_extension
        self.install_from_dir(extension_path)
      File "/usr/share/weewx/weecfg/extension.py", line 183, in install_from_dir
        shutil.copy(source_path, destination_path)
      File "/usr/lib/python3.7/shutil.py", line 245, in copy
        copyfile(src, dst, follow_symlinks=follow_symlinks)
      File "/usr/lib/python3.7/shutil.py", line 121, in copyfile
        with open(dst, 'wb') as fdst:
    PermissionError: [Errno 13] Permission denied: '/usr/share/weewx/user/archive_util.py


The weird thing is that I don't have any `archive_util.py` in that folder

    pi@raspberrypi:~ $ ls -hl /usr/share/weewx/user/
    total 12K
    -rw-r--r-- 1 root root  541 Apr  2  2021 extensions.py
    -rw-r--r-- 1 root root  306 Apr 22 02:32 __init__.py
    drwxr-xr-x 2 root root 4.0K Jul 18 01:09 __pycache__


Is there something wrong in my setup/installation, or the root cause is possibly something else?

vince

unread,
Aug 1, 2022, 6:54:05 PMAug 1
to weewx-user
On Monday, August 1, 2022 at 3:32:23 PM UTC-7 disaveri...@gmail.com wrote:
 the root cause is possibly something else?

Yes.  The 'root' cause indeed. 

 

David Bätge

unread,
Aug 3, 2022, 7:46:26 PMAug 3
to weewx-user
@disaveri Did this solve your problem?

Btw: I released 2.0.1 which resolves the "non-web-root"-issue, the "Pressure diagram with inHg unit"-issue and includes a few other bugfixes: https://github.com/Daveiano/weewx-wdc/releases/tag/v2.0.1

Thanks for your input!

Andrea Di Saverio

unread,
Aug 5, 2022, 10:43:52 AMAug 5
to weewx-user
Sorry for my late replay.

Yes, the suggestion solved my problem. I was not installing as root user.
Thank you.

Reply all
Reply to author
Forward
0 new messages