Getting the RPi 3 with Davis Vantage up and running

769 views
Skip to first unread message

monmul

unread,
Jan 5, 2019, 8:37:27 PM1/5/19
to weewx-user
I am new to weewx and am trying to set it up on my Rpi 3. I have a Davis Vantage weather station. I have a serial Envoy data logger attaced to my Rpi with a serial/usb converter. In following the set up instructions, I get these errors!

sudo weewxd weewx.conf
Traceback (most recent call last):
  File "/usr/bin/weewxd", line 64, in <module>
    weewx.engine.main(options, args)
  File "/usr/share/weewx/weewx/engine.py", line 835, in main
    sane = os.stat(config_path).st_ctime
OSError: [Errno 2] No such file or directory: '/home/pi/weewx.conf'
pi@Weatherpi:~ $ tail -f /var/log/syslog
Jan  6 13:37:43 Weatherpi bluetoothd[843]: Endpoint unregistered: sender=:1.16 path=/MediaEndpoint/A2DPSink
Jan  6 13:37:47 Weatherpi dhcpcd[498]: wlan0: no IPv6 Routers available
Jan  6 13:37:48 Weatherpi dhcpcd[498]: eth0: no IPv6 Routers available
Jan  6 13:37:57 Weatherpi systemd[852]: Time has been changed
Jan  6 13:37:57 Weatherpi systemd[1]: Time has been changed
Jan  6 13:41:05 Weatherpi rsyslogd-2007: action 'action 17' suspended, next retry is Sun Jan  6 13:41:35 2019 [try http://www.rsyslog.com/e/2007 ]
Jan  6 13:41:06 Weatherpi weewx[1515]: engine: Initializing weewx version 3.8.2
Jan  6 13:41:06 Weatherpi weewx[1515]: engine: Using Python 2.7.9 (default, Sep 26 2018, 05:58:52) #012[GCC 4.9.2]
Jan  6 13:41:06 Weatherpi weewx[1515]: engine: Platform Linux-4.9.35-v7+-armv7l-with-debian-8.0
Jan  6 13:41:06 Weatherpi weewx[1515]: engine: Locale is 'en_GB.UTF-8'
Jan  6 13:52:34 Weatherpi systemd[1]: Starting Cleanup of Temporary Directories...
Jan  6 13:52:34 Weatherpi rsyslogd-2007: action 'action 17' suspended, next retry is Sun Jan  6 13:53:04 2019 [try http://www.rsyslog.com/e/2007 ]
Jan  6 13:52:35 Weatherpi systemd[1]: Started Cleanup of Temporary Directories.
Jan  6 13:55:28 Weatherpi wpa_supplicant[590]: wlan0: WPA: Group rekeying completed with 30:5a:3a:cd:e7:f0 [GTK=CCMP]
Jan  6 13:55:28 Weatherpi rsyslogd-2007: action 'action 17' suspended, next retry is Sun Jan  6 13:55:58 2019 [try http://www.rsyslog.com/e/2007 ]
Jan  6 13:55:28 Weatherpi wpa_supplicant[590]: wlan0: WPA: Group rekeying completed with 30:5a:3a:cd:e7:f0 [GTK=CCMP]

Please where have I gone wrong?

.....................................................................................................................................................

Hi,

It appears that you are in the /home/pi directory and hence weewxd is looking for weewx.conf in /home/pi. Use the full path for weewx.conf ie:

$ sudo weewxd /etc/weewx/weewx.conf

Gary

Message has been deleted

monmul

unread,
Jan 5, 2019, 10:25:56 PM1/5/19
to weewx-user
OK, with the correct path!....still no joy!


pi@Weatherpi:/ $ sudo weewxd /etc/weewx/weewx.conf
Traceback (most recent call last):
  File "/usr/bin/weewxd", line 64, in <module>
    weewx.engine.main(options, args)
  File "/usr/share/weewx/weewx/engine.py", line 871, in main
    engine = engine_class(config_dict)
  File "/usr/share/weewx/weewx/engine.py", line 75, in __init__
    self.preLoadServices(config_dict)
  File "/usr/share/weewx/weewx/engine.py", line 116, in preLoadServices
    self.stn_info = weewx.station.StationInfo(self.console, **config_dict['Station'])
  File "/usr/share/weewx/weewx/station.py", line 49, in __init__
    self.latitude_f      = float(stn_dict['latitude'])
ValueError: invalid literal for float(): -45.060031 168.566948
pi@Weatherpi:/ $ 

gjr80

unread,
Jan 5, 2019, 10:39:06 PM1/5/19
to weewx-user
Ok, it looks like you have a problem with your latitude and longitude in weewx.conf. You should have two lines similar to:

    # Latitude and longitude in decimal degrees
    latitude
= aaa.bbb
    longitude
= xxx.yyyy

If you can't find the problem I suggest you post a copy of your weewx.conf with any sensitive info/password/api keys etc removed.

Gary

monmul

unread,
Jan 5, 2019, 10:39:54 PM1/5/19
to weewx-user
Sorry my error....the latitude and longitude were formatted incorrectly in the config file.....works now!

Andrew Milner

unread,
Jan 5, 2019, 10:46:33 PM1/5/19
to weewx-user
what have you set latitude and longitude to in weewx.conf??  The error implies latitude is wrongly set

monmul

unread,
Jan 5, 2019, 10:53:05 PM1/5/19
to weewx-user
Yes thank you all for your help I caught that error.....but now I have a new set as I try and set up nginx!
.
.
pi@Weatherpi:~ $ sudo mkdir -p /var/weewx/reports
pi@Weatherpi:~ $ sudo mount -a
mount: /etc/fstab: parse error: ignore entry at line 6.
pi@Weatherpi:~ $ sudo sed -i -e ‘s%HTML_ROOT =.*%HTML_ROOT = /var/weewx/reports%’ /etc/weewx/weewx.conf
sed: -e expression #1, char 1: unknown command: `�'
pi@Weatherpi:~ $ sudo service weewx restart
pi@Weatherpi:~ $ sudo ln -s /var/weewx/reports /var/www/html/weewx
pi@Weatherpi:~ $ 
.
.
.

monmul

unread,
Jan 5, 2019, 10:56:39 PM1/5/19
to weewx-user
Great! I have managed to get my information through to Weather Underground!


On Sunday, 6 January 2019 14:37:27 UTC+13, monmul wrote:

monmul

unread,
Jan 5, 2019, 11:04:26 PM1/5/19
to weewx-user
Is this normal?....i.e. waking up a sleeping console....see below!
.
.
241, dayET: 0.0, dayRain: 1.1496062995, dewpoint: 58.5620048927, extraAlarm1: 0, extraAlarm2: 0, extraAlarm3: 0, extraAlarm4: 0, extraAlarm5: 0, extraAlarm6: 0, extraAlarm7: 0, extraAlarm8: 0, forecastIcon: 3, forecastRule: 192, heatindex: 60.0, humidex: 66.8739411693, inDewpoint: 55.0283705113, inHumidity: 53.0, insideAlarm: 0, inTemp: 73.2, leafWet4: 0.0, maxSolarRad: None, monthET: 0.0, monthRain: 1.22047244125, outHumidity: 95.0, outsideAlarm1: 0, outsideAlarm2: 0, outTemp: 60.0, rain: 0.0, rainAlarm: 0, rainRate: 0.0, soilLeafAlarm1: 0, soilLeafAlarm2: 0, soilLeafAlarm3: 0, soilLeafAlarm4: 0, stormRain: 1.1496062995, stormStart: 1544094000, sunrise: 1546702920, sunset: 1546758180, trendIcon: -20, txBatteryStatus: 0, usUnits: 1, windchill: 60.0, windDir: None, windGust: 0.0, windGustDir: None, windSpeed: 0.0, windSpeed10: 0.0, yearET: 0.0, yearRain: 34.0000000085
Unable to wake up console... sleeping
Unable to wake up console... retrying
LOOP:   2019-01-06 17:00:46 NZDT (1546747246) appTemp: 62.7512992774, barometer: 29.609, cloudbase: 1376.81706984, consBatteryVoltage: 3.03, dateTime: 1546747246, dayET: 0.0, dayRain: 1.1496062995, dewpoint: 58.5620048927, extraAlarm1: 0, extraAlarm2: 0, extraAlarm3: 0, extraAlarm4: 0, extraAlarm5: 0, extraAlarm6: 0, extraAlarm7: 0, extraAlarm8: 0, forecastIcon: 3, forecastRule: 192, heatindex: 60.0, humidex: 66.8739411693, inDewpoint: 55.0283705113, inHumidity: 53.0, insideAlarm: 0, inTemp: 73.2, leafWet4: 0.0, maxSolarRad: None, monthET: 0.0, monthRain: 1.22047244125, outHumidity: 95.0, outsideAlarm1: 0, outsideAlarm2: 0, outTemp: 60.0, rain: 0.0, rainAlarm: 0, rainRate: 0.0, soilLeafAlarm1: 0, soilLeafAlarm2: 0, soilLeafAlarm3: 0, soilLeafAlarm4: 0, stormRain: 1.1496062995, stormStart: 1544094000, sunrise: 1546702920, sunset: 1546758180, trendIcon: -20, txBatteryStatus: 0, usUnits: 1, windchill: 60.0, windDir: None, windGust: 0.0, windGustDir: None, windSpeed: 0.0, windSpeed10: 0.0, yearET: 0.0, yearRain: 34.0000000085
Unable to wake up console... sleeping
Unable to wake up console... retrying
LOOP:   2019-01-06 17:00:51 NZDT (1546747251) appTemp: 62.7512992774, barometer: 29.609, cloudbase: 1376.81706984, consBatteryVoltage: 3.03, dateTime: 1546747251, dayET: 0.0, dayRain: 1.1496062995, dewpoint: 58.5620048927, extraAlarm1: 0, extraAlarm2: 0, extraAlarm3: 0, extraAlarm4: 0, extraAlarm5: 0, extraAlarm6: 0, extraAlarm7: 0, extraAlarm8: 0, forecastIcon: 3, forecastRule: 192, heatindex: 60.0, humidex: 66.8739411693, inDewpoint: 55.0283705113, inHumidity: 53.0, insideAlarm: 0, inTemp: 73.2, leafWet4: 0.0, maxSolarRad: None, monthET: 0.0, monthRain: 1.22047244125, outHumidity: 95.0, outsideAlarm1: 0, outsideAlarm2: 0, outTemp: 60.0, rain: 0.0, rainAlarm: 0, rainRate: 0.0, soilLeafAlarm1: 0, soilLeafAlarm2: 0, soilLeafAlarm3: 0, soilLeafAlarm4: 0, stormRain: 1.1496062995, stormStart: 1544094000, sunrise: 154670292

gjr80

unread,
Jan 5, 2019, 11:08:51 PM1/5/19
to weewx-user
Depends, are loop and archive records being properly (and regularly) received/created ? If so it is fine, if not then we look deepre.

Gary

monmul

unread,
Jan 5, 2019, 11:20:09 PM1/5/19
to weewx-user
Hmmm! I would have to pass on that one....I am not sure I even know what it means.....is it something I set up when following the instructions about installing nginx?

One other thing....I have not done anything about setting up the NTP Daemon thing....do I need to do that also?

gjr80

unread,
Jan 5, 2019, 11:52:24 PM1/5/19
to weewx-user
On Sunday, 6 January 2019 14:20:09 UTC+10, monmul wrote:
Hmmm! I would have to pass on that one....I am not sure I even know what it means.....is it something I set up when following the instructions about installing nginx?

Ok, you posted a screen capture with a couple of loop packets (the lines starting with LOOP: ). This was part of the output you would have seen when you ran weewx directly using sudo weewxd /etc/weewx/weewx.conf. Since you only showed us a couple of loop packets things could be running fine, its hard to say with such a small snapshot. The loop packets were 5 seconds apart, if you station emits loop packets every 5 seconds then this is fine, if it emits loop packets every 2 seconds then maybe there is an issue. Having a look at a good couple of archive periods of output would give a better feel for things rather than just a couple of loop packets. We would also see some archive records (they occur once per archive period) and start with REC: on screen. Would also be handy to know the station type/model.

You might want to have a read through Loop packets vs. archive records in the Customization Guide - it will give you a bit of background. Also, have a look at your log (likely /var/log/syslog) from when you start weeWX, you will see a whole pile of info there as to how your station and weeWX are configured. teh log is good for seeing startup config and events as they happen (including errors). Screen output from running weeWX directly is handy for seeing the actual data weeWX gets off the station.

nginx will have nothing to do it, nginx is purely serving web pages/data to your browser, the sleeping/retrying etc is weeWX interacting with your weather station.
 
One other thing....I have not done anything about setting up the NTP Daemon thing....do I need to do that also?

Horses for courses. If it were me I would get NTP setup and working properly. Correct time is critical for weeWX to operate trouble free, some really bad and unusual things happen if weeWX and your station have significantly different times. That being said, once you have the correct time set all will likely be well until you have to reboot or turn your RPi off or there is a power interruption. RPis (as distinct from a desktop type PC or laptop) are a common source of concern as they have no battery backed clock for when the power is off, they have a fake hardware clock that can come up in the past. Various improvements have been applied to weeWX over the years to make it better handle temporal displacements and it is probably the best it has been but as a minimum I would get NTP up and running and I would also consider an add-on battery backed RTC module, they are just a couple of dollars on ebay or the like.

Gary

monmul

unread,
Jan 5, 2019, 11:54:11 PM1/5/19
to weewx-user
WOW! I am up and running...see attached.....thank you all for your help!
WeeWX_upandrunning.png

monmul

unread,
Jan 6, 2019, 12:39:44 AM1/6/19
to weewx-user
This is all I could find on the syslog....no errors given so I will ignore the LOOP etc

Jan  6 18:25:20 Weatherpi weewx[831]: engine: Loading station type Vantage (weewx.drivers.vantage)
Jan  6 18:25:20 Weatherpi weewx[831]: import of driver failed: [Errno 11] Resource temporarily unavailable (<type 'exceptions.OSError'>)
Jan  6 18:25:20 Weatherpi weewx[688]: vantage: No <ACK> received from console
Jan  6 18:25:20 Weatherpi weewx[831]: engine: Unable to load driver: [Errno 11] Resource temporarily unavailable
Jan  6 18:25:20 Weatherpi weewx[831]:     ****  Exiting...
Jan  6 18:25:20 Weatherpi ntpd_intres[684]: host name not found: 0.debian.pool.ntp.org
Jan  6 18:25:20 Weatherpi ntpd_intres[684]: host name not found: 1.debian.pool.ntp.org
Jan  6 18:25:20 Weatherpi ntpd_intres[684]: host name not found: 2.debian.pool.ntp.org
Jan  6 18:25:20 Weatherpi ntpd_intres[684]: host name not found: 3.debian.pool.ntp.org
Jan  6 18:25:20 Weatherpi weewx[688]: vantage: No <ACK> received from console
Jan  6 18:25:20 Weatherpi weewx[688]: vantage: No <ACK> received from console
Jan  6 18:25:20 Weatherpi avahi-daemon[468]: Joining mDNS multicast group on interface eth0.IPv6 with address fe80::1cc0:5dfe:d383:8c98.
Jan  6 18:25:20 Weatherpi avahi-daemon[468]: New relevant interface eth0.IPv6 for mDNS.

rich T

unread,
Jan 6, 2019, 12:45:15 AM1/6/19
to weewx-user
As for a real time clock, I use a DS3231 Real Time Clock (RTC) module that provides the clock for the my RPI3.

Rich  




Message has been deleted

Scott Grayban

unread,
Jan 6, 2019, 12:50:36 AM1/6/19
to weewx-user
Forget that... you need to edit your /etc/resolv.conf

Add
nameserver 8.8.8.8
nameserver 8.8.4.4

Or whatever your dns is suppose to resolve to.

On Saturday, January 5, 2019 at 9:47:00 PM UTC-8, Scott Grayban wrote:
You need to fix this..

apt install ntp

ntpd_intres[684]: host name not found: 0.debian.pool.ntp.org

monmul

unread,
Jan 6, 2019, 12:51:13 AM1/6/19
to weewx-user
Is there a ¨How To¨ for setting up the NTP on the RPi?

Scott Grayban

unread,
Jan 6, 2019, 12:52:25 AM1/6/19
to weewx-user
apt install ntp
service ntp restart

Scott Grayban

unread,
Jan 6, 2019, 12:54:01 AM1/6/19
to weewx-user
Most people don't know or think it's too hard to to add one.

dunbrokin

unread,
Jan 6, 2019, 1:09:18 AM1/6/19
to weewx...@googlegroups.com
The nameserver in my Pi /etc/resolv.cont is 10.1.1.1.....as that is my modem?
But these are extenal IP addresses....will that work?

--
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.

Scott Grayban

unread,
Jan 6, 2019, 1:11:36 AM1/6/19
to weewx-user
Does your PI have this file ?

/etc/resolvconf.conf

rich T

unread,
Jan 6, 2019, 1:18:28 AM1/6/19
to weewx-user

Scott Grayban

unread,
Jan 6, 2019, 1:21:25 AM1/6/19
to weewx-user
Rich having or not having a RTC isn't the issue.... read his post about dns resolve

rich T

unread,
Jan 6, 2019, 1:28:15 AM1/6/19
to weewx-user
Okay Scott,  just giving another possible option. 

Scott Grayban

unread,
Jan 6, 2019, 1:37:05 AM1/6/19
to weewx-user
Having RTC won't help with his error.....

Jan  6 18:25:20 Weatherpi ntpd_intres[684]: host name not found: 0.debian.pool.ntp.org
Jan  6 18:25:20 Weatherpi ntpd_intres[684]: host name not found: 1.debian.pool.ntp.org
Jan  6 18:25:20 Weatherpi ntpd_intres[684]: host name not found: 2.debian.pool.ntp.org
Jan  6 18:25:20 Weatherpi ntpd_intres[684]: host name not found: 3.debian.pool.ntp.org

As you can see it's calling ntpd_intres complaining that dns isn't resolving. A RTC won't help with that.

dunbrokin

unread,
Jan 6, 2019, 1:43:45 AM1/6/19
to weewx...@googlegroups.com
Yes it does!

rich T

unread,
Jan 6, 2019, 1:44:54 AM1/6/19
to weewx-user
Okay.  I understand what you are saying, but was offering an additional solution.

dunbrokin

unread,
Jan 6, 2019, 1:54:11 AM1/6/19
to weewx...@googlegroups.com
....as in yes it does have a resolvconf.conf file.....just in case there was confusion!

On a totally different topic, Is there some where I can use an offset of 180 degrees for the wind? I cannot find it in the config file?

Scott Grayban

unread,
Jan 6, 2019, 1:56:45 AM1/6/19
to weewx-user
Paste the contents of that file here

On Saturday, January 5, 2019 at 10:43:45 PM UTC-8, monmul wrote:
Yes it does!

monmul

unread,
Jan 6, 2019, 3:25:34 AM1/6/19
to weewx-user

# Configuration for resolvconf(8)
# See resolvconf.conf(5) for details

resolv_conf=/etc/resolv.conf
# If you run a local name server, you should uncomment the below line and
# configure your subscribers configuration files below.
#name_servers=127.0.0.1

# Mirror the Debian package defaults for the below resolvers
# so that resolvconf integrates seemlessly.
dnsmasq_resolv=/var/run/dnsmasq/resolv.conf
pdnsd_conf=/etc/pdnsd.conf
unbound_conf=/var/cache/unbound/resolvconf_resolvers.conf

Scott Grayban

unread,
Jan 6, 2019, 3:54:12 AM1/6/19
to weewx-user
Ok replace that with this then reboot the PI and look at your weewx log again for the ntp sync.

After reboot your /etc/resolv.conf should have those name servers listed

# Configuration for resolvconf(8)
# See resolvconf.conf(5) for details

resolv_conf=/etc/resolv.conf
# If you run a local name server, you should uncomment the below line and
# configure your subscribers configuration files below.
#nameserver 127.0.0.1
nameserver 8.8.8.8
nameserver 8.8.4.4

dunbrokin

unread,
Jan 6, 2019, 3:11:28 PM1/6/19
to weewx...@googlegroups.com
Great, thanks, will do.....does this now get around the installation of NTP daemon as recommended in the set up instructions?

Scott Grayban

unread,
Jan 6, 2019, 3:14:04 PM1/6/19
to Abridged recipients
If it works yes.

dunbrokin

unread,
Jan 6, 2019, 3:20:24 PM1/6/19
to weewx...@googlegroups.com
Just for the record, for anybody following this discussion, there is a slight difference in my file to the solution shown above....not sure it makes much difference; but it may save some confusion.

min has "name_server" instead of "nameserver". I am assuming that "name_server" is the one I should use.

dunbrokin

unread,
Jan 6, 2019, 3:20:44 PM1/6/19
to weewx...@googlegroups.com
Thank you so much for your help Scott!

Scott Grayban

unread,
Jan 6, 2019, 3:23:55 PM1/6/19
to Abridged recipients
Use

nameserver not name_server

dunbrokin

unread,
Jan 6, 2019, 3:27:15 PM1/6/19
to weewx...@googlegroups.com
OK will do again. Just looked in the resolv.,conf file.....I get nameserver 8.8.4.4 but not the 8.8.8.8!

dunbrokin

unread,
Jan 6, 2019, 3:30:08 PM1/6/19
to weewx...@googlegroups.com
Using nameserver instead of name_server means that none of them appear in the resolv.conf file!

Scott Grayban

unread,
Jan 6, 2019, 3:32:12 PM1/6/19
to Abridged recipients
Ahh I didn't know that. I don't install resolvconfd.
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/LGS3xtzmot0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.

dunbrokin

unread,
Jan 6, 2019, 3:36:01 PM1/6/19
to weewx...@googlegroups.com
Right I have 10.1.1.1 and 8.8.4.4 as "nameserver"  (while shown as "name_servers" in the resolvconf.conf file) in the resolv.conf file....I presume that will do the job?

dunbrokin

unread,
Jan 6, 2019, 3:40:23 PM1/6/19
to weewx...@googlegroups.com
Next issue for me is to import historic information (about 5 years worth...or just the highs and lows during that period of each measured item) into weewx? Where is the historic information stored and is there an easy way of importing the data from WeatherDisplay?

Scott Grayban

unread,
Jan 6, 2019, 3:41:48 PM1/6/19
to Abridged recipients
It should

Scott Grayban

unread,
Jan 6, 2019, 3:42:11 PM1/6/19
to Abridged recipients
That I can't help with. Sorry

dunbrokin

unread,
Jan 6, 2019, 4:10:20 PM1/6/19
to weewx...@googlegroups.com
Thank you for all your help Scott in getting me up and running.....I really appreciate it. Hopefully some other kind soul can come to the party for the next step!

Scott Grayban

unread,
Jan 6, 2019, 4:24:48 PM1/6/19
to Abridged recipients
You're very welcomed !

gjr80

unread,
Jan 6, 2019, 6:05:12 PM1/6/19
to weewx-user
Just to be clear I was just pointing out that the two places to look for info on what weeWX is doing is the console output when running weeWX directly (this shows the data coming from the station) and the log (this shows config (during startup) and any errors that may be logged). I was not necessarily expecting to see any errors in your log.

Seeing as you are using a Vantage station you should be seeing loop packets every 2 odd seconds.  Given the small screen capture showing just 2 loop packets only that were 5 seconds apart with the wakeup message between that would cause me to look more closely to see if you are somehow dropping loop packets. How often does that wakeup message appear and does it result in a dropped loop packet each time, if it occurs once a day it probably makes little difference, every second loop packet perhaps more of a difference (depends on your config). If you wanted to look into it further my suggestion was to provide a larger screen capture when running weeWX directly so we could gauge the extent of the issue (those wakeup log entries should also appear in the log - how often do they occur). Of course if you are not concerned about the wakeup /missing loop packets then you need do nothing :)

Gary

On Sunday, 6 January 2019 15:39:44 UTC+10, monmul wrote:
This is all I could find on the syslog....no errors given so I will ignore the LOOP etc

Jan  6 18:25:20 Weatherpi weewx[831]: engine: Loading station type Vantage (weewx.drivers.vantage)
Jan  6 18:25:20 Weatherpi weewx[831]: import of driver failed: [Errno 11] Resource temporarily unavailable (<type 'exceptions.OSError'>)
Jan  6 18:25:20 Weatherpi weewx[688]: vantage: No <ACK> received from console
Jan  6 18:25:20 Weatherpi weewx[831]: engine: Unable to load driver: [Errno 11] Resource temporarily unavailable
Jan  6 18:25:20 Weatherpi weewx[831]:     ****  Exiting...
Jan  6 18:25:20 Weatherpi ntpd_intres[684]: host name not found: 0.debian.pool.ntp.org
Jan  6 18:25:20 Weatherpi ntpd_intres[684]: host name not found: 1.debian.pool.ntp.org
Jan  6 18:25:20 Weatherpi ntpd_intres[684]: host name not found: 2.debian.pool.ntp.org
Jan  6 18:25:20 Weatherpi ntpd_intres[684]: host name not found: 3.debian.pool.ntp.org
Jan  6 18:25:20 Weatherpi weewx[688]: vantage: No <ACK> received from console
Jan  6 18:25:20 Weatherpi weewx[688]: vantage: No <ACK> received from console
Jan  6 18:25:20 Weatherpi avahi-daemon[468]: Joining mDNS multicast group on interface eth0.IPv6 with address fe80::1cc0:5dfe:d383:8c98.
Jan  6 18:25:20 Weatherpi avahi-daemon[468]: New relevant interface eth0.IPv6 for mDNS.


On Sunday, 6 January 2019 17:52:24 UTC+13, gjr80 wrote:
On Sunday, 6 January 2019 14:20:09 UTC+10, monmul wrote:
Hmmm! I would have to pass on that one....I am not sure I even know what it means.....is it something I set up when following the instructions about installing nginx?

Ok, you posted a screen capture with a couple of loop packets (the lines starting with LOOP: ). This was part of the output you would have seen when you ran weewx directly using sudo weewxd /etc/weewx/weewx.conf. Since you only showed us a couple of loop packets things could be running fine, its hard to say with such a small snapshot. The loop packets were 5 seconds apart, if you station emits loop packets every 5 seconds then this is fine, if it emits loop packets every 2 seconds then maybe there is an issue. Having a look at a good couple of archive periods of output would give a better feel for things rather than just a couple of loop packets. We would also see some archive records (they occur once per archive period) and start with REC: on screen. Would also be handy to know the station type/model.

You might want to have a read through Loop packets vs. archive records in the Customization Guide - it will give you a bit of background. Also, have a look at your log (likely /var/log/syslog) from when you start weeWX, you will see a whole pile of info there as to how your station and weeWX are configured. teh log is good for seeing startup config and events as they happen (including errors). Screen output from running weeWX directly is handy for seeing the actual data weeWX gets off the station.

nginx will have nothing to do it, nginx is purely serving web pages/data to your browser, the sleeping/retrying etc is weeWX interacting with your weather station.
 
One other thing....I have not done anything about setting up the NTP Daemon thing....do I need to do that also?

Horses for courses. If it were me I would get NTP setup and working properly. Correct time is critical for weeWX to operate trouble free, some really bad and unusual things happen if weeWX and your station have significantly different times. That being said, once you have the correct time set all will likely be well until you have to reboot or turn your RPi off or there is a power interruption. RPis (as distinct from a desktop type PC or laptop) are a common source of concern as they have no battery backed clock for when the power is off, they have a fake hardware clock that can come up in the past. Various improvements have been applied to weeWX over the years to make it better handle temporal displacements and it is probably the best it has been but as a minimum I would get NTP up and running and I would also consider an add-on battery backed RTC module, they are just a couple of dollars on ebay or the like.

Gary

gjr80

unread,
Jan 6, 2019, 6:22:02 PM1/6/19
to weewx-user
WeeWX stores its data in the archive table in your weewx database, one archive record per row. A summary table is created for each observation field that records daily highs/lows/sums, counts and times etc. These summary tables are used as an optimization strategy when aggregates are sought from the historical data. There are a couple of ways to import data. the first is the use of the weeWX utility wee_import, this is the preferred way to import data but it only supports importing data from a CSV format file, Cumulus monthly log files and Weatherunderground. The other approach is to manually add rows to the archive table and then rebuild the daily summaries. Rebuilding the daily summaries is easy using wee_database, adding rows to the archive will be a slow manual process. You may think that adding highs/lows to the daily summaries is a solution, it is not.

In terms of importing your WD data I guess the options are limited, I have little WD knowledge but if you can get the data into one of the formats supported by wee_import that would work (if you google the weewx forums this has come up once or twice before, not sure if there was a third party utility that converted WD data into a format that wee_import supports). Manually adding data is going to take a long time considering you have 5 years of data. I have had a task to add WD support to wee_import for some time now, there has been little call for it so it has taken a back seat. I am happy to look into this again, it won't happen today or tomorrow but then again that is the beauty of importing historical data, the data is not going anywhere so the time imperative is not there. If I have some details about the data structure and format I can look at what be done with wee_import.

A word of warning, manipulating the weeWX database manually can be hazardous to the continued good and proper operation of weeWX, do so at your own risk and always make sure you have a backup of your database.

Gary

dunbrokin

unread,
Jan 6, 2019, 8:22:16 PM1/6/19
to weewx...@googlegroups.com
Thanks for that Gary, I might have to park the history project for a while as I seem to have bigger problems!

I had everything running nicely - updating WU and was able to see my output on index.html.....and then I went headless... shutdown pulled out the screen, keyboard and mouse and rebooted.....now it will not update WU nor can I see it working on file:///var/www/html/weewx/index.html.....Hmmmmm! I wonder what I might have done wrong now!

dunbrokin

unread,
Jan 6, 2019, 8:51:24 PM1/6/19
to weewx-user
No, its not that...I have set weewx up to start on boot....and it was doing so when not headless....so I presumed it would be the same when it was running headless....

On Mon, Jan 7, 2019 at 2:28 PM monmul <dunb...@gmail.com> wrote:
Duh! thanks Gary!

On Sunday, 6 January 2019 14:37:27 UTC+13, monmul wrote:
I am new to weewx and am trying to set it up on my Rpi 3. I have a Davis Vantage weather station. I have a serial Envoy data logger attaced to my Rpi with a serial/usb converter. In following the set up instructions, I get these errors!

sudo weewxd weewx.conf
Traceback (most recent call last):
  File "/usr/bin/weewxd", line 64, in <module>
    weewx.engine.main(options, args)
  File "/usr/share/weewx/weewx/engine.py", line 835, in main
    sane = os.stat(config_path).st_ctime
OSError: [Errno 2] No such file or directory: '/home/pi/weewx.conf'
pi@Weatherpi:~ $ tail -f /var/log/syslog
Jan  6 13:37:43 Weatherpi bluetoothd[843]: Endpoint unregistered: sender=:1.16 path=/MediaEndpoint/A2DPSink
Jan  6 13:37:47 Weatherpi dhcpcd[498]: wlan0: no IPv6 Routers available
Jan  6 13:37:48 Weatherpi dhcpcd[498]: eth0: no IPv6 Routers available
Jan  6 13:37:57 Weatherpi systemd[852]: Time has been changed
Jan  6 13:37:57 Weatherpi systemd[1]: Time has been changed
Jan  6 13:41:05 Weatherpi rsyslogd-2007: action 'action 17' suspended, next retry is Sun Jan  6 13:41:35 2019 [try http://www.rsyslog.com/e/2007 ]
Jan  6 13:41:06 Weatherpi weewx[1515]: engine: Initializing weewx version 3.8.2
Jan  6 13:41:06 Weatherpi weewx[1515]: engine: Using Python 2.7.9 (default, Sep 26 2018, 05:58:52) #012[GCC 4.9.2]
Jan  6 13:41:06 Weatherpi weewx[1515]: engine: Platform Linux-4.9.35-v7+-armv7l-with-debian-8.0
Jan  6 13:41:06 Weatherpi weewx[1515]: engine: Locale is 'en_GB.UTF-8'
Jan  6 13:52:34 Weatherpi systemd[1]: Starting Cleanup of Temporary Directories...
Jan  6 13:52:34 Weatherpi rsyslogd-2007: action 'action 17' suspended, next retry is Sun Jan  6 13:53:04 2019 [try http://www.rsyslog.com/e/2007 ]
Jan  6 13:52:35 Weatherpi systemd[1]: Started Cleanup of Temporary Directories.
Jan  6 13:55:28 Weatherpi wpa_supplicant[590]: wlan0: WPA: Group rekeying completed with 30:5a:3a:cd:e7:f0 [GTK=CCMP]
Jan  6 13:55:28 Weatherpi rsyslogd-2007: action 'action 17' suspended, next retry is Sun Jan  6 13:55:58 2019 [try http://www.rsyslog.com/e/2007 ]
Jan  6 13:55:28 Weatherpi wpa_supplicant[590]: wlan0: WPA: Group rekeying completed with 30:5a:3a:cd:e7:f0 [GTK=CCMP]

Please where have I gone wrong?

.....................................................................................................................................................

Hi,

It appears that you are in the /home/pi directory and hence weewxd is looking for weewx.conf in /home/pi. Use the full path for weewx.conf ie:

$ sudo weewxd /etc/weewx/weewx.conf

Gary

monmul

unread,
Jan 6, 2019, 9:14:25 PM1/6/19
to weewx-user
This is what the syslog is telling me....

Jan  7 15:04:21 Weatherpi kernel: [ 4429.981076] usb 1-1: New USB device found, idVendor=0424, idProduct=9514
Jan  7 15:04:21 Weatherpi kernel: [ 4429.981091] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
Jan  7 15:04:21 Weatherpi kernel: [ 4429.982079] hub 1-1:1.0: USB hub found
Jan  7 15:04:21 Weatherpi kernel: [ 4429.982189] hub 1-1:1.0: 5 ports detected
Jan  7 15:04:21 Weatherpi kernel: [ 4430.300691] usb 1-1.1: new high-speed USB device number 56 using dwc_otg
Jan  7 15:04:22 Weatherpi kernel: [ 4430.431143] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00
Jan  7 15:04:22 Weatherpi kernel: [ 4430.431160] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
Jan  7 15:04:22 Weatherpi kernel: [ 4430.441007] smsc95xx v1.0.5
Jan  7 15:04:22 Weatherpi systemd-udevd[3160]: failed to execute '/lib/udev/mtp-probe' 'mtp-probe /sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1 1 56': No such file or directory
Jan  7 15:04:22 Weatherpi kernel: [ 4430.545142] smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-3f980000.usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:00:74:cf
Jan  7 15:04:22 Weatherpi kernel: [ 4430.545503] usb 1-1-port2: over-current change
Jan  7 15:04:22 Weatherpi kernel: [ 4430.790726] NYET/NAK/ACK/other in non-error case, 0x00000002
Jan  7 15:04:22 Weatherpi kernel: [ 4430.790760] NYET/NAK/ACK/other in non-error case, 0x00000002
Jan  7 15:04:22 Weatherpi kernel: [ 4430.790785] NYET/NAK/ACK/other in non-error case, 0x00000002
Jan  7 15:04:22 Weatherpi kernel: [ 4430.790845] hub 1-1:1.0: hub_ext_port_status failed (err = -71)
Jan  7 15:04:22 Weatherpi avahi-daemon[440]: Withdrawing workstation service for eth0.
Jan  7 15:04:22 Weatherpi kernel: [ 4430.810779] usb 1-1: USB disconnect, device number 55
Jan  7 15:04:22 Weatherpi kernel: [ 4430.810796] usb 1-1.1: USB disconnect, device number 56
Jan  7 15:04:22 Weatherpi kernel: [ 4430.811122] smsc95xx 1-1.1:1.0 eth0: unregister 'smsc95xx' usb-3f980000.usb-1.1, smsc95xx USB 2.0 Ethernet
Jan  7 15:04:22 Weatherpi kernel: [ 4431.080820] Indeed it is in host mode hprt0 = 00021501
Jan  7 15:04:22 Weatherpi kernel: [ 4431.290672] usb 1-1: new high-speed USB device number 57 using dwc_otg
Jan  7 15:04:22 Weatherpi kernel: [ 4431.290824] Indeed it is in host mode hprt0 = 00001101
Jan  7 15:04:23 Weatherpi kernel: [ 4431.530986] usb 1-1: New USB device found, idVendor=0424, idProduct=9514
Jan  7 15:04:23 Weatherpi kernel: [ 4431.531002] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
Jan  7 15:04:23 Weatherpi kernel: [ 4431.532050] hub 1-1:1.0: USB hub found
Jan  7 15:04:23 Weatherpi kernel: [ 4431.532190] hub 1-1:1.0: 5 ports detected
Jan  7 15:04:23 Weatherpi kernel: [ 4431.640835] NYET/NAK/ACK/other in non-error case, 0x00000002
Jan  7 15:04:23 Weatherpi kernel: [ 4431.640878] NYET/NAK/ACK/other in non-error case, 0x00000002
Jan  7 15:04:23 Weatherpi kernel: [ 4431.640903] NYET/NAK/ACK/other in non-error case, 0x00000002
Jan  7 15:04:23 Weatherpi kernel: [ 4431.640968] hub 1-1:1.0: hub_ext_port_status failed (err = -71)
Jan  7 15:04:23 Weatherpi kernel: [ 4431.641029] NYET/NAK/ACK/other in non-error case, 0x00000002
Jan  7 15:04:23 Weatherpi kernel: [ 4431.641048] NYET/NAK/ACK/other in non-error case, 0x00000002
Jan  7 15:04:23 Weatherpi kernel: [ 4431.641068] NYET/NAK/ACK/other in non-error case, 0x00000002
Jan  7 15:04:23 Weatherpi kernel: [ 4431.641123] NYET/NAK/ACK/other in non-error case, 0x00000002
Jan  7 15:04:23 Weatherpi kernel: [ 4431.641142] NYET/NAK/ACK/other in non-error case, 0x00000002
Jan  7 15:04:23 Weatherpi kernel: [ 4431.641165] NYET/NAK/ACK/other in non-error case, 0x00000002
Jan  7 15:04:23 Weatherpi kernel: [ 4431.641206] usb 1-1: Failed to suspend device, error -71
Jan  7 15:04:23 Weatherpi kernel: [ 4431.800893] usb 1-1: USB disconnect, device number 57
Jan  7 15:04:23 Weatherpi kernel: [ 4432.000866] Indeed it is in host mode hprt0 = 00021501
Jan  7 15:04:23 Weatherpi kernel: [ 4432.200714] usb 1-1: new high-speed USB device number 58 using dwc_otg
Jan  7 15:04:23 Weatherpi kernel: [ 4432.200895] Indeed it is in host mode hprt0 = 00001101
Jan  7 15:04:24 Weatherpi kernel: [ 4432.430976] usb 1-1: New USB device found, idVendor=0424, idProduct=9514
Jan  7 15:04:24 Weatherpi kernel: [ 4432.430991] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
Jan  7 15:04:24 Weatherpi kernel: [ 4432.431949] hub 1-1:1.0: USB hub found
Jan  7 15:04:24 Weatherpi kernel: [ 4432.432059] hub 1-1:1.0: 5 ports detected
Jan  7 15:04:24 Weatherpi kernel: [ 4432.550724] NYET/NAK/ACK/other in non-error case, 0x00000002
Jan  7 15:04:24 Weatherpi kernel: [ 4432.550755] NYET/NAK/ACK/other in non-error case, 0x00000002
Jan  7 15:04:24 Weatherpi kernel: [ 4432.550775] NYET/NAK/ACK/other in non-error case, 0x00000002
Jan  7 15:04:24 Weatherpi kernel: [ 4432.550855] hub 1-1:1.0: hub_ext_port_status failed (err = -71)
Jan  7 15:04:24 Weatherpi kernel: [ 4432.550891] usb 1-1: USB disconnect, device number 58
Jan  7 15:04:24 Weatherpi kernel: [ 4432.750745] Indeed it is in host mode hprt0 = 00021501
Jan  7 15:04:24 Weatherpi kernel: [ 4432.950736] usb 1-1: new high-speed USB device number 59 using dwc_otg

gjr80

unread,
Jan 6, 2019, 10:38:54 PM1/6/19
to weewx-user
So you are able to SSH into the RPi? Assuming you can, once the RPi has booted check on the status of the weeWX daemon:

$ sudo systemctl status weewx

What does that show?

Also have another look at the log. There will be a lot of stuff there from when the RPi booted but you should also see some lines that have weewx and a number in square brackets eg:

Jan  6 13:41:06 Weatherpi weewx[1515]: engine: Initializing weewx version 3.8.2
Jan  6 13:41:06 Weatherpi weewx[1515]: engine: Using Python 2.7.9 (default, Sep 26 2018, 05:58:52) #012[GCC 4.9.2]
Jan  6 13:41:06 Weatherpi weewx[1515]: engine: Platform Linux-4.9.35-v7+-armv7l-with-debian-8.0
Jan  6 13:41:06 Weatherpi weewx[1515]: engine: Locale is 'en_GB.UTF-8'

What do those entries say? Post a good deal of them or right through until you see some errors from weeWX (if there are any). More is better, less just leave us guessing.

Gary

dunbrokin

unread,
Jan 7, 2019, 12:12:58 AM1/7/19
to weewx-user
@Weatherpi:~ $ sudo systemctl status weewx
● weewx.service - LSB: weewx weather system
   Loaded: loaded (/etc/init.d/weewx)
   Active: active (exited) since Mon 2019-01-07 17:17:08 NZDT; 55min ago
  Process: 510 ExecStart=/etc/init.d/weewx start (code=exited, status=0/SUCCESS)

Jan 07 17:17:08 Weatherpi weewx[594]: engine: Platform Linux-4.9.35-v7+-arm....0
Jan 07 17:17:08 Weatherpi weewx[594]: engine: Locale is 'en_GB.UTF-8'
Jan 07 17:17:08 Weatherpi weewx[594]: engine: pid file is /var/run/weewx.pid
Jan 07 17:17:08 Weatherpi weewx[806]: engine: Using configuration file /etc...nf
Jan 07 17:17:08 Weatherpi weewx[806]: engine: Loading station type Vantage ...e)
Jan 07 17:17:08 Weatherpi weewx[510]: Starting weewx weather system: weewx.
Jan 07 17:17:08 Weatherpi systemd[1]: Started LSB: weewx weather system.
Jan 07 17:17:08 Weatherpi weewx[806]: import of driver failed: could not op...>)
Jan 07 17:17:08 Weatherpi weewx[806]: engine: Unable to load driver: could ...0'
Jan 07 17:17:08 Weatherpi weewx[806]: ****  Exiting...
Hint: Some lines were ellipsized, use -l to show in full.
pi@Weatherpi:~ $ 


dunbrokin

unread,
Jan 7, 2019, 12:27:25 AM1/7/19
to weewx-user
Hmmm! Something weird is happening the cat syslog will not display as far as today and stops part way through and crashes VNC so it has to reconnect!

monmul

unread,
Jan 7, 2019, 12:41:02 AM1/7/19
to weewx-user
...and this is what I get when I go back to the screen and the Lan....instead of headless and through the wifi dongle!

pi@Weatherpi:~ $ sudo systemctl status weewx 
● weewx.service - LSB: weewx weather system
   Loaded: loaded (/etc/init.d/weewx)
   Active: active (running) since Mon 2019-01-07 18:31:04 NZDT; 6min ago
  Process: 538 ExecStart=/etc/init.d/weewx start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/weewx.service
           └─800 python /usr/bin/weewxd --daemon --pidfile=/var/run/weewx.pid...

Jan 07 18:38:01 Weatherpi weewx[800]: manager: Added record 2019-01-07 14:3...b'
Jan 07 18:38:01 Weatherpi weewx[800]: restx: Wunderground-PWS: Published re...0)
Jan 07 18:38:01 Weatherpi weewx[800]: manager: Added record 2019-01-07 14:4...b'
Jan 07 18:38:01 Weatherpi weewx[800]: manager: Added record 2019-01-07 14:4...b'
Jan 07 18:38:01 Weatherpi weewx[800]: manager: Added record 2019-01-07 14:5...b'
Jan 07 18:38:01 Weatherpi weewx[800]: manager: Added record 2019-01-07 14:5...b'
Jan 07 18:38:01 Weatherpi weewx[800]: manager: Added record 2019-01-07 15:0...b'
Jan 07 18:38:01 Weatherpi weewx[800]: manager: Added record 2019-01-07 15:0...b'
Jan 07 18:38:01 Weatherpi weewx[800]: manager: Added record 2019-01-07 15:1...b'
Jan 07 18:38:01 Weatherpi weewx[800]: manager: Added record 2019-01-07 15:1...b'
Hint: Some lines were ellipsized, use -l to show in full.
pi@Weatherpi:~ $ 


On Sunday, 6 January 2019 14:37:27 UTC+13, monmul wrote:
I am new to weewx and am trying to set it up on my Rpi 3. I have a Davis Vantage weather station. I have a serial Envoy data logger attaced to my Rpi with a serial/usb converter. In following the set up instructions, I get these errors!

sudo weewxd weewx.conf
Traceback (most recent call last):
  File "/usr/bin/weewxd", line 64, in <module>
    weewx.engine.main(options, args)
  File "/usr/share/weewx/weewx/engine.py", line 835, in main
    sane = os.stat(config_path).st_ctime
OSError: [Errno 2] No such file or directory: '/home/pi/weewx.conf'
pi@Weatherpi:~ $ tail -f /var/log/syslog
Jan  6 13:37:43 Weatherpi bluetoothd[843]: Endpoint unregistered: sender=:1.16 path=/MediaEndpoint/A2DPSink
Jan  6 13:37:47 Weatherpi dhcpcd[498]: wlan0: no IPv6 Routers available
Jan  6 13:37:48 Weatherpi dhcpcd[498]: eth0: no IPv6 Routers available
Jan  6 13:37:57 Weatherpi systemd[852]: Time has been changed
Jan  6 13:37:57 Weatherpi systemd[1]: Time has been changed
Jan  6 13:41:05 Weatherpi rsyslogd-2007: action 'action 17' suspended, next retry is Sun Jan  6 13:41:35 2019 [try http://www.rsyslog.com/e/2007 ]
Jan  6 13:41:06 Weatherpi weewx[1515]: engine: Initializing weewx version 3.8.2
Jan  6 13:41:06 Weatherpi weewx[1515]: engine: Using Python 2.7.9 (default, Sep 26 2018, 05:58:52) #012[GCC 4.9.2]
Jan  6 13:41:06 Weatherpi weewx[1515]: engine: Platform Linux-4.9.35-v7+-armv7l-with-debian-8.0
Jan  6 13:41:06 Weatherpi weewx[1515]: engine: Locale is 'en_GB.UTF-8'
Jan  6 13:52:34 Weatherpi systemd[1]: Starting Cleanup of Temporary Directories...
Jan  6 13:52:34 Weatherpi rsyslogd-2007: action 'action 17' suspended, next retry is Sun Jan  6 13:53:04 2019 [try http://www.rsyslog.com/e/2007 ]
Jan  6 13:52:35 Weatherpi systemd[1]: Started Cleanup of Temporary Directories.
Jan  6 13:55:28 Weatherpi wpa_supplicant[590]: wlan0: WPA: Group rekeying completed with 30:5a:3a:cd:e7:f0 [GTK=CCMP]
Jan  6 13:55:28 Weatherpi rsyslogd-2007: action 'action 17' suspended, next retry is Sun Jan  6 13:55:58 2019 [try http://www.rsyslog.com/e/2007 ]
Jan  6 13:55:28 Weatherpi wpa_supplicant[590]: wlan0: WPA: Group rekeying completed with 30:5a:3a:cd:e7:f0 [GTK=CCMP]

monmul

unread,
Jan 7, 2019, 12:48:45 AM1/7/19
to weewx-user
Ah! there seems to be a power problem with my WiFi dongle! I will try it headless and on the LAN.

monmul

unread,
Jan 7, 2019, 12:53:21 AM1/7/19
to weewx-user
Ah! there seems to be a power problem with my WiF

monmul

unread,
Jan 7, 2019, 12:54:22 AM1/7/19
to weewx-user
This is what I get headless and with the LAN as opposed to the wifi dongle!

pi@Weatherpi:~ $ sudo systemctl status weewx 
● weewx.service - LSB: weewx weather system
   Loaded: loaded (/etc/init.d/weewx)
   Active: active (running) since Mon 2019-01-07 18:50:45 NZDT; 50s ago
  Process: 510 ExecStart=/etc/init.d/weewx start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/weewx.service
           └─786 python /usr/bin/weewxd --daemon --pidfile=/var/run/weewx.pid...

Jan 07 18:50:49 Weatherpi weewx[786]: restx: AWEKAS: Posting not enabled.
Jan 07 18:50:49 Weatherpi weewx[786]: engine: Starting up weewx version 3.8.2
Jan 07 18:50:49 Weatherpi weewx[786]: engine: Clock error is -8.73 seconds ...t)
Jan 07 18:50:49 Weatherpi weewx[786]: vantage: Clock set to 2019-01-07 18:5...0)
Jan 07 18:50:51 Weatherpi weewx[786]: manager: Added record 2019-01-07 18:5...b'
Jan 07 18:50:51 Weatherpi weewx[786]: manager: Added record 2019-01-07 18:5...b'
Jan 07 18:50:51 Weatherpi weewx[786]: engine: Starting main packet loop.
Jan 07 18:50:52 Weatherpi weewx[786]: restx: Wunderground-PWS: Published re...0)
Jan 07 18:50:55 Weatherpi weewx[786]: vantage: LOOP try #1; error: Expected...ad
Jan 07 18:51:32 Weatherpi weewx[786]: vantage: LOOP try #2; error: Expected...ad
Hint: Some lines were ellipsized, use -l to show in full.
pi@Weatherpi:~ $ 


gjr80

unread,
Jan 7, 2019, 1:00:56 AM1/7/19
to weewx-user
Ok, so on the face of it weeWX appears to be running fine. Not sure what problem we are solving now? My post of about 2 hours ago was in an attempt to work out if your headless RPi was running weeWX but it seems that is down to a wifi/dongle issue. If weeWX is running OK then WU should be fine as should your generated pages - checking syslog will show you what weeWX is/is not doing.

As an aside, I did a bit of digging on importing historical WD data. Should be relatively straightforward, have started adding to wee_import. Will let you know how it goes.

Gary

monmul

unread,
Jan 7, 2019, 1:18:23 AM1/7/19
to weewx-user
Yes, thank you Gary for your help......it is very much my problem and not yours! I have a new power supply and wifi dongle on order...that might help!

Thanks for the digging on the WD data - will have a look at that in the next day or so!

monmul

unread,
Jan 7, 2019, 1:22:40 AM1/7/19
to weewx-user
Ooops! one more thing.....how do I do a wind offset? I cannot see it in the config file?!

gjr80

unread,
Jan 7, 2019, 2:09:53 AM1/7/19
to weewx-user
Yes. That is a setting for the console rather than a weeWX config setting. You have two choices; you can set it manually via buttons on the console or you can set it using the wee_device utility. To do the former you need to read the console manual :) For the latter have a look through the wee_device Vantage notes, you need to use the --set-offset action. Something like:

$ wee_device --set-offset=windDir,180

should do the trick, in fact that is one of the examples. Note you may or may not need to prefix that with sudo. Just make sure you read through the Vantage wee_device notes first, make sure you stop weeWX before using wee_device (only one thing can talk to the console at once) and check the setting afterwards with wee_device --info

Gary

dunbrokin

unread,
Jan 7, 2019, 2:36:50 AM1/7/19
to weewx-user
Thank you so much!

nine...@gmail.com

unread,
Jan 7, 2019, 7:11:16 AM1/7/19
to weewx...@googlegroups.com

Curious why you are using a Wi-Fi dongle?  RPI 3 has Wi-Fi built in.

 

Tom

--

monmul

unread,
Jan 7, 2019, 12:36:31 PM1/7/19
to weewx-user
Very good question....thank you for pointing that out! I was totally unaware!

monmul

unread,
Jan 7, 2019, 5:14:28 PM1/7/19
to weewx-user
I notice an error in the archival interval - see below. Is this important?

Jan  8 11:07:08 Weatherpi weewx[750]: engine: Archive will use data binding wx_binding
Jan  8 11:07:08 Weatherpi weewx[750]: engine: Record generation will be attempted in 'hardware'
Jan  8 11:07:08 Weatherpi weewx[750]: engine: The archive interval in the configuration file (300) does not match the station hardware interval (600).
Jan  8 11:07:08 Weatherpi weewx[750]: engine: Using archive interval of 600 seconds (specified by hardware)
Jan  8 11:07:08 Weatherpi weewx[750]: engine: Using binding 'wx_binding' to database 'weewx.sdb'
Jan  8 11:07:08 Weatherpi weewx[750]: manager: Starting backfill of daily summaries
Jan  8 11:07:08 Weatherpi weewx[750]: restx: StationRegistry: Station will not be registered: no station_url specified.
Jan  8 11:07:08 Weatherpi weewx[750]: restx: Wunderground-PWS: Data for station IOTAGOQU2 will be posted
Jan  8 11:07:08 Weatherpi weewx[750]: restx: PWSweather: Posting not enabled.
Jan  8 11:07:08 Weatherpi weewx[750]: restx: CWOP: Posting not enabled.
Jan  8 11:07:08 Weatherpi weewx[750]: restx: WOW: Posting not enabled.
Jan  8 11:07:08 Weatherpi weewx[750]: restx: AWEKAS: Posting not enabled.
Jan  8 11:07:08 Weatherpi weewx[750]: engine: Starting up weewx version 3.8.2
Jan  8 11:07:08 Weatherpi weewx[750]: engine: Clock error is -7.50 seconds (positive is fast)
Jan  8 11:07:08 Weatherpi weewx[750]: vantage: Clock set to 2019-01-08 11:07:09 NZDT (1546898829)
Jan  8 11:07:09 Weatherpi weewx[750]: engine: Starting main packet loop.
Jan  8 11:07:14 Weatherpi weewx[750]: vantage: LOOP try #1; error: Expected to read 99 chars; got 0 instead
Jan  8 11:07:19 Weatherpi weewx[750]: vantage: LOOP try #2; error: Expected to read 99 chars; got 0 instead
Jan  8 11:07:28 Weatherpi weewx[750]: vantage: LOOP try #3; error: Expected to read 99 chars; got 0 instead
Jan  8 11:07:33 Weatherpi weewx[750]: vantage: LOOP try #4; error: Expected to read 99 chars; got 0 instead
Jan  8 11:07:33 Weatherpi weewx[750]: vantage: LOOP max tries (4) exceeded.
Jan  8 11:07:33 Weatherpi weewx[750]: engine: Caught WeeWxIOError: Max tries exceeded while getting LOOP data.
Jan  8 11:07:33 Weatherpi weewx[750]:     ****  Waiting 60 seconds then retrying...

monmul

unread,
Jan 7, 2019, 5:15:50 PM1/7/19
to weewx-user
Worked perfectly, thank you!

dunbrokin

unread,
Jan 7, 2019, 6:52:26 PM1/7/19
to weewx-user
I can get the data into this CSV format.....how would that work?

On Mon, Jan 7, 2019 at 12:22 PM gjr80 <gjrod...@gmail.com> wrote:
WD201911.csv

gjr80

unread,
Jan 8, 2019, 1:18:12 AM1/8/19
to weewx-user

On Tuesday, 8 January 2019 08:14:28 UTC+10, monmul wrote:
I notice an error in the archival interval - see below. Is this important?

Jan  8 11:07:08 Weatherpi weewx[750]: engine: The archive interval in the configuration file (300) does not match the station hardware interval (600).
Jan  8 11:07:08 Weatherpi weewx[750]: engine: Using archive interval of 600 seconds (specified by hardware)

I presume you mean the 600/300 log entries above and not the LOOP errors below. The two entries above mean that the archive interval set in your console (600 seconds) does not match the archive interval under [StdArchive] in weewx.conf. When such a disagreement occurs weeWX defaults to using the console value, so in your case it uses 600 seconds and you will find that you have archive records being saved to database (and reports being generated) every 600 seconds (10 minutes). If you want to change this to 300 seconds (5 minutes) you will need to change the archive interval in your console. As with the wind direction offset this can be done through the console buttons or using the wee_device utility. For wee_device it's the same process as setting the wind direction offset, but this time you would use the --set-interval action.
 
Jan  8 11:07:14 Weatherpi weewx[750]: vantage: LOOP try #1; error: Expected to read 99 chars; got 0 instead
Jan  8 11:07:19 Weatherpi weewx[750]: vantage: LOOP try #2; error: Expected to read 99 chars; got 0 instead
Jan  8 11:07:28 Weatherpi weewx[750]: vantage: LOOP try #3; error: Expected to read 99 chars; got 0 instead
Jan  8 11:07:33 Weatherpi weewx[750]: vantage: LOOP try #4; error: Expected to read 99 chars; got 0 instead
Jan  8 11:07:33 Weatherpi weewx[750]: vantage: LOOP max tries (4) exceeded.
Jan  8 11:07:33 Weatherpi weewx[750]: engine: Caught WeeWxIOError: Max tries exceeded while getting LOOP data.
Jan  8 11:07:33 Weatherpi weewx[750]:     ****  Waiting 60 seconds then retrying...

As for the LOOP errors, that indicates that your RPi is not able to communicate with your console. You have had it working and the vantage stations tend to just work so go through some basic checking (is it plugged in is something else interfering, unplug/plug in the station again, stop then start weeWX). Remember monitor the log, it will tell you what is going on. A useful approach can be to have two terminals open; one for issuing commands and one for monitoring the log with the command:

$ tail -f -n 20 /var/log/syslog

This shows you the last 20 lines of syslog then automatically displays any additional log entries as they occur. Makes it easy to see what happens when you issue commands.

Gary

monmul

unread,
Jan 8, 2019, 1:24:17 AM1/8/19
to weewx-user
Great, thanks, it seems to be working ok now.....and I will just stick with the 600 sec.

gjr80

unread,
Jan 8, 2019, 1:25:05 AM1/8/19
to weewx-user
It will need a bit of fiddling to get a timestamp out of the individual date-time fields so will not work directly with any of the existing wee_import sources without further massaging. But otherwise will be OK. That looks very much like the mYYYYlg.txt files I am working with, I have wee_import extracting the data from the mYYYYlg.txt log files, just need to pickup a few of the other log files and sort out some units and we should be ready for a trial. I'll drop you a line when I have something ready.

Gary

gjr80

unread,
Jan 8, 2019, 1:27:51 AM1/8/19
to weewx-user
Ok, if you are going to stick with a 600 second archive period then just change archive_interval = 300 to archive_interval = 600 under [StdArchive] in weewx.conf and you should not see that message again.

Gary

monmul

unread,
Jan 11, 2019, 4:12:04 PM1/11/19
to weewx-user
In trying to copy my sd card for back up purposes, I ended up screwing my ststem and had to start again. I thought I had followed all the steps to get it working like I had last time.....but I get this error:

pi@raspberrypi:~ $ sudo weewxd /etc/weewx/weewx.conf
Traceback (most recent call last):
  File "/usr/bin/weewxd", line 64, in <module>
    weewx.engine.main(options, args)
  File "/usr/share/weewx/weewx/engine.py", line 877, in main
    engine.run()
  File "/usr/share/weewx/weewx/engine.py", line 160, in run
    self.dispatchEvent(weewx.Event(weewx.STARTUP))
  File "/usr/share/weewx/weewx/engine.py", line 224, in dispatchEvent
    callback(event)
  File "/usr/share/weewx/weewx/engine.py", line 509, in startup
    self._catchup(self.engine.console.genStartupRecords)
  File "/usr/share/weewx/weewx/engine.py", line 623, in _catchup
    origin='hardware'))
  File "/usr/share/weewx/weewx/engine.py", line 224, in dispatchEvent
    callback(event)
  File "/usr/share/weewx/weewx/engine.py", line 589, in new_archive_record
    dbmanager.addRecord(event.record, accumulator=self.old_accumulator)
  File "/usr/share/weewx/weewx/manager.py", line 245, in addRecord
    self._addSingleRecord(record, cursor, log_level)
  File "/usr/share/weewx/weewx/manager.py", line 1190, in _addSingleRecord
    super(DaySummaryManager, self)._addSingleRecord(record, cursor, log_level=log_level)
  File "/usr/share/weewx/weewx/manager.py", line 270, in _addSingleRecord
    self._check_unit_system(record['usUnits'])
  File "/usr/share/weewx/weewx/manager.py", line 671, in _check_unit_system
    self.std_unit_system))
weewx.UnitError: Unit system of incoming record (0x10) differs from 'archive' table in 'weewx.sdb' database (0x01)

where have I gone wrong this time?

gjr80

unread,
Jan 11, 2019, 8:03:17 PM1/11/19
to weewx-user
On Saturday, 12 January 2019 07:12:04 UTC+10, monmul wrote:
weewx.UnitError: Unit system of incoming record (0x10) differs from 'archive' table in 'weewx.sdb' database (0x01)

This line is telling us that the unit system used by your database (in this case 0x01 or US customary) does not match the unit system of the record (in this case 0x10 or Metric) that is about to be saved to database. When you rebuilt your system what did you put in weewx.conf for setting target_unit under [StdConvert], it should match the units system of your database (ie target_unit = US) but I am guessing it says target_unit = METRIC? If so you have two options. Firstly, you can change target_unit back to target_unit = US or secondly you can delete you database and let weeWX build a new one when your restart weeWX. The advantage of the first option is that you retain any existing data, for the second option you lose any historical data and your database will now be in Metric units not the default US. The unit system of your database does not really matter, weeWX handles all conversions so you will still see your preferred (Metric ?) units displayed in reports. It is just the underlying database data that is in US customary units. Most folks never interact directly with their databases anyway.

You will find a bit of information about unit systems under [StdConvert] in the User's Guide and under Changing the unit system and in the Units appendix in the Customization Guide.

Of course if target_unit actually is set to US then we have some other issue going on.

Gary

monmul

unread,
Jan 11, 2019, 8:42:33 PM1/11/19
to weewx-user
As usual, Gary, spot on.....all working nicely again now!.....Thank you so much I really appreciate your help an advice.

monmul

unread,
Jan 12, 2019, 8:25:59 PM1/12/19
to weewx-user
I have managed to get the Standard skin loaded on my weather website www.wilsonbayweather.com.......2 small adjustments I would like to make......how do I show the historical max and min for temp, wind, rain etc....and how might I include a jpeg photo from webcam showing a picture every hour or so? Thanks in advance.....you guys have been fabulous in helping a newbie!


On Sunday, 6 January 2019 14:37:27 UTC+13, monmul wrote:
I am new to weewx and am trying to set it up on my Rpi 3. I have a Davis Vantage weather station. I have a serial Envoy data logger attaced to my Rpi with a serial/usb converter. In following the set up instructions, I get these errors!

sudo weewxd weewx.conf
Traceback (most recent call last):
  File "/usr/bin/weewxd", line 64, in <module>
    weewx.engine.main(options, args)

gjr80

unread,
Jan 12, 2019, 11:00:51 PM1/12/19
to weewx-user
Hi,

There are a few steps involved in achieving what you want to do. First the historical max/min - by this I presume you mean all time statistics - those that cover all of your weeWX data and not just the last day, month or year.

If I have this right you need to extend weeWX so that you can access stats from all of your data, this is most easily achieved by installing the xstats example extension. You will find the xstats files are in the /usr/share/doc/weewx/examples directory. I would install manually and just follow step 1 in the readme.txt remembering later that you will need to enable the alltime stats for your templates/reports by following step 2. You can install xstats using wee_extension but that will also install the example web page which you probably do not want.

Now that you have xstats installed you can use tags like $alltime.outTemp.max in report templates to display the maximum outside temperature. The time it occurred will be $alltime.outTemp.maxtime. Just like $day, $month and $year tags but you use $alltime. If you are not familiar with weeWX tags it is worth reading the Tags section of the Customization Guide.

To use the $alltime tags you will probably want to create a new page or modify an existing one. It is really up to you want you want to do. To modify an existing page have a look at the .tmpl files in you Standard skin directory /etc/weewx/skins/Standard. These are the files weeWX uses to generate a corresponding .html page. You will see how tags are used in a template, in a nutshell where you place a tag weeWX will replace that with the relevant data when the reports are generated. The process is a little more involved if you want to create a new page as not only do you need to modify/create a page but you also need to modify skin.conf to have weeWX generate the new page. You may also need to modify other pages to include a link to your new page. A good starting point may be to take a copy of /etc/weewx/skins/Standard/year.html.tmpl, save it as alltime.html.tmpl and start modifying. Have a good poke around the templates and skin.conf (and [StdReport] in weewx.conf) to see how it comes together.

Including an image in a weeWX generated page can be relatively straightforward. If you have a look in index.html.tmpl you will see lines such as:

<img src="daytempdew.png" alt="temperatures" />

This line creates a HTML img tag that displays the daily temperature and dewpoint plot. If whatever you use to generate your webcam image can create a file named, say, webcam.jpg then that keeps it easy, you may be able to create a new img tag but using webcam.jpg (rather than daytempdew.png), you may need to add a path in front of the file name. If your webcam image is timestamped like webcam201901131345.jpg then that gets a little more complicated. If you can drop your webcam image into the weeWX directory structure under /var/www/html/weewx then you can very easily use weeWX to upload your webcam image to your web server if you wish. There are many different ways to achieve this, I have outlined one and I am sure other will have other ways. At the end of the day it will likely depend on your setup.

You have started on the slippery slope of customising your weeWX install, the process can appear daunting but do persist and feel free to continue to ask if not sure.

Gary

monmul

unread,
Jan 12, 2019, 11:15:11 PM1/12/19
to weewx-user
WOW! thank you so much, Gary, for the pointers.....I will get on to that in the next few days!
Message has been deleted

monmul

unread,
Jan 13, 2019, 3:48:24 PM1/13/19
to weewx-user
I am searching for how to turn off showing the "internal temperature" graph but cannot see a anything in skin.conf or in weewx.conf.........what am I missing?

nine...@gmail.com

unread,
Jan 13, 2019, 4:13:08 PM1/13/19
to weewx...@googlegroups.com

Look towards the bottom of the index.html.temp file in the skins/standard directory.  You  will see <img src=”dayinside.png”  alt=”Inside” />.  Comment out this line.

 

Tom

 

From: weewx...@googlegroups.com <weewx...@googlegroups.com> On Behalf Of monmul
Sent: Sunday, January 13, 2019 2:48 PM
To: weewx-user <weewx...@googlegroups.com>
Subject: [weewx-user] Re: Getting the RPi 3 with Davis Vantage up and running

 

I am searching for how to turn off showing the "internal temperature" graph but cannot see a anything in skin.conf or in weewx.conf.........what am I missing?

--

monmul

unread,
Jan 13, 2019, 5:40:45 PM1/13/19
to weewx-user
Thanks Tom, got that now!........my jpg is appearing before and not after the ISS signal quality......I cannot find a ref to the signal quality in the Index file.....how can I get the jpg to come after the signal quality graphs?

monmul

unread,
Jan 13, 2019, 5:42:33 PM1/13/19
to weewx-user
OK, got the jpg after the ISS signal  working it seems....not sure how!

Tom Robertson

unread,
Jan 13, 2019, 5:56:23 PM1/13/19
to weewx...@googlegroups.com
This is the link for the ISS quality.

 <img src="dayrx.png"        alt="Signal Strength" />

Move the graph you want after this, i.e,

     <img src="dayrx.png"        alt="Signal Strength" />
     <img src="dayinside.png"    alt="Inside" />

Tom





From: weewx...@googlegroups.com <weewx...@googlegroups.com> on behalf of monmul <dunb...@gmail.com>
Sent: Sunday, January 13, 2019 4:40 PM
To: weewx-user
Subject: Re: [weewx-user] Re: Getting the RPi 3 with Davis Vantage up and running
 

Greg Troxel

unread,
Jan 13, 2019, 8:45:36 PM1/13/19
to monmul, weewx-user
monmul <dunb...@gmail.com> writes:

> I am searching for how to turn off showing the "internal temperature" graph
> but cannot see a anything in skin.conf or in weewx.conf.........what am I
> missing?

Also, if your real goal is to not disclose the internal temperature,
rather than to simply omit it from the page, you should look for it more
broadly, including week/month/year, anything for mobile, rss files,
smartphone formatting, and the actual generation of the graphs (in
skin.conf).


dunbrokin

unread,
Jan 13, 2019, 8:47:18 PM1/13/19
to weewx-user
Thanks for that...will do!

monmul

unread,
Jan 14, 2019, 4:21:01 AM1/14/19
to weewx-user
In installing xstats manually, the read_me suggests the following for step 1:

cp bin/user/xstats.py /home/weewx/bin/user

I can find where xstats.py is located on the Rpi (hint - /usr/share/doc/weewx/examples/xstats/bin/usr/xstats.py)....but where do I copy it to?


On Sunday, 13 January 2019 17:00:51 UTC+13, gjr80 wrote:

gjr80

unread,
Jan 14, 2019, 4:40:17 AM1/14/19
to weewx-user
Hi,

The location of the different weeWX components depends on how you installed weeWX. Have a look at Where to find things (http://www.weewx.com/docs/usersguide.htm#Where_to_find_things) in the User's Guide. The de facto standard has been to refer to the setup.py location if only one location is given. Your install is a .deb or dpkg so you should put the xstats files in /usr/share/weewx/user.

Gary

monmul

unread,
Jan 14, 2019, 4:44:28 AM1/14/19
to weewx-user
I presume that $rainyear.rain.sum will become $rainalltime.rain.sum?

monmul

unread,
Jan 14, 2019, 4:50:22 AM1/14/19
to weewx-user
OK, thanks Gary....the xstats.py is already in that directory i.e. /usr/share/weewx/user.

John Smith

unread,
Jan 14, 2019, 4:54:49 AM1/14/19
to weewx-user
$alltime.rain.sum

gjr80

unread,
Jan 14, 2019, 4:55:31 AM1/14/19
to weewx-user
Um, no. $rainyear is a special version of $year. $year gives stats from midnight at the start of 1 January of the current year. $rainyear gives stats from midnight at the start of the 1st of the month defined by the rain_year_start config option under [Station] in weewx.conf. I believe $rainyear was implemented to to cater for folks who keep yearly rainfall stats over a period other than Jan -Dec.

Exactly what statistic are you trying to obtain?

Oh, and xstats.py may well have been there if you previously installed xstats using wee_extenaion.

Gary

monmul

unread,
Jan 14, 2019, 4:59:06 AM1/14/19
to weewx-user
OK thanks, I am trying to get the total rain over the calendar year......and show the maximum year of the series.

gjr80

unread,
Jan 14, 2019, 5:10:00 AM1/14/19
to weewx-user
If you mean say, total rainfall for the 1 year ending today (ie 14 Jan 2018 to 14 Jan 2019), then $span($year_delta=1).rain.sum will give you what you are after. Refer to the $span tag (http://weewx.com/docs/customizing.htm#_________Tag_$span_______) in the Customization Guide.

Gary

monmul

unread,
Jan 14, 2019, 5:19:40 AM1/14/19
to weewx-user
No, I only want a number for the full calendar year Jan 1 to Dec 31....for the data that I have....then I want to find the maximum value in that series. I am not interested in a running total. Sorry, I did not make myself very clear. Very basic, old fashioned, total rain in each  calendar year.

gjr80

unread,
Jan 14, 2019, 6:36:47 AM1/14/19
to weewx-user
No problems, I think calendar year can be taken either way. In that case $year will do just fine. There is no simple tag to give you the may yearly rainfall over a number of years, to come up with this requires a little code. There are a few ways you could handle this, one of the easiest ways is to add a little inline python to to a template the iteration capabilities of the weeWX tags. In the template you wish to display the max annual rainfall add the following code somewhere before you want to display the annual rainfall data (near the top of the template is often convenient):

#set $max_rain = 0
#set $max_rain_year = None
#for $y in $alltime.years
   
#set $year_no = $y.start
   
#set $year_rain = $y.rain.sum
   
#if $year_rain.raw > $max_rain
       
#set $max_rain = $year_rain.raw
       
#set $max_rain_vh = $year_rain
       
#set $max_rain_year = $year_no
   
#end if
#end for

Provided you have the xstats extension installed and provided you have added search_list_extensions = user.xstats.ExtendedStatistics to skin.conf as per the xstats instructions, you can then use the tag $max_rain_vh to display the maximum annual rainfall and the tag $max_rain_year to display the year. $max_rain_vh is able to use the weeWX formatting and conversion options so $max_rain_vh.mm will display the rainfall in mm using default formatting and adding a label eg 1234.5 mm. For example, using the above code you could use something like:

#if $max_rain_year is not None
Maximum annual rainfall was $max_rain_vh.mm in $max_rain_year.format("%Y")
#else
No rainfall data available
#end if

to display something like:

Maximum annual rainfall was 1326.4 mm in 2015


The code between the #else and #end if is there to catch the case where there may have been no rainfall data.

Hopefully something for you to experiment with.

Gary

monmul

unread,
Jan 14, 2019, 1:28:41 PM1/14/19
to weewx-user
Thank you so much for that.....so John's suggestion of $alltime.rain.sum is not going to work? Is there a tag for the day in the data series which had the most rain? I am nearly finished and will leave you all in peace soon! Thank again to all!

gjr80

unread,
Jan 14, 2019, 5:39:26 PM1/14/19
to weewx-user
$alltime.rain.sum will certainly work, but I suspect it will not give you what you seek. Hence the question about what you wanted to display. $alltime says work out an aggregate over all records in the database, .rain says work out the aggregate on the rain field and .sum means sum the records. So $alltime.rain.sum will give you the total rainfall from all records in your database, which I don't think is what you want.

If you want to look at wettest days you can make use of the maxsum (the value) and maxsumtime (when the value occurred) aggregates. So now that you have $alltime available something like $alltime.rain.maxsum will give you the highest alltime daily rainfall and $alltime.rain.maxsumtime will give you when it occurred. Similarly, $year.rain.maxsum and $year.rain.maxsumtime will give you the same statistics but for the year to date. These aggregates are possible because weeWX stores (apart from the archive records in the archive table) summary data for each observation and this summary data is stored on a per day basis. Hence it is very easy to get the wettest day, unfortunately weeWX does not record summary data on a year (or month or week) basis so finding the wettest year, month or week requires a bit of code.

Gary

monmul

unread,
Jan 14, 2019, 8:05:50 PM1/14/19
to weewx-user
As ever, thank you for your help and your patience!

Tom Robertson

unread,
Jan 14, 2019, 8:13:53 PM1/14/19
to weewx...@googlegroups.com
I second this.  Folks here are amazing with helping and have patience beyond belief!

Tom




Sent: Monday, January 14, 2019 7:05 PM
To: weewx-user

Subject: [weewx-user] Re: Getting the RPi 3 with Davis Vantage up and running
--
It is loading more messages.
0 new messages