Re: [weewx-user] Re: Version 3.6.0 hits the streets

2016-10-07 Thread gjr80
  
>
> Oh yes - somewhere in the instructions (or help, not sure which) - the 
> time in the --date command is in brackets.  I presume this is because the 
> time is optional - but why the brackets?  An option in syntax definitions 
> is (I thought) indicated by | whilst the inclusion of brackets implies the 
> time should be enclosed in brackets - which is wrong (I think).
>
>
It is the Utilities guide and the --help usage text. The hh:mm in a range 
is optional.  I will get some input from Tom and Matthew, can you have 
nested [ ], if not you end up with a very long line. 

Gary

-- 
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.0 hits the streets

2016-10-07 Thread gjr80
Ok, that is a mess. Have another read at the dot point instructions I 
provided. 

On 8 October 2016 at 07:37, gjr80  wrote:

> Andrew,
>>
>> My bad, wee_import was being told to write to a US database irrespective 
>> of the underlying database units, the QC department is being fired as I 
>> write this. The attached weeimport.py should fix the issue, usual deal:
>>
>>- move the original weewx/bin/weeimport/weeimport.py aside by 
>>renaming it to something like weeimport_orig.py
>>- copy the attached weeimport.py in its place
>>- run wee_import
>>- let us know the outcome
>>
>> Gary
>>
>
The bug that caused your original problem is in the file 
weewx/bin/weeimport/weeimport.py (note the .py extension), that is the file 
you need to move aside and replace. The file wee/bin/wee_import (note, no 
.py extension) is fine. You will need to put things back how they were and 
then move aside original weewx/bin/weeimport/weeimport.py (note the .py 
extension) aside and replace it with the previously attached weeimport.py

Gary

-- 
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.0 hits the streets

2016-10-07 Thread Andrew Milner
Gary
I hasve got into a total mess now  getting errors all over the place

After the 3.6 instasll I had a file called wee_import in /bin which I
renamed to wee_import.orig and moved the new wee_import.py in its place.

THEN I saw there is also a weeimport directory, which contains wee_import.py
I am still getting all sorts of errors ...

What have I done wrong?  I tried putting wee_import.orig back to wee_import
no joy

I have no touched the files in the /bin/weeimport directory yet

hlp ..


On 8 October 2016 at 07:37, gjr80  wrote:

> Andrew,
>
> My bad, wee_import was being told to write to a US database irrespective
> of the underlying database units, the QC department is being fired as I
> write this. The attached weeimport.py should fix the issue, usual deal:
>
>- move the original weewx/bin/weeimport/weeimport.py aside by renaming
>it to something like weeimport_orig.py
>- copy the attached weeimport.py in its place
>- run wee_import
>- let us know the outcome
>
> Gary
>
> On Saturday, 8 October 2016 13:16:30 UTC+10, Andrew Milner wrote:
>>
>> . not quite perfect ..
>> Just upgraded, and thought I would correct some errors from a previous
>> import by using wee_import from WU with full qc checking - as available in
>> the now standard wee_import.
>>
>> Created a wuimport.conf, and modified the qc section of weewx.conf
>>
>> The --dry-run proceeded to run looking OK, but when I then went to do the
>> real import I got:
>>
>> unit system of incoming record (0x01) differs from 'archive' table in
>> 'archive' database (0x10)
>>  nothing done, exiting
>>
>> I AM using a metric database, but my WU data is also in metric - so
>> where/how do I tell wee_import the format of the incoming record?
>>
>> PS I had previously used wee_import without problems, but before the
>> creation of the now mandatory wee_import config file and the latest qc mods.
>>
>>
>> On Saturday, 8 October 2016 04:01:02 UTC+3, vince wrote:
>>>
>>> On Friday, October 7, 2016 at 5:12:02 PM UTC-7, Tom Keffer wrote:

 With this release we have rearranged the User's Guide, and broken out
 the hardware-specific information into its own Hardware Guide
 .



>>> upgraded (debian setup.py method) from 3.5.0 - perfect as always.
>>>
>>> The documentation reorganization especially the Hardware Guide is
>>> 'fabulous'.
>>>
>> --
> 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/mlw2k1encLU/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.


[weewx-user] Re: Version 3.6.0 hits the streets

2016-10-07 Thread gjr80
 

Andrew,

My bad, wee_import was being told to write to a US database irrespective of 
the underlying database units, the QC department is being fired as I write 
this. The attached weeimport.py should fix the issue, usual deal:

   - move the original weewx/bin/weeimport/weeimport.py aside by renaming 
   it to something like weeimport_orig.py
   - copy the attached weeimport.py in its place
   - run wee_import
   - let us know the outcome

Gary

On Saturday, 8 October 2016 13:16:30 UTC+10, Andrew Milner wrote:
>
> . not quite perfect ..
> Just upgraded, and thought I would correct some errors from a previous 
> import by using wee_import from WU with full qc checking - as available in 
> the now standard wee_import.
>
> Created a wuimport.conf, and modified the qc section of weewx.conf
>
> The --dry-run proceeded to run looking OK, but when I then went to do the 
> real import I got:
>
> unit system of incoming record (0x01) differs from 'archive' table in 
> 'archive' database (0x10)
>  nothing done, exiting
>
> I AM using a metric database, but my WU data is also in metric - so 
> where/how do I tell wee_import the format of the incoming record?
>
> PS I had previously used wee_import without problems, but before the 
> creation of the now mandatory wee_import config file and the latest qc mods.
>
>
> On Saturday, 8 October 2016 04:01:02 UTC+3, vince wrote:
>>
>> On Friday, October 7, 2016 at 5:12:02 PM UTC-7, Tom Keffer wrote:
>>>
>>> With this release we have rearranged the User's Guide, and broken out 
>>> the hardware-specific information into its own Hardware Guide 
>>> .
>>>
>>>
>>>
>> upgraded (debian setup.py method) from 3.5.0 - perfect as always.
>>
>> The documentation reorganization especially the Hardware Guide is 
>> 'fabulous'. 
>>
>

-- 
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-2016 Tom Keffer  and
#Gary Roderick
#
#See the file LICENSE.txt for your full rights.
#

from __future__ import with_statement

"""Module providing the base classes and API for importing observational data
into weewx.
"""

# Python imports
import datetime
import os.path
import re
import sys
import syslog
import time

from datetime import datetime as dt

# weewx imports
import weecfg
import weewx
import weewx.qc
import weewx.wxservices

from weewx.manager import open_manager_with_config
from weewx.units import unit_constants, unit_nicknames, convertStd, to_std_system, ValueTuple
from weeutil.weeutil import timestamp_to_string, option_as_list, to_int, tobool, _get_object

# List of sources we support
SUPPORTED_SOURCES = ['CSV', 'WU', 'Cumulus']

# Minimum requirements in any explicit or implicit weewx field-to-import field
# map
MINIMUM_MAP = {'dateTime': {'units': 'unix_epoch'},
   'usUnits': {'units': None},
   'interval': {'units': 'minute'}}


# 
#Error Classes
# 


class WeeImportMapError(Exception):
"""Base class of exceptions thrown when encountering an error with an
   external source-to-weewx field map.
"""


class WeeImportIOError(Exception):
"""Base class of exceptions thrown when encountering an I/O error with an
   external source.
"""


class WeeImportFieldError(Exception):
"""Base class of exceptions thrown when encountering an error with a field
   from an external source.
"""


# 
#class Source
# 


class Source(object):
""" Abstract base class used for interacting with an external data source
to import records into the weewx archive.

__init__() must define the following properties:
self.dry_run  - Is this a dry run (ie do not save imported records
to archive). [True|False].
self.calc_missing - Calculate any missing derived observations.
[True|False].
self.tranche  - Number of records to be written to archive in a
single transaction. Integer.
self.interval - Method of determining interval value if interval
field not included in data source.
['config'|'derive'|x] where x is an integer.

Child classes are used to interract with a specific source (eg CSV file,
WU). Any such child classes must define a 

[weewx-user] Re: Version 3.6.0 hits the streets

2016-10-07 Thread gjr80
Andrew,

My bad, wee_import was being told to write to a US database irrespective of 
the underlying database units, the QC department is being fired as I write 
this. The attached weeimport.py should fix the issue, usual deal:

   - move the original weewx/bin/weeimport/weeimport.py aside by renaming 
   it to something like weeimport_orig.py
   - copy the attached weeimport.py in its place
   - run wee_import
   - let us know the outcome
   
Gary

On Saturday, 8 October 2016 13:16:30 UTC+10, Andrew Milner wrote:
>
> . not quite perfect ..
> Just upgraded, and thought I would correct some errors from a previous 
> import by using wee_import from WU with full qc checking - as available in 
> the now standard wee_import.
>
> Created a wuimport.conf, and modified the qc section of weewx.conf
>
> The --dry-run proceeded to run looking OK, but when I then went to do the 
> real import I got:
>
> unit system of incoming record (0x01) differs from 'archive' table in 
> 'archive' database (0x10)
>  nothing done, exiting
>
> I AM using a metric database, but my WU data is also in metric - so 
> where/how do I tell wee_import the format of the incoming record?
>
> PS I had previously used wee_import without problems, but before the 
> creation of the now mandatory wee_import config file and the latest qc mods.
>
>
> On Saturday, 8 October 2016 04:01:02 UTC+3, vince wrote:
>>
>> On Friday, October 7, 2016 at 5:12:02 PM UTC-7, Tom Keffer wrote:
>>>
>>> With this release we have rearranged the User's Guide, and broken out 
>>> the hardware-specific information into its own Hardware Guide 
>>> .
>>>
>>>
>>>
>> upgraded (debian setup.py method) from 3.5.0 - perfect as always.
>>
>> The documentation reorganization especially the Hardware Guide is 
>> 'fabulous'. 
>>
>

-- 
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] Responsive Skin install

2016-10-07 Thread Darryn Capes-Davis
OK. I had a brief time this Saturday afternoon to publish the aussearch.oy 
to GitHub as well as write a quick Wiki page. See 
https://github.com/dcapslock/weewx-responsive-skin/wiki/Australian-'Search'-Extensions

One reason I held back till now is that implementing *appTemp* was a bit 
complicated as it was an engine extension. Now that *appTemp* is available 
in version 3.5, the *Feels Like* component is quite straightforward.

On Saturday, October 8, 2016 at 12:36:38 PM UTC+11, Glenn McKechnie wrote:

> Hi Darryn,
>
> I'm certainly interested in the Australian forecast abilities and the skin 
> at http://carlingfordweather.sydney/ looks pretty good too. So if you can 
> add me to your ' walk through ' discussion, it would be appreciated.
>
> -- 
>
> Cheers
>  Glenn
>
> rorpi-raspberry pi + weewx: now with scripts 
> 
>
>
>

-- 
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: Version 3.6.0 hits the streets

2016-10-07 Thread Andrew Milner
. not quite perfect ..
Just upgraded, and thought I would correct some errors from a previous 
import by using wee_import from WU with full qc checking - as available in 
the now standard wee_import.

Created a wuimport.conf, and modified the qc section of weewx.conf

went to do the import and got
unit system of incoming record (0x01) differs from 'archive' table in 
'archive' database (0x10)
 nothing done, exiting

I AM using a metric database, but my WU data is also in metric - so 
where/how do I tell wee_import the format of the incoming record?

PS I had previously used wee_import without problems, but before the 
creation of the now mandatory wee_import config file and the latest qc mods.




On Saturday, 8 October 2016 04:01:02 UTC+3, vince wrote:

> On Friday, October 7, 2016 at 5:12:02 PM UTC-7, Tom Keffer wrote:
>>
>> With this release we have rearranged the User's Guide, and broken out the 
>> hardware-specific information into its own Hardware Guide 
>> .
>>
>>
>>
> upgraded (debian setup.py method) from 3.5.0 - perfect as always.
>
> The documentation reorganization especially the Hardware Guide is 
> 'fabulous'. 
>

-- 
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] Responsive Skin install

2016-10-07 Thread Glenn McKechnie
Hi Darryn,

I'm certainly interested in the Australian forecast abilities and the skin
at http://carlingfordweather.sydney/ looks pretty good too. So if you can
add me to your ' walk through ' discussion, it would be appreciated.

-- 

Cheers
 Glenn

rorpi-raspberry pi + weewx: now with scripts


-- 
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: Version 3.6.0 hits the streets

2016-10-07 Thread vince
On Friday, October 7, 2016 at 5:12:02 PM UTC-7, Tom Keffer wrote:
>
> With this release we have rearranged the User's Guide, and broken out the 
> hardware-specific information into its own Hardware Guide 
> .
>
>
>
upgraded (debian setup.py method) from 3.5.0 - perfect as always.

The documentation reorganization especially the Hardware Guide is 
'fabulous'. 

-- 
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] weewx with OS LW301 and interceptor driver

2016-10-07 Thread Sam Roza
Hello All!

I've got weewx running on an rPi3, and I have the interceptor set up. All 
starts correctly, and the port is open, etc. The issue is that none of the 
packet collection methods seems to work. I am receiving error 400 from both 
tcpdump as well as ngrep commands that are piped to nc:

# tcpdump -i eth0 dst port 80 | nc 127.0.0.1 
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes

Error response


Error response
Error code 400.
Message: Bad request syntax ('17:12:30.097480 IP ypestis2.46860  
192.168.1.93.http: Flags [S], seq 2708070981, win 29200, options [mss 
1460,sackOK,TS val 240293608 ecr 0,nop,wscale 7], length 0').
Error code explanation: 400 = Bad request syntax or unsupported method.

85 packets captured
85 packets received by filter
0 packets dropped by kernel


Here's an example from ngrep:

~~~
 ngrep -l -q -d eth0 '0004a369e0d6'|nc localhost 

Error response


Error response
Error code 400.
Message: Bad request version ('(192.168.1.0/255.255.255.0)').
Error code explanation: 400 = Bad request syntax or unsupported method.

~~~

One of the things I'm unsure of is the format of the data expected by 
Interceptor. There aren't notes besides how to install, and how to lightly 
configure the device. I was working with Matthew on some of those things, 
and got it running on a non-standard port, which was good, but now I don't 
seem to be able to get it the last mile (to collecting actual data). I've 
been playing with the individual commands used to collect the packets, 
because Matthew's examples are for 'www.acurite.com' and Oregon Scientific 
is using AWS nodes for their cloud hosting. The plaintext mac address ngrep 
command returns nice, clean data:

~~~
T 192.168.1.73:3555 -> 54.228.205.96:80 [AP]
  
mac=0004a369e0d6=90=d0=0=0=0=270=0.9=0.0=1=1 

 

T 192.168.1.73:3556 -> 54.228.205.188:80 [AP]
  
mac=0004a369e0d6=c2=0=0=0=1009==1011=0=2=1
 
 

T 192.168.1.73:3557 -> 54.228.205.96:80 [AP]
  mac=0004a369e0d6=8e=63=0=0=1=386=1=1   


~~~

But something still seems to be wrong.

Any help that can be offered would be greatly appreciated. 

Thanks!

-Sam

-- 
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: Hurricane Matthew - wow

2016-10-07 Thread vince
On Friday, October 7, 2016 at 9:08:59 AM UTC-7, Steve2Q wrote:
>
> Hope the owner of rowes.org is safe. The site did not respond this AM
>
>
yup, I was noticing thatsurrounding stations look up, guessing a power 
outage.

it'll be interesting seeing the history (assuming it has a datalogger) when 
it comes back online 

-- 
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: Hurricane Matthew - wow

2016-10-07 Thread Steve2Q
Hope the owner of rowes.org is safe. The site did not respond this AM


-- 
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: Niculskin with response design, bootstrap style and history template released

2016-10-07 Thread Robin
Andrew,

Could you tell me how you set up skin.conf to get the 'Days when rain fell' 
table? I have been thinking about adding 'Dry Days' which is not so far 
from your table. 

I have also been collecting the number of hours of sunshine each day and 
have been pondering a 'Bootstrap' table for 'Average Daily Sunshine' but I 
couldn't get my head around it. For now I make the calculations and update 
the table manually. Any help with this would also be appreciated. I am 
happy to provide free beer (Fix, Vergina, Mythos, Alpha or Amstel) but you 
will need to collect in person).

Regards
Robin

On Friday, 7 October 2016 12:50:20 UTC+3, Andrew Milner wrote:
>
> Yes, Nick's history pages are indeed very useful .
>
> http://cr.netflash.com.cy:61009/weewxweather/Bootstrap/history.html
>

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