Committed in b989eab
<https://github.com/weewx/weewx/commit/b989eabeab7347e3d1d4bcc2a70eba79168ad682>
.

I guess in nearly 10 years and thousands of users, your VP2 is the first
with an older "Type A" firmware!

-tk

On Sun, Sep 16, 2018 at 12:14 PM Michael Loconte <[email protected]> wrote:

> Thanks for your help! I have had this new version of vantage.py running
> for a few hours now and it all seems to be going well!
>
> Also, BTW I like that you have a mobile site included, I had to roll my
> own on wview!
>
> Thanks again,
> Mike
>
> On Saturday, September 15, 2018 at 5:30:46 PM UTC-7, Thomas Keffer wrote:
>>
>> No, I don't think it's necessary to update the firmware. We can make it
>> work.
>>
>> The problem is a bug in the driver that sets the value of the raw loop
>> data to None for older, "Type A" firmware, then tries to decode it.
>>
>> Try this version of vantage.py.
>>
>> -tk
>>
>> On Sat, Sep 15, 2018 at 5:16 PM Michael Loconte <[email protected]>
>> wrote:
>>
>>> Hi Thomas,
>>>
>>> Ah! My console is displaying a low battery message now, but wasn't
>>> earlier. Related perhaps?  wee_device (very cool BTW) reports that it is
>>> Vantage driver version 3.0.11 (from 2001), so I guess I should consider
>>> upgrading the firmware!
>>>
>>> Mike
>>>
>>> On Saturday, September 15, 2018 at 4:06:41 PM UTC-7, Thomas Keffer wrote:
>>>>
>>>> Hello, Michael and welcome to the WeeWX user's group
>>>>
>>>> The function _null_int() is only used to decode the battery status and
>>>> the barometric trend icon, so your change is probably innocuous enough.
>>>> However, I wonder why it is happening. Could you please check for the
>>>> firmware version of your station?
>>>>
>>>> *wee_device --info*
>>>>
>>>> -tk
>>>>
>>>> On Sat, Sep 15, 2018 at 3:37 PM Michael Loconte <[email protected]>
>>>> wrote:
>>>>
>>>>> Hello,
>>>>>
>>>>> First off here are my details:
>>>>>
>>>>>    - Raspberry Pi 3, Raspian 9 (Jessie)
>>>>>    - Davis Vantage Pro (model 6160)
>>>>>    - Serial to USB, connected at /dev/ttyUSB0
>>>>>    - Python 2.7.9
>>>>>    - weewx 3.8.2 (according to my weewx.conf)
>>>>>
>>>>>
>>>>> I am a long time (since 2008ish) user of wview and made the switch a
>>>>> few weeks ago to weewx. The install went smooth, moved my sdb files over,
>>>>> but I couldn't see any pages being generated in the html folder.  I have
>>>>> lurked a bit here and read about how to set the debug level in the
>>>>> weewx.conf and I have been watching the logs. I also haven't had a ton of
>>>>> time to sit down and think things through until today. What I have been
>>>>> observing is, I believe, weewx can connect to my data logger and download
>>>>> data, parse it, and insert into the sdb.  There is a odd thing happening
>>>>> though, the date time stamp is in UTC but the time zone designation is
>>>>> Pacific Daylight Time (which is my time zone).  After weewx downloads from
>>>>> the data logger it tries to connect to the console, and start the "main
>>>>> loop." It's here that the program crashes and exits. I have attached the
>>>>> log (mainLoopError_NoneType.txt), if you take a look you will see that
>>>>> weewx acknowledges that my raspberry pi's clock (PDT) is less than the UTC
>>>>> time coming that the record has (my vantage console has the PDT time
>>>>> displayed). Also you will see in the log file that at line 1677 in the
>>>>> vantage.py file is where the program crashes. It looks like the value
>>>>> passed into the _null_int() function is null and the function cant return
>>>>> the integer of a null value. So, here is where I decided to try and handle
>>>>> the error. I edited vantage.py and added an if statement to only return 
>>>>> the
>>>>> integer if the value is not None. I don't really know the repercussions of
>>>>> doing this because I haven't dug through the entire program to trace out
>>>>> what this value is.
>>>>>
>>>>>> # Try to handle NoneType error
>>>>>>
>>>>>> def _null_int(v):
>>>>>>
>>>>>>     if v is not None:
>>>>>>
>>>>>>         return int(v)
>>>>>>
>>>>>>
>>>>>
>>>>> After saving and restarting weewx the program doesn't error out and my
>>>>> html pages are finally generated! Very exciting but I am wondering if
>>>>> anyone here has the experience to know why my console was sending a null
>>>>> value and whether my error handling will have any negative effects. I am
>>>>> attaching the log file after my little fix for your review too
>>>>> (afterEditVantagePy.txt).
>>>>>
>>>>> Thanks, I am excited to get this up and running!
>>>>>
>>>>> Mike
>>>>>
>>>>> --
>>>>> 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].
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>> --
>>> 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].
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> 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].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to