Giter Site home page Giter Site logo

weatherstorm / sofaskin-cw9009 Goto Github PK

View Code? Open in Web Editor NEW
17.0 17.0 11.0 921 KB

Sofaskin-CW9009 skin for Weewx is a modified version of the Sofaskin developed by Sven at https://neoground.com/portfolio/neowx/. He no longer supports the original skin. Please see the readme for dependency requirements to use this skin.

Home Page: http://www.centuryfarmweather.com

License: MIT License

HTML 15.72% CSS 31.78% Python 20.97% JavaScript 2.18% SCSS 29.34%
weather-conditions weather-station weewx weewx-skin

sofaskin-cw9009's People

Contributors

hollie avatar kurtjacobson avatar stephanritscher avatar weatherstorm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

sofaskin-cw9009's Issues

Use `preg_split` instead of `split` in text.php.tmpl

text.php.tmpl uses the PHP function split which was deprecated in PHP 5.3.0, and completely removed in PHP 7.0.0. This causes servers running PHP 7.0.0 or later to completely fail to load the Monthly Reports page. Since the current stable is 7.2.1, and most up-to-date servers will probably be running at least 7.0.14, users are likely to encounter this problem. split should be replaced with preg_split.

Add summaries to historygenerator.py

Thanks very much for your skin and previous help J.
I see that https://github.com/brewster76/fuzzy-archer/blob/master/bin/user/historygenerator.py file now includes a summary column (see http://meteolavall.no-ip.org/weewx/history.html for a sample page which includes it).
I really like your implementation of the NOAA monthly summaries and am not keen to lose that style of presentation.

I've tried comparing the code between your modified version of brewster76's historygenerator linked above, and this latest one and whilst a lot of it is identical I'm afraid it's beyond my abilities to correctly add the summary column functionality from one to the other.
Any chance you might review at some point and add to your modified version?

My own summary page is here if you are interested - https://www.loughlinstown.ie/records.html

Many thanks,

Muireadach.

ET.sum.raw inconsistency

Curious about the inconsistency between index/week/month.html.tmpl and year.html.tmpl with the former all listing ET values if > 1 and the latter doing so if == 0.0. Correct or an error? In neither case, ofc, is anything listed for me as it's not a variable reported by my hardware (Ecowitt) nor have I derived it, though I understand that's an option (am only just now looking at this-- weewx/weewx#48 and weewx/weewx#160 -- and other derived variables).

My weewx.conf file is set to prefer hardware for everything, including ET. Seems I could derive this one by choosing "software" but I'm not sure I'm inclined to bother as it seems there have been some issues with how it's been calculated in the past and I haven't found any clear guidance on it so far and I can see that it can be tweaked using parameters. It's also not something that matters to me quite as much as it might to someone needing to manage irrigation. Thoughts?

Lightning data problem

Some templates were failing because the stations don't collect lightning data. This was caused by a lack of data checking code.

adding sensors

Hi
How can I add some more temp, humidity and other sensors?
And how to add battery status from weather station and sensors?
And how to add some more grapsh for internal temperature and humidity?
I have this weather station. https://www.ecowitt.com/shop/goodsDetail/4#

Check if data is old

A simple javascript script is used to determine if the site data is more than 30 minutes old. If the data is old, a message will display saying so, However, there is an issue with how the script checks the current time. It uses the users browser time. If the browser is not in Mountain time the page will get the old data alert. Should be able to fix this by checking time zones of the user and converting it to MT before doing the old data check.

Fix Font Awesome link

Font awesome icons are no longer showing on the page. This as to do with ending of the pro version. Need to update page links to the free version.

Cheetahgenerator fails to generate index.html if web_url is not defined

Traceback:

cheetahgenerator: **** Ignoring template /home/wx/weewx/skins/Sofaskin/index.html.tmpl
cheetahgenerator: **** Reason: cannot find 'web_url' while searching for 'Extras.web_url'

At first glance it does not look like Extras.web_url is absolutely required for generating index.html, so should probably add a #if $Extras.has_key('web_url') were needed.

Weather Network Handling

I need a better way to handle the Station IDs and station.html display of associated weather networks. Probably the best way will be to create a section in the skin.conf to handle this instead of using extra tags. This will allow for greater flexibility among different users.

climate summary files don't display using text.php

Just discovered this. Yields an error, e.g.,

[domain]/text.php?report=NOAA/NOAA-2021-02.txt

results in

"; echo file_get_contents($report); echo ""; } ?>

The file exists ok in the NOAA directory.

Happy to give your Ajax and jQuery version a test or to fix if you know already what causes this. Not immediately obvious to me right now what's wrong.

illumination query

I've discovered that my driver supports "illuminance" but with the name "luminosity". Substituting variable names now yields a value in the outputs displayed but it's an unlabeled value, currently, 0.000000, not a five digit nr with "lx" or "lux". In looking at the .conf file I can't see any derivations. Do you have anything in your weewx.conf file related to this?

BTW your 2nd OpenWeather map link on yr About page has a paste error (double http) -- just noticed.

Lightning distance

Hello and Season's Greetings. In advance of the new year I've acquired a lightning detector and made some mods to my web site which borrows from yours (acknowledged). Thanks for your "lightning bug" fix. However, I am seeing

Average Strike Distance | $day.lightning_avg_distance.avg

instead of a value reported for the average distance (expected value zero atm). I haven't yet had time to look into it but am wondering if you have a variable declared in weewx.conf or what I'm missing here.

Getting erros

Hello,

Getting these errors after installing Sofaskin-CW9009

huhti 09 10:24:15 weewxsrv-davis python3[138945]: weewx[138945] ERROR weewx.reportengine: Caught unrecoverable exception in generator 'weewx.cheetahgenerator.CheetahGenerator'
huhti 09 10:24:15 weewxsrv-davis python3[138945]: weewx[138945] ERROR weewx.reportengine: **** 'HistoryColors'
huhti 09 10:24:15 weewxsrv-davis python3[138945]: weewx[138945] ERROR weewx.reportengine: **** Traceback (most recent call last):
huhti 09 10:24:15 weewxsrv-davis python3[138945]: weewx[138945] ERROR weewx.reportengine: **** File "/usr/share/weewx/weewx/reportengine.py", line 197, in run
huhti 09 10:24:15 weewxsrv-davis python3[138945]: weewx[138945] ERROR weewx.reportengine: **** obj.start()
huhti 09 10:24:15 weewxsrv-davis python3[138945]: weewx[138945] ERROR weewx.reportengine: **** File "/usr/share/weewx/weewx/reportengine.py", line 385, in start
huhti 09 10:24:15 weewxsrv-davis python3[138945]: weewx[138945] ERROR weewx.reportengine: **** self.run()
huhti 09 10:24:15 weewxsrv-davis python3[138945]: weewx[138945] ERROR weewx.reportengine: **** File "/usr/share/weewx/weewx/cheetahgenerator.py", line 166, in run
huhti 09 10:24:15 weewxsrv-davis python3[138945]: weewx[138945] ERROR weewx.reportengine: **** self.init_extensions(gen_dict[section_name])
huhti 09 10:24:15 weewxsrv-davis python3[138945]: weewx[138945] ERROR weewx.reportengine: **** File "/usr/share/weewx/weewx/cheetahgenerator.py", line 199, in init_extensions
huhti 09 10:24:15 weewxsrv-davis python3[138945]: weewx[138945] ERROR weewx.reportengine: **** self.search_list_objs.append(klass(self))
huhti 09 10:24:15 weewxsrv-davis python3[138945]: weewx[138945] ERROR weewx.reportengine: **** ^^^^^^^^^^^
huhti 09 10:24:15 weewxsrv-davis python3[138945]: weewx[138945] ERROR weewx.reportengine: **** File "/usr/share/weewx/user/historygenerator.py", line 53, in init
huhti 09 10:24:15 weewxsrv-davis python3[138945]: weewx[138945] ERROR weewx.reportengine: **** self.color_dict = generator.skin_dict['HistoryColors']
huhti 09 10:24:15 weewxsrv-davis python3[138945]: weewx[138945] ERROR weewx.reportengine: **** ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
huhti 09 10:24:15 weewxsrv-davis python3[138945]: weewx[138945] ERROR weewx.reportengine: **** File "/usr/lib/python3/dist-packages/configobj/init.py", line 554, in getitem
huhti 09 10:24:15 weewxsrv-davis python3[138945]: weewx[138945] ERROR weewx.reportengine: **** val = dict.getitem(self, key)
huhti 09 10:24:15 weewxsrv-davis python3[138945]: weewx[138945] ERROR weewx.reportengine: **** ^^^^^^^^^^^^^^^^^^^^^^^^^^^
huhti 09 10:24:15 weewxsrv-davis python3[138945]: weewx[138945] ERROR weewx.reportengine: **** KeyError: 'HistoryColors'
huhti 09 10:24:15 weewxsrv-davis python3[138945]: weewx[138945] ERROR weewx.reportengine: **** Generator terminated

Images is generated, but not anythink else..

Edit.

weewx version 4.10.2, debian 12 latest amd64.

Error with template files

Hi,
yesterday I updated my weewx to version 3.8.0.1 and doing a pull request for your skin. I used it for month and it works fine. But now I got this error:
Mar 1 23:40:19 weewx weewx[5037]: cheetahgenerator: Generate failed with exception '<type 'exceptions.UnicodeDecodeError'>' Mar 1 23:40:19 weewx weewx[5037]: cheetahgenerator: **** Ignoring template /etc/weewx/skins/Sofaskin-CW9009/RSS/weewx_rss.xml.tmpl Mar 1 23:40:19 weewx weewx[5037]: cheetahgenerator: **** Reason: 'utf8' codec can't decode byte 0xe4 in position 8: invalid continuation byte Mar 1 23:40:19 weewx weewx[5037]: **** Traceback (most recent call last): Mar 1 23:40:19 weewx weewx[5037]: **** File "/usr/share/weewx/weewx/cheetahgenerator.py", line 330, in generate Mar 1 23:40:19 weewx weewx[5037]: **** print >> _file, compiled_template Mar 1 23:40:19 weewx weewx[5037]: **** File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1005, in __str__ Mar 1 23:40:19 weewx weewx[5037]: **** rc = getattr(self, mainMethName)() Mar 1 23:40:19 weewx weewx[5037]: **** File "_etc_weewx_skins_Sofaskin_CW9009_RSS_weewx_rss_xml_tmpl.py", line 104, in respond Mar 1 23:40:19 weewx weewx[5037]: **** File "/usr/share/weewx/weewx/cheetahgenerator.py", line 593, in filter Mar 1 23:40:19 weewx weewx[5037]: **** filtered = val.decode('utf-8').encode('ascii', 'xmlcharrefreplace') Mar 1 23:40:19 weewx weewx[5037]: **** File "/usr/lib/python2.7/encodings/utf_8.py", line 16, in decode Mar 1 23:40:19 weewx weewx[5037]: **** return codecs.utf_8_decode(input, errors, True) Mar 1 23:40:19 weewx weewx[5037]: **** UnicodeDecodeError: 'utf8' codec can't decode byte 0xe4 in position 8: invalid continuation byte

The error message repeats with some other templates. Is this an error on your templates or do u think its a general one and I should look at the weewx google groups?

Thx

Wrong field in index.html

One field in the "one year ago"-Card in index.html is wrong.
The wind row is " $days_ago($days_ago=$n).wind.max $day.wind.gustdir". So $days_ago ist missing for the direction.

can't get it to work

I installed the repo. But the generated website look like this:
Bildschirmfoto 2024-04-26 um 11 04 06

there are no errors in weewx log.

historygenerator.py html code needs updating

The generator creates a table weather summaries for the station. I found a few bugs in the HTML the generator outputs. Also, need to make changes to support HTML5.

I have updated the python code but I need to test it.

Update Skin to Python 3 and WeeWx 4.0.0.

It looks like WeeWx 4 is stable so it's time to convert the skin to the latest version. Only significant change I can see thus far is with the historygenerator.py script. The author has update the code base so will include the changes soon.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.