weewx and displaying data in local time rather than UTC.

850 views
Skip to first unread message

Andrej R

unread,
Aug 1, 2015, 8:41:26 PM8/1/15
to weewx-user
Hi All,

I managed to install weewx on my beaglebone black (running Debian 8) yesterday, and it detected my Fine Offset ws-1081pc
without too much drama.

I managed to integrate it with apache2 with some futzing (the doco doesn't quite match reality), and am pretty much happy with
the way things are, except for the fact that the graphs and time-stamps are in UTC on the web-page.  I can't find anywhere how
to change that; there's a code-reference here http://www.weewx.com/docs/usersguide.htm#Time72 ... but that seems an awk-
ward thing to do, especially if you have to modify source twice a year :}

What am I missing?


Cheers
Andrej

Thomas Keffer

unread,
Aug 1, 2015, 9:06:59 PM8/1/15
to weewx-user
Weewx uses the local time on your computer. If you've set it correctly, it should be good to go. If you type in 'date' on a terminal what does it show? If it's wrong, you'll have to Google how to set the time and time zone on a Beaglebone.

What was the reality/docs mismatch for Apache?

-tk

--
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 weewx-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Andrej R

unread,
Aug 1, 2015, 9:31:26 PM8/1/15
to weewx-user
Hi Tom,

Thanks for the quick response! Duh - what a moron I am. Never occurred to me to check/set the beaglebones timezone.

The mismatch was in the locations, and that the .deb in my case didn't copy/symlink weewx.conf to the apache config
directory, and the location inside the weewx.conf had to be adjusted.

Cheers,
Andrej

Thomas Keffer

unread,
Aug 1, 2015, 9:34:01 PM8/1/15
to weewx-user
Glad that worked out.

Regarding setting up Apache, did you see the section Integrating with a webserver in the User's Guide? Or, am I misunderstanding your comment?

-tk

Andrej R

unread,
Aug 1, 2015, 10:00:10 PM8/1/15
to weewx-user


On Sunday, August 2, 2015 at 1:34:01 PM UTC+12, Tom Keffer wrote:
Glad that worked out.

Heh. Ta.

 

Regarding setting up Apache, did you see the section Integrating with a webserver in the User's Guide? Or, am I misunderstanding your comment?

Sure did. And I suggested that in debian installs I shouldn't have to do anything.

 
-tk

Cheers,
Andrej 

Andrej R

unread,
Aug 1, 2015, 10:01:50 PM8/1/15
to weewx-user
it , not I. :/ I need more sleep. 


mwall

unread,
Aug 1, 2015, 10:04:47 PM8/1/15
to weewx-user
tom,

i seem to recall that debian 8 adopted the redhat convention of /var/www/html instead of the previous debian convention of /var/www

andrej, what did you have to do to get weewx web pages to show up?

m

Andrej R

unread,
Aug 2, 2015, 12:21:26 AM8/2/15
to weewx-user


On Sunday, August 2, 2015 at 2:04:47 PM UTC+12, mwall wrote:

Hi m

tom,

i seem to recall that debian 8 adopted the redhat convention of /var/www/html instead of the previous debian convention of /var/www

andrej, what did you have to do to get weewx web pages to show up?

Let's see what this old brain can remember :}

The new debian seems to have changed more than just the /var/www/html part.

It also changed /etc/apache2/conf.d to /etc/apache2/conf-available and  /etc/apache2/conf-enabled respectively.

So ... 
cp /etc/weewx/apache/conf.d/weewx.conf /etc/apache2/conf-available
Edit that to point at /var/www/weewx instead of /home/weewx/public_html
I took the liberty to modify the new apache config to point @ /var/www as the Documentroot because I didn't like the extra html part,
and the beaglebone won't run any webby things other than weewx and icinga.
a2enconf weewx

I think that's it.



Cheers,
Andrej



Kenneth Baker

unread,
Aug 3, 2015, 5:35:57 PM8/3/15
to weewx...@googlegroups.com

It looks like there is a minor mismatch between what weewx-rsyncupload expects and
the output of rsync >= 3.1.

In rsync 3.1 the statistics output line "Number of files transferred" has been
changed to "Number of regular files transferred" (the 3.1 rsync man page notes this
is just an addition of the string "regular").

This causes the weewx to not log the number of files and bytes transferred by rsync

Below is a possible diff to address this...

Thanks!

-- Ken



===================================================================
--- bin/weeutil/rsyncupload.py (revision 2834)
+++ bin/weeutil/rsyncupload.py (working copy)
@@ -98,7 +98,11 @@
# get number of files and bytes transferred and produce an
# appropriate message
try:
- N = rsyncinfo['Number of files transferred']
+ if 'Number of regular files transferred' in rsyncinfo:
+ N = rsyncinfo['Number of regular files transferred']
+ else:
+ N = rsyncinfo['Number of files transferred']
+
Nbytes = rsyncinfo['Total transferred file size']
if N is not None and Nbytes is not None:
rsync_message = "rsync'd %d files (%s) in %%0.2f seconds" %
(int(N), Nbytes)

Chip Cuccio

unread,
Aug 4, 2015, 9:20:34 AM8/4/15
to weewx...@googlegroups.com
On Mon, Aug 3, 2015 at 4:35 PM, Kenneth Baker <bak...@umich.edu> wrote:
>
> It looks like there is a minor mismatch between what weewx-rsyncupload expects and
> the output of rsync >= 3.1.
>
> In rsync 3.1 the statistics output line "Number of files transferred" has been
> changed to "Number of regular files transferred" (the 3.1 rsync man page notes this
> is just an addition of the string "regular").

Thanks Ken. I noticed this after my Jessie upgrade, resulting in rsync
v 3.1.1. Your patch works great on my end.

Tom, I've entered pull request #59 for this.

Thomas Keffer

unread,
Aug 4, 2015, 9:34:02 AM8/4/15
to weewx-user
Thanks, Chip!

-tk

Kenneth Baker

unread,
Aug 4, 2015, 4:59:59 PM8/4/15
to weewx...@googlegroups.com

Thanks y'all!

-- Ken
Reply all
Reply to author
Forward
0 new messages