WeeWX, WD, and Saratoga templates

744 views
Skip to first unread message

Daniel Rich

unread,
May 28, 2014, 5:32:41 PM5/28/14
to weewx...@googlegroups.com
I'm new to WeeWX, I just migrated off of wview this past weekend. I've spent quite a bit of time the past few days getting everything looking "pretty", and since I don't see a lot of talk about it in the group, am I just special or is it fairly difficult to get WD up and running correctly with the Saratoga templates?

For example:
  • The instructions aren't all that specific. I'm a sysadmin by day so used to digging around to figure out how to do things, but it took quite a bit of playing to figure out how to get the templates installed and working.
  • Out of the box, there are more than a few things that don't work in the Saratoga templates. I've gotten my graphs and wind rose on-line now, but have others fought this same battle and just not mentioned it? I found one or two messages that mentioned problems but that's about it.
  • There are things that are just plain broken. I've seen a few posts with the class 'NameMapper.NotFound' error for example.

So how have other people gotten it up and running? Should there be a wiki page with more explicit instructions?

I'm also willing to post my patches if people are interested. Mostly they are to get the graphs working and to enable the wind rose in WeeWX-WD.

If you want to look at what I've done, my site is at http://www.lapseofthought.com/Weather/.

gjr80

unread,
May 28, 2014, 6:09:48 PM5/28/14
to weewx...@googlegroups.com
I take the point on the graphs and wind rose, but not sure I agree that the instructions aren't all that specific - did these not work?
https://bitbucket.org/ozgreg/weewx-wd/wiki/Weewx-WD%20v0.9.2%20Installation%20Instructions

Would appreciate any info on the things that are just plain broke. Can be raised as in issue on bitbucket or posted here if you wish.

Gary

vds

unread,
May 28, 2014, 7:30:09 PM5/28/14
to weewx...@googlegroups.com
On Wednesday, May 28, 2014 2:32:41 PM UTC-7, Daniel Rich wrote:
  • The instructions aren't all that specific. I'm a sysadmin by day so used to digging around to figure out how to do things, but it took quite a bit of playing to figure out how to get the templates installed and working.
I think a 'gentle introduction' page or two in the context of weewx would be helpful.  It's not clear to me what WD even is, nor why I'd care.  Don't care about testtags, or clientraw, or whatever magic is under the hood as output.  I just want to have the Saratoga templates look'n'feel with accurate weewx-generated data and graphs of course.  It was very confusing trying to figure out which file did what, and if I needed which one or both.  Eventually I just generated both and I don't even know if both are used.  Saratoga works, so I called it good enough.

I recently got mine working again (http://weather.skahan.net/saratoga) and the weewx-wd instructions were fine vs. weewx 2.6.2 in my opinion but I'd battled this thing well over a dozen times this year and last fall.  Most recently it was start anew in a VM in simulator mode.  Follow the weewx-wd instructions verbatim.  Worked great. It was still a little unclear to me where I could (or shouldn't) edit to use US units, but I figured it out eventually.  Still hoping the future multiple-db thing happens in weewx-3.0 and that weewx-wd gets into their own ancillary db rather than messin' with the weewx databases like they do now.  But it works.  Works is good.

A gentle intro of 'here is this cool skin, if you do this then you can have weewx do all the heavy lifting for you' would be really helpful.  I know Gary + company have been really helpful but there has to be some small set of hitchhiker's guide type pages that would help folks fend for themselves more (and with less stress)
  • Out of the box, there are more than a few things that don't work in the Saratoga templates. I've gotten my graphs and wind rose on-line now, but have others fought this same battle and just not mentioned it? I found one or two messages that mentioned problems but that's about it.
I dunno, editing a few pages to fix the image links was the least of my pain there.  I didn't see anything that blatantly didn't work that I can remember.  I do notice your 'status' page is a little hosed.  Mine doesn't show that behavior.  No idea why.   You also have the wxsim link saying 'not available'.  My recollection is I commented it out in the php template.

I'd definitely like to see how you got the nice windrose set up.   That looks great.

gjr80

unread,
May 29, 2014, 5:23:23 AM5/29/14
to weewx...@googlegroups.com
OK, points taken. A while back we did cut down the readme and push a lot of the detail (mainly install instructions) to the Wiki. Will give them another overhaul. Will also look at a few more Wiki entries for gotchas/troubleshooting - units seem to be an issue.

As for install instructions I have run through them multiple times using a plain vanilla Weewx install with both US and World Saratoga templates and not an issue with either US customary or metric databases. So if there are any issues it would be nice to get the details.

Gary

drich

unread,
May 29, 2014, 6:46:03 PM5/29/14
to weewx...@googlegroups.com

As vds mentioned, there are a lot of assumptions made in the instructions about your familiarity with the software. I still didn't know what clientraw and testtags were for until I started digging into the Saratoga php code. The instructions themselves are straight forward enough (although I initially created a user subdirectory in $BIN_ROOT/user, just reading it as copy the bin folder to $BIN_ROOT/user).

It actually took me a while to realize that "WD" was "Weather Display" and that was the version of the Saratoga templates I should download. That was probably the most confusing part for me. It also wasn't clear initially that the Saratoga files (I really shouldn't call them templates since they are just php code) get dumped into the HTML_ROOT, not into the skins directory. Once you know how everything works it makes sense, but it's not a good place for a beginner to start.

How hard would it be to integrate with the weewx setup.py extension installer (not sure how ugly that is to integrate with, I've only used it once).

One thing that might be nice is knowing that you can omit HTML_ROOT altogether if you want this to be your default template.

As for the errors I ran into, let me write those up a bit later, I have to head out to catch the train home.

---
Dan Rich <dr...@employees.org> | http://www.employees.org/~drich/ | "Step up to red alert!" "Are you sure, sir? | It means changing the bulb in the sign..." | - Red Dwarf (BBC)

vds

unread,
May 29, 2014, 10:29:02 PM5/29/14
to weewx...@googlegroups.com
One note I might add is that you don't need to have the Saratoga stuff in HTML root.  I have mine in a subdirectory.   You just need the location of the data files weewx-wd writes to match up.  I have weewx-wd writing to /var/www/WD and have $SITE['clientrawfile'] = '../WD/clientraw.txt' in Saratoga's settings.php file.

  • packaging saratoga itself as an extension would be relatively easy.  It's just a big bunch of files.   I don't remember anymore if there were any issues getting all the right packages for its php expectations installed or not.  I don't 'seem' to remember too much confusion there but it's been a while.
  • packaging weewx-wd as an extension is I think possible, but it's pretty invasive re: what it does to the databases and the steps you need to follow.  I'd suggest it's possibily not worth packaging up quite yet, or until it's rearchitected to be in its own database(s).  The instructions Gary+company have are pretty good now, although the code seems a little fragile vs. changes in weewx as both move forward over time and change slightly.
Going a little more out on a limb re: installers, would it be more reasonable in the interim to do something like:
  • set up a github repo of a pre-configured Saratoga tree known to have all the pieces in the right places
  • then folks could just cd to their HTML_ROOT and 'git clone http://some.site.name/somepath'
  • then they'd just need to follow the weewx-wd instructions so the data files get generated by weewx and put in the right places
Once Saratoga is working, I'd guess 100% of the sites would need to edit stuff to put their site names, 'about' page content, and the like, so I wouldn't sweat that part.  Just finding all the pieces and putting them in the right place is where I got lost in the Saratoga instructions.

Unless it's not a problem that's worth solving of course.....


vds

unread,
May 29, 2014, 10:49:09 PM5/29/14
to weewx...@googlegroups.com
misspoke of course - maybe it 'does' need documenting better :-)
  • I have weewx in /var/www/weewx
  • I have saratoga in /var/www/saratoga
  • weewx-wd writes to /var/www/weewx/WD
  • so my Settings-weather.php file points $SITE['WXtags'] at ../weewx/WD/testtags.php
I've done a lot of editing vs. the original (thank goodness I have it in a git repo) so your mileage may vary

gjr80

unread,
May 29, 2014, 11:47:09 PM5/29/14
to weewx...@googlegroups.com
Always happy to make things better than they are now...

I guess the underlying assumption we have made is that a Weewx-WD user is capable of downloading and installing the Saratoga HTML templates with the WD plugin. Setup of Saratoga is editing one (or if you are unlucky two) php settings files. Appreciate that there is a need for a 'bigger picture' page/document that ties Weewx-WD and Saratoga together, picking up on key config issues/gotchas etc but I am loathed to start packaging up a pre-configured Saratoga suite given there are three flavours of Saratoga (US, Canada and World). I see issues like Saratoga changing code because the likes of, say, NWS changes their forecasting output, this would have no impact on Weewx-WD whatsoever but we then (potentially) have one, two or three packages to update. I have found the Saratoga install and setup instructions easy to follow, I think it just needs some context with Weewx-WD. I seem to remember seeing some words on some Wewx docs some time ago along the lines of 'if you intend to use Weewx you should not be afraid to edit config files etc' (can't seem to find them anymore though), I see a similar expectation when using Weewx-WD with Saratoga.

Packaging Weewx-WD was considered a while ago when the packaging threads were alive, we considered it and ruled it out for the time being, mainly because of the subclassed services that Weewx-WD uses and the need to get them right in the likes of weewx.conf. Things start to get complex pretty quick if Weewx-WD is pulling one way and another package is pulling another. Once we see Weewx take on a multi-database architecture we may see far less subclassing which I hope will make Weewx-WD less complex, more robust and a better candidate to package.

Of course though, it is Greg's project so he may have a different view......

Gary

drich

unread,
May 30, 2014, 11:17:32 AM5/30/14
to weewx...@googlegroups.com

I've done some editing on the original Saratoga code as well, I'm going to chat with the maintainer and see if he's interested in collaborating on a WeeWX-WD "version" of the templates. I've chatted with him in the past, he and I had shared some ideas at one point about what I was doing with wview (and we only live 20 minutes away from each other after all! :-)

For my site I went ahead and added a WeeWX type in the code so I could get the correct windrose and other graphs. I'm not a big fan of the WD graphs anyway. I find them really hard to read.

The more I think about the documentation issue, the more I think it's just an "assumptions" issue rather than a problem with the docs. I think if it had been clear that WeeWX-WD isn't really a skin but a framework for other skins, most of my confusion wouldn't have happened in the first place.

---
Dan Rich <dr...@employees.org> | http://www.employees.org/~drich/ | "Step up to red alert!" "Are you sure, sir? | It means changing the bulb in the sign..." | - Red Dwarf (BBC)
--
You received this message because you are subscribed to the Google Groups "Weewx user's group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

sesy...@gmail.com

unread,
Jun 1, 2014, 1:13:51 PM6/1/14
to weewx...@googlegroups.com
I am still trying to get saratoga to run and agree with Daniel, it could be clearer.  You mention the directory structure. Mine is
the webpage on mine is now ~/public_html
the saratoga files are in ~/public_html/WD/ which is also where weewx-wd writes to.
Since my Settings-weather.php file is in the same directory I just left the WXtag as default.  Do I need to put the explicit directory name there?

My syslog is showing the namemapper.notfound, along with NotFound: cannot find 'SkinVersion' while searching for 'Extras.SkinVersion.Version' and others.

I must have missed something, but I did follow the weewx-wd instructions exactly and have attempted to follow the saratoga instructions as well.  I imagine I will get there in the end, but it could be a bit more straight forward.

Steve KD2OM

sesy...@gmail.com

unread,
Jun 1, 2014, 2:35:12 PM6/1/14
to weewx...@googlegroups.com
An update.  I now have weewx.wd running without error. Both testtags and clientraw records are being generated. I still don't understand how to see them on a webpage, but at least all the weewx-wd stuff is running.

Steve KD2OM

Oz Greg

unread,
Jun 1, 2014, 9:42:59 PM6/1/14
to weewx...@googlegroups.com
Thanks all for the comments, yes weewx-wd is a beast because of the added complexity behind setting up a WD site which is not minor (I still have some glitches in my sites)..

I am happy to grant anyone access to the WIKI if you want to add to the installation pages etc..  or send me/Gary the content to add to the page(s)..

weewx-wd project is kind of just in a bug fix mode for the short term until weewx 3.0 changes arrive which will change the templates..

Thanks Again for your comments...

sesy...@gmail.com

unread,
Jun 1, 2014, 10:53:27 PM6/1/14
to weewx...@googlegroups.com
Another update.  I finally figured out that php-curl wasn't installed. Saratoga is running now but with a bunch of permissions issues.

Steve KD2OM

Shaggy

unread,
Jun 2, 2014, 4:47:07 PM6/2/14
to weewx...@googlegroups.com
Steve, did you find the cause of the 'SkinVersion' NotFound error?  I also have the error (installing weewx-wd 0.92 on weewx 2.6.3), although the files are being generated.  From /var/log/messages:

****  Traceback (most recent call last):
****    File "/home/weewx/bin/weewx/cheetahgenerator.py", line 274, in generate
****      print >> _file, text
****    File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1005, in __str__
****      rc = getattr(self, mainMethName)()
****    File "_home_weewx_skins_Clientraw_customclientraw_txt_tmpl.py", line 593, in respond
****  NotFound: cannot find 'SkinVersion' while searching for 'Extras.SkinVersion.Version'



Daniel Rich

unread,
Jun 2, 2014, 7:34:21 PM6/2/14
to weewx...@googlegroups.com
I ended up putting it my settings file to get around the error.

    [[Clientraw]]
        skin = Clientraw
        HTML_ROOT = xxxxx
        [[[Extras]]]
            [[[[SkinVersion]]]]
                Version = 0.9.2
--
You received this message because you are subscribed to the Google Groups "Weewx user's group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Daniel Rich

unread,
Jun 2, 2014, 7:35:41 PM6/2/14
to weewx...@googlegroups.com
Make sure you have a directory called "cache" in the same directory as your Saratoga files and that it is writable by your web server. I found that out out when I was trying to figure out why the pages were loading so slowly (this is in the Saratoga docs, but I never saw it the first time through).

What permissions errors are you seeing?
--
You received this message because you are subscribed to the Google Groups "Weewx user's group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

gjr80

unread,
Jun 2, 2014, 7:42:31 PM6/2/14
to weewx...@googlegroups.com
FWIW the actual missing lines were the [[SkinVersion]] setting (shown below) from the skin.conf for the skin that you are using to generate customclientraw.txt. Was inadvertantly left out of 0.9.2 when I put it together. The value of the setting is (I believe) of no direct consequence at the moment, I believe it was just used to keep track of the file format as it evolved with the SteelSeries gauges.

As Daniel has shown the flexibility of Weewx is such that there is more than one way to skin the cat.

Gary

[Extras]

   
[[SkinVersion]]  
       
#SteelGauges Version Control String
       
Version = 11

sesy...@gmail.com

unread,
Jun 2, 2014, 8:37:07 PM6/2/14
to weewx...@googlegroups.com
They were related to the cache directory. I googled and found someone said to set them to 777 which worked.  I see one every once in awhile about nws forecast so I changed that to 777 as well.
You mentioned some patches to get the wind rose and graphs working.  Mine are not working yet.  My biggest issue was that I hadn't installed php-curl installed. When I checked by typing curl from the command line it showed that it was there. I didn't realize that the correct curl wasn't there. It took nearly a day to figure that out.

Steve

sesy...@gmail.com

unread,
Jun 2, 2014, 9:04:36 PM6/2/14
to weewx...@googlegroups.com
Gary,
My Saratoga page doesn't update except manually. Is there a configuration for that?

Steve

gjr80

unread,
Jun 2, 2014, 11:37:25 PM6/2/14
to weewx...@googlegroups.com
Steve,

Yes there is, it's setup in the file ajaxWDwx.js which should be in the folder with all your other Saratoga files. There are a couple of settings early on that cover how often it refreshes and for how long it auto refreshes. Think there is also something in Settings.php that sets the ajaxXXwx.js file to use. Not 100% on these as I am away from my PC.

That being said though, the present weewx-wd architecture is a little limited as the clientraw and testtags files are only generated every archive period. In simple terms, testtags.php contains the data to populate the Saratoga pages and clientraw.txt contains the info to dynamically update certain fields on the Saratoga dashboard (main page). If clientraw.txt is only generated every 5 minutes then updating from it every 10 seconds is not going to do much. If your autoupdating is working you may well see some info changing colour in the top right of the page but as the autoupdate only updates fields that have changed, you will likely not see any activity elsewhere on the page.

I do have a service running that binds to loop records and generates a clientraw.txt manually. It's still rather clunky but works. Probably something we will take forward when we see how multi-database weewx goes - expect that will result In a lot of changes for weewx-wd.

Gary

drich

unread,
Jun 3, 2014, 10:18:58 AM6/3/14
to weewx...@googlegroups.com

Gary,

Isn't that just the timing for the ajax data refresh? From a quick look at the page source, it will reload the clientraw data which should refresh the data on the page, but won't refresh any images (such as the thermometer) or other content. Unless there is some javascript somewhere that I didn't find yet that also forces a page refresh periodically. Every 10 seconds is somewhat pointless with WeeWX since it only updates the files every 5 minutes... I just updated mine to every 30. I tried going for every minute (60000), but it completely stopped updating -- I'm wondering if it's a signed short internally in javascript so can't be greater than 32767 (no time to play with numbers this morning to debug it).

Looking at my logs, I do see it pulling clientraw.txt every 30 seconds, but updated time on the page never changes. I think the data may be changing, but it's hard to tell since there is such a minor change from update to update -- even with the flash I don't see anything change.

If you want a full page refresh I think you're going to have to put a meta tag into the Saratoga top.php file. I was playing around with it last night, and added this right after the '<meta name="description"...' line:

  <meta http-equiv="Refresh" content="300" />

That would cause your browser to reload the page every 5 minutes.

As an added bit of fun, I put in some code that expires my banner image every 15 minutes. I auto-generate that from a webcam up at Lick Observatory on Mt. Hamliton, so it seems a waste to not force it to update when the page refreshes! :-)

 

---
Dan Rich <dr...@employees.org> | http://www.employees.org/~drich/ | "Step up to red alert!" "Are you sure, sir? | It means changing the bulb in the sign..." | - Red Dwarf (BBC)

gjr80

unread,
Jun 3, 2014, 11:00:20 AM6/3/14
to weewx...@googlegroups.com
Daniel,


Isn't that just the timing for the ajax data refresh? From a quick look at the page source, it will reload the clientraw data which should refresh the data on the page, but won't refresh any images (such as the thermometer) or other content. Unless there is some javascript somewhere that I didn't find yet that also forces a page refresh periodically.

Yes, as I understand it ajax refresh is the only refresh built into Saratoga, anything else you are on your own. Don't believe it refreshes any images, though there is code in there to refresh the thermometer (circa line 663 in ajaxWDwx.js), can't say I have ever seen it change though. I am no great php/js expert, but all the code/tags seem to be there. As for refreshing images no reason why you couldn't do it in ajaxWDwx.js, but then again you might not want to refresh your image at the same rate as your obs, but then again I guess you could work around that too.
 

Every 10 seconds is somewhat pointless with WeeWX since it only updates the files every 5 minutes... I just updated mine to every 30. I tried going for every minute (60000), but it completely stopped updating -- I'm wondering if it's a signed short internally in javascript so can't be greater than 32767 (no time to play with numbers this morning to debug it). 

Looking at my logs, I do see it pulling clientraw.txt every 30 seconds, but updated time on the page never changes. I think the data may be changing, but it's hard to tell since there is such a minor change from update to update -- even with the flash I don't see anything change.

My point exactly, hence the service to create a clientraw.txt well inside the archive period. Just been testing v0.9.3 tonite on my spare RPi and with Saratoga US templates out of the box and a 5 minute archive period you should see auto updates happening every 10 seconds. No data changes on the dashboard since clientraw.txt has not changed but the word 'Updated:' in the header (gizmo) and just below the maps should flash green every 10 seconds and the seconds counter resets. Are you sure your ajaxWDwx.js is able to find clientraw.txt? I have to change the setting at line 56 in ajaxWDwx.js. Before I chnaged it I had simialr symptoms to what you describe.
 

If you want a full page refresh I think you're going to have to put a meta tag into the Saratoga top.php file. I was playing around with it last night, and added this right after the '<meta name="description"...' line:

  <meta http-equiv="Refresh" content="300" />

That would cause your browser to reload the page every 5 minutes.

As an added bit of fun, I put in some code that expires my banner image every 15 minutes. I auto-generate that from a webcam up at Lick Observatory on Mt. Hamliton, so it seems a waste to not force it to update when the page refreshes! :-)

Think I read about doing something like this sometime ago but then, as with most things on the internet, there seemed to be two camps, those that did it and those that violently opposed it! Managed to ajax updates going then and much preferred the flashing green fields on the screen.  Autochanging banner sounds cool, way way too late tonite (this morning) but I will have to camp on your site for a while later today and see what happens :)


Gary

sesy...@gmail.com

unread,
Jun 3, 2014, 11:15:35 AM6/3/14
to weewx...@googlegroups.com
Now I remember the "refresh" tag!
 I had to do it for the original page weewx generates.  Dan, I looked at your page last night and saw that it was showing a night photo, but didn't see it change. Perhaps you were making changes then.  I put a pan image from my phone on mine but need to compress it quite a bit.  The page loads quite slowly as it is, it is intolerable with a 2.6mb image.
Still no graphs nor wind rose.  I also want to add my lightning counter.  It is sure more tricky to add items than in the "stock" skin...

Steve

drich

unread,
Jun 3, 2014, 1:46:27 PM6/3/14
to weewx...@googlegroups.com

You wouldn't have seen the image change last night, I had pulled out the meta tag for the refresh while I was playing with the ajax code. Gary is right, there is a camp in the web world who is violently opposed to meta refresh tags (with reason, ajax is a much better way to go).I would much rather do it with ajax, if I have time I'll play with that a bit tonight when I get home.

There's no reason I can't hack some code into the page to refresh the image as well -- in my copious free time...

I really need to get my barometer sensor fixed and relocate my station first so the rain gauge works again (the poll it is on has bent so I don't get any readings currently). Being in northern California, I don't have to worry about rain 'til sometime in Oct or Nov anyway. :-)

 

---
Dan Rich <dr...@employees.org> | http://www.employees.org/~drich/ | "Step up to red alert!" "Are you sure, sir? | It means changing the bulb in the sign..." | - Red Dwarf (BBC)
--

sesy...@gmail.com

unread,
Jun 3, 2014, 2:51:22 PM6/3/14
to weewx...@googlegroups.com
Ok, that explains it.  I have checked and the page refreshes now.  Do have a patch or code to make the graphs work?

Steve

drich

unread,
Jun 3, 2014, 3:15:29 PM6/3/14
to weewx...@googlegroups.com

There is a pair of patches -- one to add the graphs to the graph page, and one to enable the windrose. Let me look those up when I get home tonight. I've been working a P1 outage here at work for the past 4 hours so won't have time to dig up the data 'til I get home.

 

---
Dan Rich <dr...@employees.org> | http://www.employees.org/~drich/ | "Step up to red alert!" "Are you sure, sir? | It means changing the bulb in the sign..." | - Red Dwarf (BBC)

Daniel Rich

unread,
Jun 3, 2014, 8:18:24 PM6/3/14
to weewx...@googlegroups.com
I went ahead and pulled out my meta refresh, fixing the clientraw path (just removing the leading / since it is in the same directory) got the data refreshing going. That might be a good tip to have in the wiki, I'm not sure I ever would have thought of that!

I'll look at the thermometer code when if I get some time later this evening. I don't really want that reloading every 30 seconds, the temperature had better not be changing that fast! :-) I'm sure I can leverage the same code for reloading my header image.

Thanks again for the pointers!
--
You received this message because you are subscribed to the Google Groups "Weewx user's group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

gjr80

unread,
Jun 3, 2014, 8:31:19 PM6/3/14
to weewx...@googlegroups.com
On Wednesday, 4 June 2014 10:18:24 UTC+10, Daniel Rich wrote:
I went ahead and pulled out my meta refresh, fixing the clientraw path (just removing the leading / since it is in the same directory) got the data refreshing going. That might be a good tip to have in the wiki, I'm not sure I ever would have thought of that!

I'll look at the thermometer code when if I get some time later this evening. I don't really want that reloading every 30 seconds, the temperature had better not be changing that fast! :-) I'm sure I can leverage the same code for reloading my header image.

Thanks again for the pointers!


No probs. Bit of a fine line between repeating what is included in Saratoga install instructions and what is in Weewx-WD. Locations/paths has been a bit of a gotcha so will certainly be covering it to some degree when I update/create a few wiki pages.

Daniel Rich

unread,
Jun 3, 2014, 8:50:00 PM6/3/14
to weewx...@googlegroups.com
The graphs are easy... just edit wxgraphs.php and look for the line (make a backup copy first):
  <?php if($SITE['WXsoftware'] == 'WD') { // Weather-Display graph names ?>
replace everything between that and the line that contains "// end WD graph names    ?>" with the following:

        <h2><a href=#"" onclick="set_ajax_uom('dayplots',true);set_ajax_uom('weekplots',false);set_ajax_uom('monthplots',false);">Last 24 Hours</a>
          <a href="#" onclick="set_ajax_uom('dayplots',false);set_ajax_uom('weekplots',true);set_ajax_uom('monthplots',false);">Last Week</a>
          <a href="#" onclick="set_ajax_uom('dayplots',false);set_ajax_uom('weekplots',false);set_ajax_uom('monthplots',true);">Last Month</h2>
        <div id="dayplots">
        <h1><?php langtrans('Last 24 Hours'); ?></h1>
          <img src="daytempdew.png"   alt="temperatures" />
          <img src="daytempchill.png" alt="heatchill" />
          <img src="dayrain.png"      alt="rain" />
          <img src="daywind.png"      alt="wind" />
          <img src="daybarometer.png" alt="barometer"/>
          <img src="daywinddir.png"   alt="Hi Wind" />
          <img src="dayinside.png"    alt="Inside" />
          <img src="daywindvec.png"   alt="Wind Vector" />
          <img src="dayrx.png"        alt="day rx percent"/>
        </div> <!-- End id "plots" -->
        <div id="weekplots" style="display: none;">
        <h1><?php langtrans('Last Week'); ?></h1>
          <img src="weektempdew.png" alt="temperatures" />
          <img src="weektempchill.png" alt="heatchill" />
          <img src="weekrain.png" alt="rain" />
          <img src="weekwind.png" alt="wind" />
          <img src="weekbarometer.png" alt="barometer"/>
          <img src="weekwinddir.png" alt="Hi Wind" />
          <img src="weekinside.png" alt="Inside" />
          <img src="weekwindvec.png" alt="Wind Vector" />
          <img src="weekrx.png" alt="week rx percent"/>
        </div>
        <div id="monthplots" style="display: none;">
        <h1><?php langtrans('Last Month'); ?></h1>
          <img src="monthtempdew.png" alt="temperatures" />
          <img src="monthtempchill.png" alt="heatchill" />
          <img src="monthrain.png" alt="rain" />
          <img src="monthwind.png" alt="wind" />
          <img src="monthbarometer.png" alt="barometer"/>
          <img src="monthwinddir.png" alt="Hi Wind" />
          <img src="monthinside.png" alt="Inside" />
          <img src="monthwindvec.png" alt="Wind Vector" />
          <img src="monthrx.png" alt="month rx percent"/>
        </div>

For the wind rose you need to do two things.
  1. Find dirplot.gif in WD-trends-inc.php and replace it with daywindrose.png.
  2. Edit skins/Testtags/skins.conf and add user.imageStackedWindRose.ImageStackedWindRoseGenerator to the "generator_list =" line.

After you restart weewx it should generate daywindrose.png the next time it runs. You may have to tweak WD-trends-inc.php to point it to the right place to find where the generator puts the image (I have everything in the same directory).

gjr80

unread,
Jun 3, 2014, 9:16:01 PM6/3/14
to weewx...@googlegroups.com
FWIW I have just pushed Weewx-WD v0.9.3 to bitbucket. Essentially fixes the errors that have been highlighted in these and other posts over the last week or so. Of note it also fixes a logic error in the Stacked Wind Rose code so it might be worth while replacing imageStackedWindRose.py if you are using an earlier version. Weewx 2.6.3 is requried.

Still a few documents to catch up on though.

Gary

sesy...@gmail.com

unread,
Jun 4, 2014, 12:26:56 AM6/4/14
to weewx...@googlegroups.com
Thanks Dan,
I am working through these.  First I get this in the syslog:
Jun  4 00:08:25 raspberrypi weewx[12930]:         ****    File "/home/weewx/bin/weewx/reportengine.py", line 298, in start
Jun  4 00:08:25 raspberrypi weewx[12930]:         ****      self.run()
Jun  4 00:08:25 raspberrypi weewx[12930]:         ****    File "/home/weewx/bin/user/imageStackedWindRose.py", line 54, in run
Jun  4 00:08:25 raspberrypi weewx[12930]:         ****      self.setup()
Jun  4 00:08:25 raspberrypi weewx[12930]:         ****    File "/home/weewx/bin/user/imageStackedWindRose.py", line 60, in setup
Jun  4 00:08:25 raspberrypi weewx[12930]:         ****      self.image_dict = self.skin_dict['ImageStackedWindRoseGenerator']
Jun  4 00:08:25 raspberrypi weewx[12930]:         ****    File "/usr/lib/python2.7/dist-packages/configobj.py", line 567, in __getitem__
Jun  4 00:08:25 raspberrypi weewx[12930]:         ****      val = dict.__getitem__(self, key)
Jun  4 00:08:25 raspberrypi weewx[12930]:         ****  KeyError: 'ImageStackedWindRoseGenerator'
Jun  4 00:08:25 raspberrypi weewx[12930]:         ****  Generator terminated...

I assume I must have missed something in the installation. The imageStackedWindRoseGenerator.py is in the user directory.


My graphs are in the public_html directory and WD is in public_html/WD/.  So I have had to change the directory in wxgraphs.php to reflect that difference.  It is still not working, maybe it will be easier to move everything to the public_html directory.

gjr80

unread,
Jun 4, 2014, 12:38:04 AM6/4/14
to weewx...@googlegroups.com
Steve,

I expect you will are missing the [ImageStackedWindRoseGenerator] section in the skin.conf that is calling the generator. If you have a look in Weewx-WD v0.9.3 under skins/WD/StackedWindRose you will find a skin.conf with the required settings in it. Copy and paste will do it. I revised the section in v0.9.3 so the settings should be fairly self explanatory though the defaults will probably do. In the process of getting the install instructions finalised, checked and posted on the Weewx-WD wiki but they are probably 1-2 Gary days away :)

Gary

sesy...@gmail.com

unread,
Jun 4, 2014, 1:22:15 AM6/4/14
to weewx...@googlegroups.com
Thank you Gary, I have just completed that clip in and see that an windrose image was generated so that fixed the error. I just need to find where it put it... 
Steve

sesy...@gmail.com

unread,
Jun 4, 2014, 1:50:57 AM6/4/14
to weewx...@googlegroups.com
I just moved everything that was in the WD directory to the public_html directory and everything is working. I decide that it was easier to move the whole thing than to find each place where a different directory was required.  Now to get the lightning counter showing up and there is an issue with my owfs driver in regards to rain rate.
Thanks for your help and direction Gary and Dan.
Steve

On Wednesday, June 4, 2014 12:38:04 AM UTC-4, gjr80 wrote:

gjr80

unread,
Jun 4, 2014, 1:55:53 AM6/4/14
to weewx...@googlegroups.com

On Wednesday, 4 June 2014 15:50:57 UTC+10, sesy...@gmail.com wrote:
Now to get the lightning counter showing up and there is an issue with my owfs driver in regards to rain rate.

You're on you own with that one :)
Reply all
Reply to author
Forward
0 new messages