csv.py don't add radiation and UV

63 views
Skip to first unread message

JanC

unread,
May 25, 2019, 5:39:11 AM5/25/19
to weewx-user
I use a WH2600 weatherstation with a raspberry pi

debian8
weewx 3.9.1
driver interceptor observer
csv.py to collect the data to a csv-file

with weewx 3.8 it works ok, after upgrade to 3.9 it fails

I have some things overlooked?

JanC
data.csv
syslog.txt
wee_debug.txt

JanC

unread,
May 26, 2019, 2:48:16 AM5/26/19
to weewx-user
I found the solution myself.

In csv.py :

        if self.binding == 'binding':


        self.binding = d.get('binding', 'loop')
 ##       if self.binding == 'loop':
        if self.binding == 'binding':
            self.bind(weewx.NEW_LOOP_PACKET, self.handle_new_loop)
        else:
            self.bind(weewx.NEW_ARCHIVE_RECORD, self.handle_new_archive)

janc

Op zaterdag 25 mei 2019 11:39:11 UTC+2 schreef JanC:

gjr80

unread,
May 26, 2019, 10:41:44 PM5/26/19
to weewx-user
Hi,

Your 'fix' has merely forced the csv service to always generate data.csv based on archive records rather than the default loop packets. Using archive records rather than loop packets would make sense for a station that emits partial loop packets (ie a station that does not include radiation and UV in every loop packet) but based on the log extract you provided your station does not appear to be a partial packet type. In any case, if generating data.csv based on archive records rather than loop packets solves your problem a far better approach would be to return csv.py to its original state and change your [CSV] stanza in weewx.conf to read:

[CSV]
    filename
= /var/tmp/tmp/data.csv
    binding
= archive

This will require a WeeWX restart. This achieves the same effect as your changes whilst ensuring your system will continue to work across future upgrades.

Gary

JanC

unread,
May 27, 2019, 2:17:33 AM5/27/19
to weewx-user
Gary, thanks for your reply,i will add it right now.

Op maandag 27 mei 2019 04:41:44 UTC+2 schreef gjr80:
Reply all
Reply to author
Forward
0 new messages