Re: [weewx-user] Re: External site reporting irregular timing schedule

2016-10-16 Thread Thomas Keffer
Yes, although it's not necessary to do the first 'mv.' If the version on
your desktop is truly the original engine, then

sudo /etc/init.d/weewx stop
cd /usr/share/weewx/weewx
sudo cp ~/Desktop/engine.py engine.py
sudo /etc/init.d/weewx start


If you're not sure, you can download the v3.6.0 version of engine.py from
here
.

-tk


On Sun, Oct 16, 2016 at 3:49 PM, Tim Phillips 
wrote:

> I put the original engine.py on my desktop, so the process of getting that
> back to the location would be?:
>
> sudo /etc/init.d/weewx stop
> ​sudo cd /usr/share/weewx​/weewx
> sudo mv engine.py engine.py.orig
> sudo cp ~/Desktop/engine.py engine.py
> sudo /etc/init.d/weewx start
>
> Drag/drop using the UI doesn't work due to permissions. I added sudo to
> the commands earlier since I got denied with permission errors there
> earlier as well. Assuming that IS the way it's supposed to be?
>
>
> On Sun, Oct 16, 2016 at 1:29 PM, Thomas Keffer  wrote:
>
>> Put the original engine back. They are the same, but the modified version
>> will put a lot of entries into your log.
>>
>> -tk
>>
>> On Sun, Oct 16, 2016 at 1:07 PM, Tim Phillips 
>> wrote:
>>
>>> Do I need to put the original engine.py back into the folder or do I
>>> leave what you gave me in there?
>>>
>>>
>>>
>>> On Sun, Oct 16, 2016 at 11:29 AM, Thomas Keffer 
>>> wrote:
>>>
 Your value of archive_delay is set to 300 seconds. Change it to 15
 seconds and all your problems will go away.

 archive_delay = 15

 -tk

 On Sun, Oct 16, 2016 at 11:18 AM, Tim Phillips 
 wrote:

> New log attached after replacing the engine.py per instructions. Lots
> of "syslog" files attached in this thread, so I've renamed this log with
> appropriate changes- "new engine.py" in the file name
>
> Tim.
>
>
> On Sunday, October 16, 2016 at 9:58:18 AM UTC-7, Tim Phillips wrote:
>>
>> Just followed your instructions and will post the new log file
>> after it's had a chance to run a while as suggested.
>>
>> On Sunday, October 16, 2016 at 6:59:57 AM UTC-7, Tom Keffer wrote:
>>>
>>> On Sun, Oct 16, 2016 at 6:18 AM, mwall 
>>> wrote:
>>>
 On Sunday, October 16, 2016 at 8:19:38 AM UTC-4, Tom Keffer wrote:
>
> ​Me too.​ What do you think of my theory that the console is
> (occasionally) waiting more than 5 minutes to emit a LOOP packet?
>

 the log indicates that the driver is getting data regularly.  take
 a look at the entries between some of the 10 minute add records.

 there is a yield just before each "next read in X second".  when
 the data are stale, the yielded packet contains only dateTime, usUnits,
 channel, sensor_id, rssi, sensor_battery, but no weather data.

>>>
>>> ​That should be enough to give the engine a chance to break the loop.
>>>
>>> Tim: I have attached an instrumented version of
>>> engine.py
>>>  that should shed some light on this mystery. Please set your old
>>> version of
>>> engine.py
>>> aside, and replace it with this one. Assuming you download this
>>> version into
>>> ~/Downloads
>>> , the process would be:
>>>
>>> ​cd /usr/share/weewx​/weewx
>>> mv engine.py engine.py.orig
>>> cp ~/Downloads/engine.py engine.py
>>>
>>>
>>> Make sure debug=1, then restart weewx, then send the log from the
>>> restart, through the first couple of reports (should take about 20
>>> minutes). The log will be big, so just attach it as a file.
>>>
>>> -tk
>>>
>>>
>>>
>>> ​
>>>
>>>
>> --
> 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 a topic in the
 Google Groups "weewx-user" group.
 To unsubscribe from this topic, visit https://groups.google.com/d/to
 pic/weewx-user/W8C-1CuFsik/unsubscribe.
 To unsubscribe from this group and all its topics, 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.
>>>
>>
>> --
>> You received 

Re: [weewx-user] Re: External site reporting irregular timing schedule

2016-10-16 Thread Tim Phillips
I put the original engine.py on my desktop, so the process of getting that
back to the location would be?:

sudo /etc/init.d/weewx stop
​sudo cd /usr/share/weewx​/weewx
sudo mv engine.py engine.py.orig
sudo cp ~/Desktop/engine.py engine.py
sudo /etc/init.d/weewx start

Drag/drop using the UI doesn't work due to permissions. I added sudo to the
commands earlier since I got denied with permission errors there earlier as
well. Assuming that IS the way it's supposed to be?


On Sun, Oct 16, 2016 at 1:29 PM, Thomas Keffer  wrote:

> Put the original engine back. They are the same, but the modified version
> will put a lot of entries into your log.
>
> -tk
>
> On Sun, Oct 16, 2016 at 1:07 PM, Tim Phillips 
> wrote:
>
>> Do I need to put the original engine.py back into the folder or do I
>> leave what you gave me in there?
>>
>>
>>
>> On Sun, Oct 16, 2016 at 11:29 AM, Thomas Keffer 
>> wrote:
>>
>>> Your value of archive_delay is set to 300 seconds. Change it to 15
>>> seconds and all your problems will go away.
>>>
>>> archive_delay = 15
>>>
>>> -tk
>>>
>>> On Sun, Oct 16, 2016 at 11:18 AM, Tim Phillips 
>>> wrote:
>>>
 New log attached after replacing the engine.py per instructions. Lots
 of "syslog" files attached in this thread, so I've renamed this log with
 appropriate changes- "new engine.py" in the file name

 Tim.


 On Sunday, October 16, 2016 at 9:58:18 AM UTC-7, Tim Phillips wrote:
>
> Just followed your instructions and will post the new log file
> after it's had a chance to run a while as suggested.
>
> On Sunday, October 16, 2016 at 6:59:57 AM UTC-7, Tom Keffer wrote:
>>
>> On Sun, Oct 16, 2016 at 6:18 AM, mwall 
>> wrote:
>>
>>> On Sunday, October 16, 2016 at 8:19:38 AM UTC-4, Tom Keffer wrote:

 ​Me too.​ What do you think of my theory that the console is
 (occasionally) waiting more than 5 minutes to emit a LOOP packet?

>>>
>>> the log indicates that the driver is getting data regularly.  take a
>>> look at the entries between some of the 10 minute add records.
>>>
>>> there is a yield just before each "next read in X second".  when the
>>> data are stale, the yielded packet contains only dateTime, usUnits,
>>> channel, sensor_id, rssi, sensor_battery, but no weather data.
>>>
>>
>> ​That should be enough to give the engine a chance to break the loop.
>>
>> Tim: I have attached an instrumented version of
>> engine.py
>>  that should shed some light on this mystery. Please set your old
>> version of
>> engine.py
>> aside, and replace it with this one. Assuming you download this
>> version into
>> ~/Downloads
>> , the process would be:
>>
>> ​cd /usr/share/weewx​/weewx
>> mv engine.py engine.py.orig
>> cp ~/Downloads/engine.py engine.py
>>
>>
>> Make sure debug=1, then restart weewx, then send the log from the
>> restart, through the first couple of reports (should take about 20
>> minutes). The log will be big, so just attach it as a file.
>>
>> -tk
>>
>>
>>
>> ​
>>
>>
> --
 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 a topic in the
>>> Google Groups "weewx-user" group.
>>> To unsubscribe from this topic, visit https://groups.google.com/d/to
>>> pic/weewx-user/W8C-1CuFsik/unsubscribe.
>>> To unsubscribe from this group and all its topics, 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.
>>
>
> --
> 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/W8C-1CuFsik/unsubscribe.
> To unsubscribe from this group and all its topics, 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, 

[weewx-user] Chilling hours

2016-10-16 Thread Guilherme DP
Hello,

I use the NOAA reports as a summary for my stations and now I would like to
add an extra column called "Chilling hours". (
https://en.wikipedia.org/wiki/Chilling_requirement)

Is it possible to create this new "tag"? Anyone done this before?

Should I follow the same idea as in the xsearch.py example?

Thanks in advance.

Guilherme.

-- 
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: External site reporting irregular timing schedule

2016-10-16 Thread Thomas Keffer
Put the original engine back. They are the same, but the modified version
will put a lot of entries into your log.

-tk

On Sun, Oct 16, 2016 at 1:07 PM, Tim Phillips 
wrote:

> Do I need to put the original engine.py back into the folder or do I leave
> what you gave me in there?
>
>
>
> On Sun, Oct 16, 2016 at 11:29 AM, Thomas Keffer  wrote:
>
>> Your value of archive_delay is set to 300 seconds. Change it to 15
>> seconds and all your problems will go away.
>>
>> archive_delay = 15
>>
>> -tk
>>
>> On Sun, Oct 16, 2016 at 11:18 AM, Tim Phillips 
>> wrote:
>>
>>> New log attached after replacing the engine.py per instructions. Lots of
>>> "syslog" files attached in this thread, so I've renamed this log with
>>> appropriate changes- "new engine.py" in the file name
>>>
>>> Tim.
>>>
>>>
>>> On Sunday, October 16, 2016 at 9:58:18 AM UTC-7, Tim Phillips wrote:

 Just followed your instructions and will post the new log file
 after it's had a chance to run a while as suggested.

 On Sunday, October 16, 2016 at 6:59:57 AM UTC-7, Tom Keffer wrote:
>
> On Sun, Oct 16, 2016 at 6:18 AM, mwall 
> wrote:
>
>> On Sunday, October 16, 2016 at 8:19:38 AM UTC-4, Tom Keffer wrote:
>>>
>>> ​Me too.​ What do you think of my theory that the console is
>>> (occasionally) waiting more than 5 minutes to emit a LOOP packet?
>>>
>>
>> the log indicates that the driver is getting data regularly.  take a
>> look at the entries between some of the 10 minute add records.
>>
>> there is a yield just before each "next read in X second".  when the
>> data are stale, the yielded packet contains only dateTime, usUnits,
>> channel, sensor_id, rssi, sensor_battery, but no weather data.
>>
>
> ​That should be enough to give the engine a chance to break the loop.
>
> Tim: I have attached an instrumented version of
> engine.py
>  that should shed some light on this mystery. Please set your old
> version of
> engine.py
> aside, and replace it with this one. Assuming you download this
> version into
> ~/Downloads
> , the process would be:
>
> ​cd /usr/share/weewx​/weewx
> mv engine.py engine.py.orig
> cp ~/Downloads/engine.py engine.py
>
>
> Make sure debug=1, then restart weewx, then send the log from the
> restart, through the first couple of reports (should take about 20
> minutes). The log will be big, so just attach it as a file.
>
> -tk
>
>
>
> ​
>
>
 --
>>> 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 a topic in the
>> Google Groups "weewx-user" group.
>> To unsubscribe from this topic, visit https://groups.google.com/d/to
>> pic/weewx-user/W8C-1CuFsik/unsubscribe.
>> To unsubscribe from this group and all its topics, 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.
>

-- 
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: External site reporting irregular timing schedule

2016-10-16 Thread Tim Phillips
Do I need to put the original engine.py back into the folder or do I leave
what you gave me in there?



On Sun, Oct 16, 2016 at 11:29 AM, Thomas Keffer  wrote:

> Your value of archive_delay is set to 300 seconds. Change it to 15 seconds
> and all your problems will go away.
>
> archive_delay = 15
>
> -tk
>
> On Sun, Oct 16, 2016 at 11:18 AM, Tim Phillips 
> wrote:
>
>> New log attached after replacing the engine.py per instructions. Lots of
>> "syslog" files attached in this thread, so I've renamed this log with
>> appropriate changes- "new engine.py" in the file name
>>
>> Tim.
>>
>>
>> On Sunday, October 16, 2016 at 9:58:18 AM UTC-7, Tim Phillips wrote:
>>>
>>> Just followed your instructions and will post the new log file
>>> after it's had a chance to run a while as suggested.
>>>
>>> On Sunday, October 16, 2016 at 6:59:57 AM UTC-7, Tom Keffer wrote:

 On Sun, Oct 16, 2016 at 6:18 AM, mwall 
 wrote:

> On Sunday, October 16, 2016 at 8:19:38 AM UTC-4, Tom Keffer wrote:
>>
>> ​Me too.​ What do you think of my theory that the console is
>> (occasionally) waiting more than 5 minutes to emit a LOOP packet?
>>
>
> the log indicates that the driver is getting data regularly.  take a
> look at the entries between some of the 10 minute add records.
>
> there is a yield just before each "next read in X second".  when the
> data are stale, the yielded packet contains only dateTime, usUnits,
> channel, sensor_id, rssi, sensor_battery, but no weather data.
>

 ​That should be enough to give the engine a chance to break the loop.

 Tim: I have attached an instrumented version of
 engine.py
  that should shed some light on this mystery. Please set your old
 version of
 engine.py
 aside, and replace it with this one. Assuming you download this version
 into
 ~/Downloads
 , the process would be:

 ​cd /usr/share/weewx​/weewx
 mv engine.py engine.py.orig
 cp ~/Downloads/engine.py engine.py


 Make sure debug=1, then restart weewx, then send the log from the
 restart, through the first couple of reports (should take about 20
 minutes). The log will be big, so just attach it as a file.

 -tk



 ​


>>> --
>> 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 a topic in the
> Google Groups "weewx-user" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/weewx-user/W8C-1CuFsik/unsubscribe.
> To unsubscribe from this group and all its topics, 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: External site reporting irregular timing schedule

2016-10-16 Thread Thomas Keffer
Indeed. I've removed it from weewx.conf, and included a check in engine.py
for sane values.

-tk

On Sun, Oct 16, 2016 at 11:57 AM, mwall  wrote:

> On Sunday, October 16, 2016 at 2:30:00 PM UTC-4, Tom Keffer wrote:
>>
>> Your value of archive_delay is set to 300 seconds. Change it to 15
>> seconds and all your problems will go away.
>>
>
> doh!
>
> occam's razor cuts again
>
>
> --
> 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: External site reporting irregular timing schedule

2016-10-16 Thread mwall
On Sunday, October 16, 2016 at 2:30:00 PM UTC-4, Tom Keffer wrote:
>
> Your value of archive_delay is set to 300 seconds. Change it to 15 seconds 
> and all your problems will go away.
>

doh!

occam's razor cuts again
 

-- 
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: External site reporting irregular timing schedule

2016-10-16 Thread Thomas Keffer
Your value of archive_delay is set to 300 seconds. Change it to 15 seconds
and all your problems will go away.

archive_delay = 15

-tk

On Sun, Oct 16, 2016 at 11:18 AM, Tim Phillips 
wrote:

> New log attached after replacing the engine.py per instructions. Lots of
> "syslog" files attached in this thread, so I've renamed this log with
> appropriate changes- "new engine.py" in the file name
>
> Tim.
>
>
> On Sunday, October 16, 2016 at 9:58:18 AM UTC-7, Tim Phillips wrote:
>>
>> Just followed your instructions and will post the new log file after it's
>> had a chance to run a while as suggested.
>>
>> On Sunday, October 16, 2016 at 6:59:57 AM UTC-7, Tom Keffer wrote:
>>>
>>> On Sun, Oct 16, 2016 at 6:18 AM, mwall 
>>> wrote:
>>>
 On Sunday, October 16, 2016 at 8:19:38 AM UTC-4, Tom Keffer wrote:
>
> ​Me too.​ What do you think of my theory that the console is
> (occasionally) waiting more than 5 minutes to emit a LOOP packet?
>

 the log indicates that the driver is getting data regularly.  take a
 look at the entries between some of the 10 minute add records.

 there is a yield just before each "next read in X second".  when the
 data are stale, the yielded packet contains only dateTime, usUnits,
 channel, sensor_id, rssi, sensor_battery, but no weather data.

>>>
>>> ​That should be enough to give the engine a chance to break the loop.
>>>
>>> Tim: I have attached an instrumented version of
>>> engine.py
>>>  that should shed some light on this mystery. Please set your old
>>> version of
>>> engine.py
>>> aside, and replace it with this one. Assuming you download this version
>>> into
>>> ~/Downloads
>>> , the process would be:
>>>
>>> ​cd /usr/share/weewx​/weewx
>>> mv engine.py engine.py.orig
>>> cp ~/Downloads/engine.py engine.py
>>>
>>>
>>> Make sure debug=1, then restart weewx, then send the log from the
>>> restart, through the first couple of reports (should take about 20
>>> minutes). The log will be big, so just attach it as a file.
>>>
>>> -tk
>>>
>>>
>>>
>>> ​
>>>
>>>
>> --
> 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: External site reporting irregular timing schedule

2016-10-16 Thread Tim Phillips
New log attached after replacing the engine.py per instructions. Lots of 
"syslog" files attached in this thread, so I've renamed this log with 
appropriate changes- "new engine.py" in the file name

Tim. 

On Sunday, October 16, 2016 at 9:58:18 AM UTC-7, Tim Phillips wrote:
>
> Just followed your instructions and will post the new log file after it's 
> had a chance to run a while as suggested. 
>
> On Sunday, October 16, 2016 at 6:59:57 AM UTC-7, Tom Keffer wrote:
>>
>> On Sun, Oct 16, 2016 at 6:18 AM, mwall  
>> wrote:
>>
>>> On Sunday, October 16, 2016 at 8:19:38 AM UTC-4, Tom Keffer wrote:

 ​Me too.​ What do you think of my theory that the console is 
 (occasionally) waiting more than 5 minutes to emit a LOOP packet?

>>>
>>> the log indicates that the driver is getting data regularly.  take a 
>>> look at the entries between some of the 10 minute add records.
>>>
>>> there is a yield just before each "next read in X second".  when the 
>>> data are stale, the yielded packet contains only dateTime, usUnits, 
>>> channel, sensor_id, rssi, sensor_battery, but no weather data.
>>>
>>
>> ​That should be enough to give the engine a chance to break the loop.
>>
>> Tim: I have attached an instrumented version of 
>> engine.py
>>  that should shed some light on this mystery. Please set your old version 
>> of 
>> engine.py
>> aside, and replace it with this one. Assuming you download this version 
>> into 
>> ~/Downloads
>> , the process would be:
>>
>> ​cd /usr/share/weewx​/weewx
>> mv engine.py engine.py.orig
>> cp ~/Downloads/engine.py engine.py
>>
>>
>> Make sure debug=1, then restart weewx, then send the log from the 
>> restart, through the first couple of reports (should take about 20 
>> minutes). The log will be big, so just attach it as a file.
>>
>> -tk
>>
>>
>>
>> ​
>>  
>>
>

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


syslog (new engine.py)
Description: Binary data


Re: [weewx-user] Re: Errors during the report generation

2016-10-16 Thread Thomas Keffer
Pier sent his configuration file, weewx.conf to me.

As suspected, it includes a BOM ("byte order marker") at the beginning,
which signaled to the configuration parser that the file was encoded in
utf-8. So, when the parser read it, it automatically converted it to
Unicode.  Hence, when interpreting something like

config_dict['HTML_ROOT']


the results came back in unicode, instead of ascii.

Pier: most likely you used some text editor which put the BOM at the
beginning of the file.

To convert your weewx.conf to a version that is pure ascii, do this:

mv weewx.conf weewx.conf.utf8
iconv -f utf-8 -t ascii//TRANSLIT  weewx.conf


However, we really should protect against this within weewx. I've posted
issue #172  to deal with this.

-tk


On Sun, Oct 16, 2016 at 9:28 AM, Thomas Keffer  wrote:

> Thanks, Pier.
>
> The Unicode seems to be coming from weewx.conf. In particular, HTML_ROOT,
> SKIN_ROOT, and skin all seem to be in unicode, which would suggest that
> they are encoded as utf-8 within your copy of weewx.conf.
>
> Could you please send weewx.conf to me privately? While you could edit it
> to remove any passwords, or run it through wee_debug, I'm concerned that
> may change the byte coding. Send it to 'tkef...@gmail.com'.
>
> You mentioned that you have been "doing some experiments with weewx
> 3.5.0." Does this mean you have been modifying the code base?
>
> -tk
>
>
>
> On Sun, Oct 16, 2016 at 8:55 AM, Pier Francesco Costa <
> piercost...@gmail.com> wrote:
>
>> @Glenn
>>
>> Thank you for your suggestion! I will look into that!
>>
>> @Tom
>>
>> I followed your instructions, but just running doesn't generate a
>> meaningful log, so i started the daemon again.
>>
>> Here's the log.
>>
>> --
>> 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: External site reporting irregular timing schedule

2016-10-16 Thread Andrew Milner
can you post the section of log from the restart until the first archive 
record is created - the log you provided does not run from the start of 
weewx ..


On Sunday, 16 October 2016 19:43:38 UTC+3, Tim Phillips wrote:

> Debug set to =1 last night around the time you posted this response. It's 
> been running since then and I've attached the latest log file for you to 
> take a look at.
>
> On Saturday, October 15, 2016 at 9:37:17 PM UTC-7, gjr80 wrote:
>>
>> Was debug=1? If debug=1we should see what messages if any are coming in 
>> from the station. There are a lot of stale data entries but they seem to 
>> disappear in time.
>
>

-- 
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: External site reporting irregular timing schedule

2016-10-16 Thread Tim Phillips
Just followed your instructions and will post the new log file after it's 
had a chance to run a while as suggested. 

On Sunday, October 16, 2016 at 6:59:57 AM UTC-7, Tom Keffer wrote:
>
> On Sun, Oct 16, 2016 at 6:18 AM, mwall  > wrote:
>
>> On Sunday, October 16, 2016 at 8:19:38 AM UTC-4, Tom Keffer wrote:
>>>
>>> ​Me too.​ What do you think of my theory that the console is 
>>> (occasionally) waiting more than 5 minutes to emit a LOOP packet?
>>>
>>
>> the log indicates that the driver is getting data regularly.  take a look 
>> at the entries between some of the 10 minute add records.
>>
>> there is a yield just before each "next read in X second".  when the data 
>> are stale, the yielded packet contains only dateTime, usUnits, channel, 
>> sensor_id, rssi, sensor_battery, but no weather data.
>>
>
> ​That should be enough to give the engine a chance to break the loop.
>
> Tim: I have attached an instrumented version of 
> engine.py
>  that should shed some light on this mystery. Please set your old version 
> of 
> engine.py
> aside, and replace it with this one. Assuming you download this version 
> into 
> ~/Downloads
> , the process would be:
>
> ​cd /usr/share/weewx​/weewx
> mv engine.py engine.py.orig
> cp ~/Downloads/engine.py engine.py
>
>
> Make sure debug=1, then restart weewx, then send the log from the restart, 
> through the first couple of reports (should take about 20 minutes). The log 
> will be big, so just attach it as a file.
>
> -tk
>
>
>
> ​
>  
>

-- 
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: Errors during the report generation

2016-10-16 Thread Thomas Keffer
Thanks, Pier.

The Unicode seems to be coming from weewx.conf. In particular, HTML_ROOT,
SKIN_ROOT, and skin all seem to be in unicode, which would suggest that
they are encoded as utf-8 within your copy of weewx.conf.

Could you please send weewx.conf to me privately? While you could edit it
to remove any passwords, or run it through wee_debug, I'm concerned that
may change the byte coding. Send it to 'tkef...@gmail.com'.

You mentioned that you have been "doing some experiments with weewx 3.5.0."
Does this mean you have been modifying the code base?

-tk



On Sun, Oct 16, 2016 at 8:55 AM, Pier Francesco Costa  wrote:

> @Glenn
>
> Thank you for your suggestion! I will look into that!
>
> @Tom
>
> I followed your instructions, but just running doesn't generate a
> meaningful log, so i started the daemon again.
>
> Here's the log.
>
> --
> 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] Rebuild stats database

2016-10-16 Thread tomres
Thanks again for your kind support.
I'm trying a totally fresh install of weewx (3.x) on a totally fresh 
raspbian in a raspberry pi. And include all possible old data in new 
weewx.sdb in order to weewx can rebuild personalized yearly NOAA reports. 
Default temperature ranges are pretty useless in my location :)


El domingo, 16 de octubre de 2016, 14:11:15 (UTC+2), Tom Keffer escribió:
>
> The NOAA data is a small subset of the data in the daily summaries. It 
> contains only temperature, rain, and wind. It does not include other 
> observation types. Furthermore, you would still be missing the archive 
> data, which are used for some calculations.
>
> What are you trying to do? You could write a program to reconstruct some 
> part of the daily summaries but, in the end, you'd end up with something 
> that could recreate the NOAA reports, nothing more.
>
> -tk
>
>
>
>
> On Sat, Oct 15, 2016 at 4:48 PM, tomres  
> wrote:
>
>> Sorry.
>> Because a NOAA monthly report is a daily summaries list, I thought that 
>> the data was the same.
>>
>> Many thanks
>>
>> El domingo, 16 de octubre de 2016, 0:53:13 (UTC+2), Tom Keffer escribió:
>>>
>>> ​The stats database (which went away in v3.x) summarizes by day, not by 
>>> month.
>>>
>>> Unfortunately, I think you're screwed. Next time, be sure to do regular 
>>> backups!
>>>
>>> -tk​
>>>
>>> On Sat, Oct 15, 2016 at 1:47 PM, tomres  wrote:
>>>
 Hello,

 All my old databases are lost, but I still have the monthly NOAA .txt 
 reports.
 Someone has managed to rebuild stats.sdb from them?
 NOAA reports were generated with weewx 2.7. I have not config files, 
 but I think they are near standard.
 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+...@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+...@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: External site reporting irregular timing schedule

2016-10-16 Thread Thomas Keffer
On Sun, Oct 16, 2016 at 6:18 AM, mwall  wrote:

> On Sunday, October 16, 2016 at 8:19:38 AM UTC-4, Tom Keffer wrote:
>>
>> ​Me too.​ What do you think of my theory that the console is
>> (occasionally) waiting more than 5 minutes to emit a LOOP packet?
>>
>
> the log indicates that the driver is getting data regularly.  take a look
> at the entries between some of the 10 minute add records.
>
> there is a yield just before each "next read in X second".  when the data
> are stale, the yielded packet contains only dateTime, usUnits, channel,
> sensor_id, rssi, sensor_battery, but no weather data.
>

​That should be enough to give the engine a chance to break the loop.

Tim: I have attached an instrumented version of
engine.py
 that should shed some light on this mystery. Please set your old version
of
engine.py
aside, and replace it with this one. Assuming you download this version
into
~/Downloads
, the process would be:

​cd /usr/share/weewx​/weewx
mv engine.py engine.py.orig
cp ~/Downloads/engine.py engine.py


Make sure debug=1, then restart weewx, then send the log from the restart,
through the first couple of reports (should take about 20 minutes). The log
will be big, so just attach it as a file.

-tk



​

-- 
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.
#
#Copyright (c) 2009-2015 Tom Keffer 
#
#See the file LICENSE.txt for your full rights.
#

"""Main engine for the weewx weather system."""

# Python imports
import gc
import os.path
import platform
import signal
import socket
import sys
import syslog
import time
import thread

# 3rd party imports:
import configobj
import daemon

# weewx imports:
import weedb
import weewx.accum
import weewx.manager
import weewx.qc
import weewx.station
import weewx.reportengine
import weeutil.weeutil
from weeutil.weeutil import to_bool, to_int
from weewx import all_service_groups

class BreakLoop(Exception):
"""Exception raised when it's time to break the main loop."""

class InitializationError(weewx.WeeWxIOError):
"""Exception raised when unable to initialize the console."""

#==
#Class StdEngine
#==

class StdEngine(object):
"""The main engine responsible for the creating and dispatching of events
from the weather station.

It loads a set of services, specified by an option in the configuration
file.

When a service loads, it binds callbacks to events. When an event occurs,
the bound callback will be called."""

def __init__(self, config_dict):
"""Initialize an instance of StdEngine.

config_dict: The configuration dictionary. """
# Set a default socket time out, in case FTP or HTTP hang:
timeout = int(config_dict.get('socket_timeout', 20))
socket.setdefaulttimeout(timeout)

# Default garbage collection is every 3 hours:
self.gc_interval = int(config_dict.get('gc_interval', 3 * 3600))

# Set up the callback dictionary:
self.callbacks = dict()

# Set up the weather station hardware:
self.setupStation(config_dict)

# Hook for performing any chores before loading the services:
self.preLoadServices(config_dict)

# Load the services:
self.loadServices(config_dict)

# Another hook for after the services load.
self.postLoadServices(config_dict)

def setupStation(self, config_dict):
"""Set up the weather station hardware."""
# Get the hardware type from the configuration dictionary. This will be
# a string such as "VantagePro"
stationType = config_dict['Station']['station_type']

# Find the driver name for this type of hardware
driver = config_dict[stationType]['driver']

syslog.syslog(syslog.LOG_INFO, "engine: Loading station type %s (%s)" %
  (stationType, driver))

# Import the driver:
__import__(driver)

# Open up the weather station, wrapping it in a try block in case
# of failure.
try:
# This is a bit of Python wizardry. First, find the driver module
# in sys.modules.
driver_module = sys.modules[driver]
# Find the function 'loader' within the module:
loader_function = getattr(driver_module, 'loader')
# Call it with the configuration dictionary as the only argument:
self.console = loader_function(config_dict, self)
except Exception, ex:
syslog.syslog(syslog.LOG_ERR,

Re: [weewx-user] Re: External site reporting irregular timing schedule

2016-10-16 Thread mwall
On Sunday, October 16, 2016 at 8:19:38 AM UTC-4, Tom Keffer wrote:
>
> ​Me too.​ What do you think of my theory that the console is 
> (occasionally) waiting more than 5 minutes to emit a LOOP packet?
>

the log indicates that the driver is getting data regularly.  take a look 
at the entries between some of the 10 minute add records.

there is a yield just before each "next read in X second".  when the data 
are stale, the yielded packet contains only dateTime, usUnits, channel, 
sensor_id, rssi, sensor_battery, but no weather data.

-- 
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: External site reporting irregular timing schedule

2016-10-16 Thread Thomas Keffer
On Sat, Oct 15, 2016 at 7:38 PM, mwall  wrote:

>
> i'm stumped.
>
>
​Me too.​ What do you think of my theory that the console is (occasionally)
waiting more than 5 minutes to emit a LOOP packet?

-tk

-- 
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] Rebuild stats database

2016-10-16 Thread Thomas Keffer
The NOAA data is a small subset of the data in the daily summaries. It
contains only temperature, rain, and wind. It does not include other
observation types. Furthermore, you would still be missing the archive
data, which are used for some calculations.

What are you trying to do? You could write a program to reconstruct some
part of the daily summaries but, in the end, you'd end up with something
that could recreate the NOAA reports, nothing more.

-tk




On Sat, Oct 15, 2016 at 4:48 PM, tomres  wrote:

> Sorry.
> Because a NOAA monthly report is a daily summaries list, I thought that
> the data was the same.
>
> Many thanks
>
> El domingo, 16 de octubre de 2016, 0:53:13 (UTC+2), Tom Keffer escribió:
>>
>> ​The stats database (which went away in v3.x) summarizes by day, not by
>> month.
>>
>> Unfortunately, I think you're screwed. Next time, be sure to do regular
>> backups!
>>
>> -tk​
>>
>> On Sat, Oct 15, 2016 at 1:47 PM, tomres  wrote:
>>
>>> Hello,
>>>
>>> All my old databases are lost, but I still have the monthly NOAA .txt
>>> reports.
>>> Someone has managed to rebuild stats.sdb from them?
>>> NOAA reports were generated with weewx 2.7. I have not config files, but
>>> I think they are near standard.
>>> 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+...@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.
>

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


[weewx-user] There is a report on temperature-time to be used for agricultural pest and disease control?

2016-10-16 Thread José Miguel Castellet Martí


Dear colleagues,

I was wondering if somebody has prepared a report, similar to the HEAT/COOL 
DEG DAYS in NOAA files, to show the degrees x time above/below a 
customizable threshold temperature. The main idea is to use that 
information for agricultural pest and disease control, since there are a 
lot of plague/crops where the temperature (either higher/lower than a 
threshold) during a minimum period acts as a natural control mechanism.

The same report could be very useful to plan the best dates to do some 
interventions on crops.

Any hints?

-- 
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: Version 3.6.1

2016-10-16 Thread Liz
On Fri, 14 Oct 2016 04:51:37 -0700 (PDT)
mwall  wrote:

> On Friday, October 14, 2016 at 6:36:25 AM UTC-4, Liz wrote:
> >
> > Just trying the upgrade through this system. I have got to diff the 
> > files and find the essential parts of the weewx.conf that I have to 
> > change, and those I have to retain. 
> > I can do that, but for a lot of our users this is a big degree of 
> > difficulty. 
> >
> > I'd suggest that the post-install script looks at essentials which
> > need changing in conf files and does those. 
> >  
> 
> liz,
> 
> could you provide more detail about the process you went through so i
> can duplicate the behavior?
> 
> there is already logic in the pre/post scripts that *should* upgrade
> the weewx.conf file when you do a .deb upgrade (using dpkg or apt).
> when it encounters changes to weewx.conf, it *should* do the standard
> debian prompts about changed files.
> 
> m
> 

dpkg-reconfigure offers Metric vs Imperial measures (whatever they
might be called)
However, Metric installs METRICWX, not metric, with the wind speeds in
m/s.
I've tried it twice more to be sure that dpkg-reconfigure is the
responsible part.

Liz

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


[weewx-user] Re: Extract maximum value of an observation from loop packet

2016-10-16 Thread Andrew Potter
Thanks Tom and Matt for your prompt responses.
Apologies - I probably didn't quite make my intention clear.
I'm reading a sensor via OWFS, and am hoping to get weewx to only use the 
maximum value measured during any 5-minute archive interval.
Going on from Tom's post, I want to make sure the value of 
'$current.foo.max' is what goes into the database, rather than an average 
or anything else.
I figure one way is to create/write a new data type in the owfs driver to 
return the max value, or work on Matthew's suggestion above, but I'm hoping 
there's an easy way to do it...
Thanks
Andrew


On Sunday, October 16, 2016 at 9:21:28 AM UTC+10:30, mwall wrote:
>
> hi andrew,
>
> it is pretty simple, actually.  make a service that is bound to LOOP 
> packets.  on each loop packet, spit the value(s) to file/disk/database.
>
> create a file in user/captureloop.py that has something like this:
>
> import weewx
> from weewx.engine import StdService
>
> class CaptureLOOP(StdService):
> def __init__(self, engine, config_dict):
> super(CaptureLOOP, self).__init__(engine, config_dict)
> self.filename = config_dict.get('CaptureLOOP', {}).get('filename', 
> '/var/tmp/loop')
> self.bind(weewx.NEW_LOOP_PACKET, self.save_data)
>
> def save_data(self, event):
> with open(self.filename, "w") as f:
> f.write("%s" % event.packet)
>
> then in weewx.conf add user.captureloop.CaptureLoop to the report_services 
> list.
>
> m
>

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