[weewx-user] Re: WMR300 - intermittent and partial loss of loop data

2019-02-21 Thread Juan Antonio Mosquera
OK thanks. I will test this driver in weewx 3.9.1 tomorrow.

El domingo, 17 de febrero de 2019, 7:57:54 (UTC+1), Cameron D escribió:
>
> The 3.9.1 driver does not have my changes, but does have some 
> modifications for python 3.  I expect that means the default driver will 
> have the same problems.
>
> I have attached
>wmr300-v19rc6+f5.py   and 
>wmr300x-v19rc6+f5.py
>
> Which are each basically the same as I previously posted, except that 
> these have the python-3 changes to the "except" statements.
>
> Cameron.
>
> On Saturday, 16 February 2019 02:56:07 UTC+10, Juan Antonio Mosquera wrote:
>>
>> Hi,
>>
>> I use this version now:
>>
>> weewx.drivers.wmr300x-v19rc6+f3
>>
>> All ok... but.. in weewx 3.9.1 driver change¿, can i use wmr300 driver 
>> default?
>>
>> thanks.
>>
>>
>>

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


Re: [weewx-user] Re: Second crash after 11 days

2019-02-21 Thread Steve2Q
I saw no errors during the run of over 30 minutes. I edited out the 
DISABLED_  under the get_time and set_time portion of the driver and 
restarted with debugs commented out. TOP show weexd at 3.3%

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


Re: [weewx-user] Re: Second crash after 11 days

2019-02-21 Thread Thomas Keffer
I guess so. Are you worried about the log size?

I just want to make sure we capture any data gaps.

-tk

On Thu, Feb 21, 2019 at 9:28 AM Steve2Q  wrote:

> Tom..is 30 minutes enough time with debug and debug_serial both set to 1 ?
>
> --
> 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+unsubscr...@googlegroups.com.
> 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 weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [weewx-user] Re: Second crash after 11 days

2019-02-21 Thread Steve2Q
Tom..is 30 minutes enough time with debug and debug_serial both set to 1 ?

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


Re: [weewx-user] Re: Second crash after 11 days

2019-02-21 Thread Thomas Keffer
Be sure to run with debug=1 and debug_serial=1 as per my earlier email
.

On Thu, Feb 21, 2019 at 9:18 AM Ralph Underwood  wrote:

> I have v0.22 running now and it appears to work - no buffer errors.
>
> Ralph
>
> --
> 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+unsubscr...@googlegroups.com.
> 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 weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [weewx-user] Re: Second crash after 11 days

2019-02-21 Thread Ralph Underwood
I will test v0.22.  Thanks!!

On Thursday, February 21, 2019 at 9:04:04 AM UTC-8, Ralph Underwood wrote:
>
> The URL for the development station is http://www.mapleleaf.ruresearch.com. 
>  This station is in my basement lab area - the wind and rain stuff is 
> sitting on a counter so that's why there are no readings for them. The 
> "Temperature 1" reading is from a DS18B20 sensor connected to an Adafruit 
> Huzzah ESP8266 which uses wifi / mqtt. I have a python program running 
> which collects the mqtt data and writes it to a file, which filepile.py 
> reads and puts into WeeWx.  It's working, however the goal is to modify the 
> existing wxMesh and wxMQTT to operate as WeeWx service.
>
>
> The cmon memory chart shows the increasing memory use, there is a big drop 
> when I restarted WeeWx this AM and then started a browser to download the 
> ultimeter.py files.
>
> The driver I tried was the last one Tom posted.
>
>
> On Thursday, February 21, 2019 at 8:32:13 AM UTC-8, Steve2Q wrote:
>>
>> Ralph. Thanks for joining this discussion. A few questions:
>>
>> 1. What is your station URL? There are not too many of us Ultimeter 
>> users, but I think it is great that Tom, Matt, Andrew, Vince and so many 
>> other help out our small population as best they can. Having another 2100 
>> user may make debugging easier (?).
>>
>> 2. Which version of the driver did you try? The newest one, I assume. I 
>> am going to try it with the debug "switches" turned on. And which version 
>> did you roll back to?
>>
>> Steve
>>
>>>
>>>

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


Re: [weewx-user] Re: Second crash after 11 days

2019-02-21 Thread Ralph Underwood
The URL for the development station is http://www.mapleleaf.ruresearch.com. 
 This station is in my basement lab area - the wind and rain stuff is 
sitting on a counter so that's why there are no readings for them. The 
"Temperature 1" reading is from a DS18B20 sensor connected to an Adafruit 
Huzzah ESP8266 which uses wifi / mqtt. I have a python program running 
which collects the mqtt data and writes it to a file, which filepile.py 
reads and puts into WeeWx.  It's working, however the goal is to modify the 
existing wxMesh and wxMQTT to operate as WeeWx service.


The cmon memory chart shows the increasing memory use, there is a big drop 
when I restarted WeeWx this AM and then started a browser to download the 
ultimeter.py files.

The driver I tried was the last one Tom posted.


On Thursday, February 21, 2019 at 8:32:13 AM UTC-8, Steve2Q wrote:
>
> Ralph. Thanks for joining this discussion. A few questions:
>
> 1. What is your station URL? There are not too many of us Ultimeter users, 
> but I think it is great that Tom, Matt, Andrew, Vince and so many other 
> help out our small population as best they can. Having another 2100 user 
> may make debugging easier (?).
>
> 2. Which version of the driver did you try? The newest one, I assume. I am 
> going to try it with the debug "switches" turned on. And which version did 
> you roll back to?
>
> Steve
>
>>
>>

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


Re: [weewx-user] Re: Second crash after 11 days

2019-02-21 Thread Thomas Keffer
OK, thanks, Ralph.

Let's try this version of the driver, v0.22.  This one is a little more
sophisticated. It reads in buffer fulls (and, thus, is more efficient), but
parcels them out byte-by-byte. It has the ability to throw away anything
leading up to the buffer header (b'!!').

This is v0.22. In your correspondence make sure you indicate which version
of the driver you are using so we don't end up chasing our tails.

I don't know how Matthew does it, writing drivers by remote control!

-tk

On Thu, Feb 21, 2019 at 8:32 AM Steve2Q  wrote:

> Ralph. Thanks for joining this discussion. A few questions:
>
> 1. What is your station URL? There are not too many of us Ultimeter users,
> but I think it is great that Tom, Matt, Andrew, Vince and so many other
> help out our small population as best they can. Having another 2100 user
> may make debugging easier (?).
>
> 2. Which version of the driver did you try? The newest one, I assume. I am
> going to try it with the debug "switches" turned on. And which version did
> you roll back to?
>
> Steve
>
>>
>> --
> 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+unsubscr...@googlegroups.com.
> 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 weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
#!/usr/bin/env python
#
# Copyright 2014 Matthew Wall
# Copyright 2014 Nate Bargmann 
# See the file LICENSE.txt for your rights.
#
# Credit to and contributions from:
#   Jay Nugent (WB8TKL) and KRK6 for weather-2.kr6k-V2.1
# http://server1.nuge.com/~weather/
#   Steve (sesykes71) for testing the first implementations of this driver
#   Garret Power for improved decoding and proper handling of negative values
#   Chris Thompstone for testing the fast-read implementation
#
# Thanks to PeetBros for publishing the communication protocols and details
# about each model they manufacture.

"""Driver for Peet Bros Ultimeter weather stations except the Ultimeter II

This driver assumes the Ultimeter is emitting data in Peet Bros Data Logger
mode format.  This driver will set the mode automatically on stations
manufactured after 2004.  Stations manufactured before 2004 must be set to
data logger mode using the buttons on the console.

Resources for the Ultimeter stations

Ultimeter Models 2100, 2000, 800, & 100 serial specifications:
  http://www.peetbros.com/shop/custom.aspx?recid=29

Ultimeter 2000 Pinouts and Parsers:
  http://www.webaugur.com/ham-radio/52-ultimeter-2000-pinouts-and-parsers.html

Ultimeter II
  not supported by this driver

All models communicate over an RS-232 compatible serial port using three
wires--RXD, TXD, and Ground (except Ultimeter II which omits TXD).  Port
parameters are 2400, 8N1, with no flow control.

The Ultimeter hardware supports several "modes" for providing station data
to the serial port.  This driver utilizes the "modem mode" to set the date
and time of the Ultimeter upon initialization and then sets it into Data
Logger mode for continuous updates.

Modem Mode commands used by the driver
>A  Set Date and Time (decimal digits  = day of year,
 = minute of day; Jan 1 = , Midnight = )

>I  Set output mode to Data Logger Mode (continuous output)

See http://www.peetbros.com/shop/custom.aspx?recid=29

CHANGE HISTORY

0.20 02/13/2019
Changed from using serial.readline() to serial.read().
Ported to Python 3

0.21 02/21/2019
Now uses serial.inWaiting() to get the number of  bytes to be read,
instead of using a fixed number.

0.22 02/21/2019
Read a whole buffer full of bytes, but throw away any partial packets.

"""



from __future__ import with_statement
from __future__ import print_function

import serial
import syslog
import time

import weewx.drivers
import weewx.wxformulas
from weewx.units import INHG_PER_MBAR, MILE_PER_KM
from weeutil.weeutil import timestamp_to_string, GenWithPeek

DRIVER_NAME = 'Ultimeter'
DRIVER_VERSION = '0.22'


def loader(config_dict, _):
return UltimeterDriver(**config_dict[DRIVER_NAME])

def confeditor_loader():
return UltimeterConfEditor()


def logmsg(level, msg):
syslog.syslog(level, 'ultimeter: %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)


def _fmt(x):
return ' '.join([b"%0.2X" % ord(c) for c in x])


class UltimeterDriver(weewx.drivers.AbstractDevice):
"""weewx driver that communicates with a Peet Bros Ultimeter station

model: station model, e.g., 'Ultimeter 2000' or 'Ultimeter 100'
[Optional. 

Re: [weewx-user] Re: Second crash after 11 days

2019-02-21 Thread Steve2Q
Ralph. Thanks for joining this discussion. A few questions:

1. What is your station URL? There are not too many of us Ultimeter users, 
but I think it is great that Tom, Matt, Andrew, Vince and so many other 
help out our small population as best they can. Having another 2100 user 
may make debugging easier (?).

2. Which version of the driver did you try? The newest one, I assume. I am 
going to try it with the debug "switches" turned on. And which version did 
you roll back to?

Steve

>
>

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


Re: [weewx-user] Re: Second crash after 11 days

2019-02-21 Thread Ralph Underwood
I have a couple of stations with Ultimeter 2100 and usb-serial connections 
to RPi 3 B+.  Both appear to have increasing memory usage.  

I just copied the "new" ultimeter.py driver to the driver directory and 
restarted - this was my result. I went back to "old" version of driver and 
restarted OK.

Feb 21 07:26:54 RanchWx weewx[7135]: engine: Starting up weewx version 3.9.1
Feb 21 07:26:54 RanchWx weewx[7135]: engine: Station does not support 
reading the time
Feb 21 07:26:54 RanchWx weewx[7135]: engine: Starting main packet loop.
Feb 21 07:26:54 RanchWx weewx[7135]: ultimeter: Failed attempt 1 of 5 to 
get readings: Unexpected buffer length 49
Feb 21 07:26:57 RanchWx weewx[7135]: ultimeter: Failed attempt 2 of 5 to 
get readings: Unexpected buffer length 446
Feb 21 07:27:00 RanchWx weewx[7135]: ultimeter: Failed attempt 3 of 5 to 
get readings: Unexpected buffer length 446
Feb 21 07:27:03 RanchWx weewx[7135]: ultimeter: Failed attempt 4 of 5 to 
get readings: Unexpected buffer length 463
Feb 21 07:27:06 RanchWx weewx[7135]: ultimeter: Failed attempt 5 of 5 to 
get readings: Unexpected buffer length 461
Feb 21 07:27:09 RanchWx weewx[7135]: ultimeter: Max retries (5) exceeded 
for readings
Feb 21 07:27:09 RanchWx weewx[7135]: engine: Main loop exiting. Shutting 
engine down.
Feb 21 07:27:09 RanchWx weewx[7135]: ultimeter: close serial port 
/dev/ttyUSB0
Feb 21 07:27:10 RanchWx weewx[7135]: engine: Caught WeeWxIOError: Max 
retries (5) exceeded for readings
Feb 21 07:27:10 RanchWx weewx[7135]:   Waiting 60 seconds then 
retrying...


On Thursday, February 21, 2019 at 5:51:41 AM UTC-8, Thomas Keffer wrote:
>
> Oops. The set of valid buffer lengths was wrong. Try this one.
>
>
>
> On Thu, Feb 21, 2019 at 5:49 AM Thomas Keffer  > wrote:
>
>> Possibly, but I don't think so. The way I read the documents, a given 
>> instrument has a given buffer length. Yours seems to be 52 bytes, which is 
>> what the driver is expecting.
>>
>> The trouble is there is a communications glitch. Then the number of  
>> bytes may be unknown.
>>
>> It would help if you could include the log for one of these glitches. Be 
>> sure to not only set debug=1 at the top of weewx.conf, but also set 
>> debug_serial in the [Ultimeter] section:
>>
>> debug = 1
>> ...
>>
>> [Ultimeter]
>>   port = XXX
>>   debug_serial = 1
>>
>>
>> At the risk of confusing things, here's another version of the driver. 
>> This one looks for the number of bytes in the serial port buffer, then 
>> reads exactly that many. So, it should work for 48, 50, or 52 byte buffers. 
>> But, it could still have a sync problem.
>>
>> -tk
>>
>> On Thu, Feb 21, 2019 at 5:39 AM Steve2Q > 
>> wrote:
>>
>>> A follow up: According to Peet Bros web site the Ultimeter 2100 (and 
>>> several other models) emit data in 48 byte chunks in Data Logger Mode, 
>>> while ultimeter.py (version .20) apparently expects 52 bytes. Could this be 
>>> the problem?. Here is a snip from their web site:
>>>
>>>
>>>- *Data Logger Mode**:  to manually select, press CLEAR + WIND SPEED 
>>>for 3 seconds. ** While in this mode, records are sent out 
>>>continuously at up to about 120 per minute.  The total record size is 48 
>>>hex digits + header, carriage return and line feed.  (All models)* 
>>>- *Packet Mode**:  to manually select, press CLEAR + WIND CHILL for 
>>>3 seconds.  While in this mode, one record is output every five minutes 
>>> (at 
>>>5 min past the hour, 10 min past, 15 min past, etc.). The total record 
>>>length is 52 hex digits + header, carriage return and line feed.  (All 
>>>models)*
>>>
>>> and this:
>>>
>>> *DATA LOGGER MODE - RECORD STRUCTURE* 
>>>
>>>- *Header = !!  (or || if in Multiple Output Mode) * 
>>>- *Data Fields * 
>>>   - *1. Wind Speed (0.1 kph) * 
>>>   - *2. Wind Direction (0-255) * 
>>>   - *3. Outdoor Temp (0.1 deg F) * 
>>>   - *4. Rain* Long Term Total (0.01 inches) * 
>>>   - *5. Barometer (0.1 mbar) * 
>>>   - *6. Indoor Temp (0.1 deg F) * 
>>>   - *7. Outdoor Humidity (0.1%) * 
>>>   - *8. Indoor Humidity (0.1%) * 
>>>   - *9. Date (day of year) * 
>>>   - *10. Time (minute of day) * 
>>>   - *11. Today's Rain Total (0.01 inches)* * 
>>>   - *12. 1 Minute Wind Speed Average (0.1kph)* *
>>>- *Carriage Return & Line Feed *
>>>
>>>
>>> **Some instruments may not include field 12, some may not include 11 or 
>>> 12. Please contact Peet Bros. if this presents any problem. Total size: 40, 
>>> 44 or 48 characters (hex digits) + header, carriage return and line feed. *
>>>
>>> *PACKET MODE - RECORD STRUCTURE* 
>>>
>>>- *Header = $ULTW * 
>>>- *Data Fields * 
>>>   - *1. Wind Speed Peak over last 5 min. (0.1 kph) * 
>>>   - *2. Wind Direction of Wind Speed Peak (0-255) * 
>>>   - *3. Current Outdoor Temp (0.1 deg F) * 
>>>   - *4. Rain Long Term Total (0.01 in.) * 
>>>   - *5. Current Barometer (0.1 mbar) * 
>>>   - *6. Barometer 

Re: [weewx-user] Re: Second crash after 11 days

2019-02-21 Thread Thomas Keffer
Oops. The set of valid buffer lengths was wrong. Try this one.



On Thu, Feb 21, 2019 at 5:49 AM Thomas Keffer  wrote:

> Possibly, but I don't think so. The way I read the documents, a given
> instrument has a given buffer length. Yours seems to be 52 bytes, which is
> what the driver is expecting.
>
> The trouble is there is a communications glitch. Then the number of  bytes
> may be unknown.
>
> It would help if you could include the log for one of these glitches. Be
> sure to not only set debug=1 at the top of weewx.conf, but also set
> debug_serial in the [Ultimeter] section:
>
> debug = 1
> ...
>
> [Ultimeter]
>   port = XXX
>   debug_serial = 1
>
>
> At the risk of confusing things, here's another version of the driver.
> This one looks for the number of bytes in the serial port buffer, then
> reads exactly that many. So, it should work for 48, 50, or 52 byte buffers.
> But, it could still have a sync problem.
>
> -tk
>
> On Thu, Feb 21, 2019 at 5:39 AM Steve2Q  wrote:
>
>> A follow up: According to Peet Bros web site the Ultimeter 2100 (and
>> several other models) emit data in 48 byte chunks in Data Logger Mode,
>> while ultimeter.py (version .20) apparently expects 52 bytes. Could this be
>> the problem?. Here is a snip from their web site:
>>
>>
>>- *Data Logger Mode**:  to manually select, press CLEAR + WIND SPEED
>>for 3 seconds. ** While in this mode, records are sent out
>>continuously at up to about 120 per minute.  The total record size is 48
>>hex digits + header, carriage return and line feed.  (All models)*
>>- *Packet Mode**:  to manually select, press CLEAR + WIND CHILL for 3
>>seconds.  While in this mode, one record is output every five minutes (at 
>> 5
>>min past the hour, 10 min past, 15 min past, etc.). The total record 
>> length
>>is 52 hex digits + header, carriage return and line feed.  (All models)*
>>
>> and this:
>>
>> *DATA LOGGER MODE - RECORD STRUCTURE*
>>
>>- *Header = !!  (or || if in Multiple Output Mode) *
>>- *Data Fields *
>>   - *1. Wind Speed (0.1 kph) *
>>   - *2. Wind Direction (0-255) *
>>   - *3. Outdoor Temp (0.1 deg F) *
>>   - *4. Rain* Long Term Total (0.01 inches) *
>>   - *5. Barometer (0.1 mbar) *
>>   - *6. Indoor Temp (0.1 deg F) *
>>   - *7. Outdoor Humidity (0.1%) *
>>   - *8. Indoor Humidity (0.1%) *
>>   - *9. Date (day of year) *
>>   - *10. Time (minute of day) *
>>   - *11. Today's Rain Total (0.01 inches)* *
>>   - *12. 1 Minute Wind Speed Average (0.1kph)* *
>>- *Carriage Return & Line Feed *
>>
>>
>> **Some instruments may not include field 12, some may not include 11 or
>> 12. Please contact Peet Bros. if this presents any problem. Total size: 40,
>> 44 or 48 characters (hex digits) + header, carriage return and line feed. *
>>
>> *PACKET MODE - RECORD STRUCTURE*
>>
>>- *Header = $ULTW *
>>- *Data Fields *
>>   - *1. Wind Speed Peak over last 5 min. (0.1 kph) *
>>   - *2. Wind Direction of Wind Speed Peak (0-255) *
>>   - *3. Current Outdoor Temp (0.1 deg F) *
>>   - *4. Rain Long Term Total (0.01 in.) *
>>   - *5. Current Barometer (0.1 mbar) *
>>   - *6. Barometer Delta Value(0.1 mbar) *
>>   - *7. Barometer Corr. Factor(LSW) *
>>   - *8. Barometer Corr. Factor(MSW) *
>>   - *9. Current Outdoor Humidity (0.1%) *
>>   - *10. Date (day of year) *
>>   - *11. Time (minute of day) *
>>   - *12. Today's Rain Total (0.01 inches)**
>>   - *13. 5 Minute Wind Speed Average (0.1kph)* *
>>- *Carriage Return & Line Feed*
>>
>>
>>
>> **Some instruments may not include field 13, some may not include 12 or
>> 13. Please contact Peet Bros. if this presents any problem. *
>>
>> *Packet Mode records are output every five minutes:  first, upon
>> selection of Packet Mode; then, at every 5 minutes past the hour (12:00,
>> 12:05, 12:10, etc.), continuosly.*
>>
>> *Total size: 44, 48 or 52 characters (hex digits) + header, carriage
>> return and line feed. *
>>
>>
>> --
>> 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+unsubscr...@googlegroups.com.
>> 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 weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
#!/usr/bin/env python
#
# Copyright 2014 Matthew Wall
# Copyright 2014 Nate Bargmann 
# See the file LICENSE.txt for your rights.
#
# Credit to and contributions from:
#   Jay Nugent (WB8TKL) and KRK6 for weather-2.kr6k-V2.1
# http://server1.nuge.com/~weather/
#   Steve (sesykes71) for testing the first implementations of this driver
#   Garret Power for 

Re: [weewx-user] Re: Second crash after 11 days

2019-02-21 Thread Thomas Keffer
Possibly, but I don't think so. The way I read the documents, a given
instrument has a given buffer length. Yours seems to be 52 bytes, which is
what the driver is expecting.

The trouble is there is a communications glitch. Then the number of  bytes
may be unknown.

It would help if you could include the log for one of these glitches. Be
sure to not only set debug=1 at the top of weewx.conf, but also set
debug_serial in the [Ultimeter] section:

debug = 1
...

[Ultimeter]
  port = XXX
  debug_serial = 1


At the risk of confusing things, here's another version of the driver. This
one looks for the number of bytes in the serial port buffer, then reads
exactly that many. So, it should work for 48, 50, or 52 byte buffers. But,
it could still have a sync problem.

-tk

On Thu, Feb 21, 2019 at 5:39 AM Steve2Q  wrote:

> A follow up: According to Peet Bros web site the Ultimeter 2100 (and
> several other models) emit data in 48 byte chunks in Data Logger Mode,
> while ultimeter.py (version .20) apparently expects 52 bytes. Could this be
> the problem?. Here is a snip from their web site:
>
>
>- *Data Logger Mode**:  to manually select, press CLEAR + WIND SPEED
>for 3 seconds. ** While in this mode, records are sent out
>continuously at up to about 120 per minute.  The total record size is 48
>hex digits + header, carriage return and line feed.  (All models)*
>- *Packet Mode**:  to manually select, press CLEAR + WIND CHILL for 3
>seconds.  While in this mode, one record is output every five minutes (at 5
>min past the hour, 10 min past, 15 min past, etc.). The total record length
>is 52 hex digits + header, carriage return and line feed.  (All models)*
>
> and this:
>
> *DATA LOGGER MODE - RECORD STRUCTURE*
>
>- *Header = !!  (or || if in Multiple Output Mode) *
>- *Data Fields *
>   - *1. Wind Speed (0.1 kph) *
>   - *2. Wind Direction (0-255) *
>   - *3. Outdoor Temp (0.1 deg F) *
>   - *4. Rain* Long Term Total (0.01 inches) *
>   - *5. Barometer (0.1 mbar) *
>   - *6. Indoor Temp (0.1 deg F) *
>   - *7. Outdoor Humidity (0.1%) *
>   - *8. Indoor Humidity (0.1%) *
>   - *9. Date (day of year) *
>   - *10. Time (minute of day) *
>   - *11. Today's Rain Total (0.01 inches)* *
>   - *12. 1 Minute Wind Speed Average (0.1kph)* *
>- *Carriage Return & Line Feed *
>
>
> **Some instruments may not include field 12, some may not include 11 or
> 12. Please contact Peet Bros. if this presents any problem. Total size: 40,
> 44 or 48 characters (hex digits) + header, carriage return and line feed. *
>
> *PACKET MODE - RECORD STRUCTURE*
>
>- *Header = $ULTW *
>- *Data Fields *
>   - *1. Wind Speed Peak over last 5 min. (0.1 kph) *
>   - *2. Wind Direction of Wind Speed Peak (0-255) *
>   - *3. Current Outdoor Temp (0.1 deg F) *
>   - *4. Rain Long Term Total (0.01 in.) *
>   - *5. Current Barometer (0.1 mbar) *
>   - *6. Barometer Delta Value(0.1 mbar) *
>   - *7. Barometer Corr. Factor(LSW) *
>   - *8. Barometer Corr. Factor(MSW) *
>   - *9. Current Outdoor Humidity (0.1%) *
>   - *10. Date (day of year) *
>   - *11. Time (minute of day) *
>   - *12. Today's Rain Total (0.01 inches)**
>   - *13. 5 Minute Wind Speed Average (0.1kph)* *
>- *Carriage Return & Line Feed*
>
>
>
> **Some instruments may not include field 13, some may not include 12 or
> 13. Please contact Peet Bros. if this presents any problem. *
>
> *Packet Mode records are output every five minutes:  first, upon selection
> of Packet Mode; then, at every 5 minutes past the hour (12:00, 12:05,
> 12:10, etc.), continuosly.*
>
> *Total size: 44, 48 or 52 characters (hex digits) + header, carriage
> return and line feed. *
>
>
> --
> 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+unsubscr...@googlegroups.com.
> 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 weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
#!/usr/bin/env python
#
# Copyright 2014 Matthew Wall
# Copyright 2014 Nate Bargmann 
# See the file LICENSE.txt for your rights.
#
# Credit to and contributions from:
#   Jay Nugent (WB8TKL) and KRK6 for weather-2.kr6k-V2.1
# http://server1.nuge.com/~weather/
#   Steve (sesykes71) for testing the first implementations of this driver
#   Garret Power for improved decoding and proper handling of negative values
#   Chris Thompstone for testing the fast-read implementation
#
# Thanks to PeetBros for publishing the communication protocols and details
# about each model they manufacture.

"""Driver for Peet Bros 

Re: [weewx-user] Re: Second crash after 11 days

2019-02-21 Thread Steve2Q
A follow up: According to Peet Bros web site the Ultimeter 2100 (and 
several other models) emit data in 48 byte chunks in Data Logger Mode, 
while ultimeter.py (version .20) apparently expects 52 bytes. Could this be 
the problem?. Here is a snip from their web site:


   - *Data Logger Mode**:  to manually select, press CLEAR + WIND SPEED for 
   3 seconds. ** While in this mode, records are sent out continuously at 
   up to about 120 per minute.  The total record size is 48 hex digits + 
   header, carriage return and line feed.  (All models)* 
   - *Packet Mode**:  to manually select, press CLEAR + WIND CHILL for 3 
   seconds.  While in this mode, one record is output every five minutes (at 5 
   min past the hour, 10 min past, 15 min past, etc.). The total record length 
   is 52 hex digits + header, carriage return and line feed.  (All models)*

and this:

*DATA LOGGER MODE - RECORD STRUCTURE* 

   - *Header = !!  (or || if in Multiple Output Mode) * 
   - *Data Fields * 
  - *1. Wind Speed (0.1 kph) * 
  - *2. Wind Direction (0-255) * 
  - *3. Outdoor Temp (0.1 deg F) * 
  - *4. Rain* Long Term Total (0.01 inches) * 
  - *5. Barometer (0.1 mbar) * 
  - *6. Indoor Temp (0.1 deg F) * 
  - *7. Outdoor Humidity (0.1%) * 
  - *8. Indoor Humidity (0.1%) * 
  - *9. Date (day of year) * 
  - *10. Time (minute of day) * 
  - *11. Today's Rain Total (0.01 inches)* * 
  - *12. 1 Minute Wind Speed Average (0.1kph)* *
   - *Carriage Return & Line Feed *


**Some instruments may not include field 12, some may not include 11 or 12. 
Please contact Peet Bros. if this presents any problem. Total size: 40, 44 
or 48 characters (hex digits) + header, carriage return and line feed. *

*PACKET MODE - RECORD STRUCTURE* 

   - *Header = $ULTW * 
   - *Data Fields * 
  - *1. Wind Speed Peak over last 5 min. (0.1 kph) * 
  - *2. Wind Direction of Wind Speed Peak (0-255) * 
  - *3. Current Outdoor Temp (0.1 deg F) * 
  - *4. Rain Long Term Total (0.01 in.) * 
  - *5. Current Barometer (0.1 mbar) * 
  - *6. Barometer Delta Value(0.1 mbar) * 
  - *7. Barometer Corr. Factor(LSW) * 
  - *8. Barometer Corr. Factor(MSW) * 
  - *9. Current Outdoor Humidity (0.1%) * 
  - *10. Date (day of year) * 
  - *11. Time (minute of day) * 
  - *12. Today's Rain Total (0.01 inches)** 
  - *13. 5 Minute Wind Speed Average (0.1kph)* *
   - *Carriage Return & Line Feed*



**Some instruments may not include field 13, some may not include 12 or 13. 
Please contact Peet Bros. if this presents any problem. *

*Packet Mode records are output every five minutes:  first, upon selection 
of Packet Mode; then, at every 5 minutes past the hour (12:00, 12:05, 
12:10, etc.), continuosly.*

*Total size: 44, 48 or 52 characters (hex digits) + header, carriage return 
and line feed. *


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


Re: [weewx-user] Re: Second crash after 11 days

2019-02-21 Thread Steve2Q
Hello: I have been out of town for several days. The good news is top shows 
weexd using only 4.6% of memory. The bad news is there are now many gaps in 
the charts (see example), which apparently are caused by the "unexpected 
error byte messages" I have been getting. So the question remains should I 
drop back to the driver that worked even though it may prevent me from 
upgrading to the newest Weewx version?




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