No worries - I wasn't sure if you thought there was a problem with the
skin. So I have the same problem as you, where the Davis console sends
loops with the most accurate wind direction, but the archive packets are
generalized. I hate it, and (with Tom's help) made this quick extension.
Basically this extension takes the archive rec packet from the console and
drops the windDir from it. This allows weewx to generate the windDir from
it's software and put it into this archive rec packet. It takes into
account if this is a "first run" of weewx where weewx doesn't have loop
data yet, so it grabs the generalized wind direction from the console.
Useful for a power outage, archive catchups, etc.
Standard disclaimer: This is an unreleased extension, use at your own risk,
always have backups.
1. Copy the attached file to your bin/user folder
2. At the bottom of weewx.conf, update your data_services to have this:
data_services = user.deleteVantageWindDir.DeleteWindDir,
3. Restart weewx
Good luck!
On Monday, July 20, 2020 at 7:13:11 PM UTC-4, Ernest Jillson wrote:
>
> First, let me apologize. I didn't mean to imply that the skin was the
> issue. Thanks for your suggestion to look at the packets. So the loop
> packets have the correct wind direction in them. The rec packets, however,
> seem to be rounded to the nearest 22.5 degrees.
>
> Obviously the Davis VP2 is capable of transmitting wind to the whole
> degree, but the rec packets are being received as if mapped to 8 compass
> points. To be honest with you, I have little knowledge of how the drivers
> in weewx work and how they receive data from the VP2 console. Does the
> console send different packets (the loop and the rec) or does software do
> that magic?
>
> In any case, I'd love to find a way to get this working to the whole
> degree, if possible.
>
> Thanks to any that can help,
>
> Ernie
>
> On Mon, Jul 20, 2020 at 3:15 PM Pat <[email protected] <javascript:>>
> wrote:
>
>> I'm not sure this is a problem with the skin, but rather your station
>> reporting the archive value of the wind direction. As you can see on my
>> site, my wind degrees aren't plotted to the nearest value. (e.g. 368
>> degrees, 334 degree, etc)
>>
>> Before we blame the skin, run weewxd and post some loop and rec packets.
>>
>>
>> On Saturday, July 18, 2020 at 11:17:56 AM UTC-4, Ernest Jillson wrote:
>>>
>>> I know I'm not at the latest version of Belchertown. In fact, I'm still
>>> using the older version (3.9.2). I've tried copying
>>> /etc/weewx/skins/Belchertown/graphs.conf.example to graphs.conf, but I
>>> can't find where to change wind direction from ordinal direction to degrees.
>>>
>>> My wind direction is only plotted to the nearest value of NNE, or NE, or
>>> E. You get the idea. I'd like to have it plot to the whole degree. Any
>>> ideas?
>>>
>>> My site can be seen here: http://greylords.us
>>>
>>> Thanks in advance.
>>>
>>> Ernie
>>>
>> --
>> 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 [email protected] <javascript:>.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/weewx-user/6fac348f-a1cb-4bad-be13-08f03b958304o%40googlegroups.com
>>
>> <https://groups.google.com/d/msgid/weewx-user/6fac348f-a1cb-4bad-be13-08f03b958304o%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/weewx-user/5a60eb9c-0060-43f3-b8de-f5391a6b303co%40googlegroups.com.
"""This extension takes the windDir from hardware archives
and deletes it. This will replace the windDir reading
with weewx's software method. This was created because
Davis outputs dominant windDir and I like weewx's windDir
calculations a bit better.
This method also keeps everything else the hardware archive
offers, such as console voltage and rxCheckPercent.
To install, place this file in your bin/user folder, then modify
weewx.conf data_services to include the below.
[StdArchive]
record_generation = hardware
[Engine]
[[Services]]
data_services = user.deleteVantageWindDir.DeleteWindDir
Restart weewx.
"""
import weewx
from weewx.wxengine import StdService
VERSION = "0.01"
try:
# Test for new-style weewx logging by trying to import weeutil.logger
import weeutil.logger
import logging
log = logging.getLogger(__name__)
def logdbg(msg):
log.debug(msg)
def loginf(msg):
log.info(msg)
def logerr(msg):
log.error(msg)
except ImportError:
# Old-style weewx logging
import syslog
def logmsg(level, msg):
syslog.syslog(level, 'DeleteWindDir: %s:' % msg)
def logdbg(msg):
logmsg(syslog.LOG_DEBUG, msg)
def loginf(msg):
logmsg(syslog.LOG_INFO, msg)
def logerr(msg):
logmsg(syslog.LOG_ERR, msg)
class DeleteWindDir(StdService):
def __init__(self, engine, config_dict):
# Initialize my superclass:
super(DeleteWindDir, self).__init__(engine, config_dict)
if config_dict["Station"]["station_type"].lower() == "vantage":
self.bind(weewx.NEW_LOOP_PACKET, self.new_loop_packet)
self.bind(weewx.NEW_ARCHIVE_RECORD, self.new_archive_record)
self.first_run = True
def new_loop_packet(self, event):
# The loop is active which means we have an accumulator. Clear the first_run flag.
if self.first_run:
self.first_run = False
def new_archive_record(self, event):
# Only delete windDir from the archive record if we have an accumulator setup from a loop.
# If we don't have a loop and this is called then it's weewx downloading archive off the
# hardware and we keep that windDir record in place.
if not self.first_run:
try:
del event.record['windDir']
except KeyError:
pass