[weewx-user] Re: FTP Upload interval

2016-11-08 Thread gjr80
Hi,

To be truthful, the easiest way to do this is to upgrade to v3.6.2 and then 
you can make use of the report_timing option 
. FTP is 
just another skin whose reports can be controlled by the report_timing 
option just as any other skin/reports can. Something like

[[FTP]]
report_timing = */10 * * * *
(rest of FTP settings)

should do the trick.

Gary



On Wednesday, 9 November 2016 16:39:12 UTC+10, Flemming Andersen wrote:
>
> Hi.
>
> I seek help, to change the FTP Upload, so there only uploades files every 
> 10 minutes. to the Internet, and still reports, every 5 min. to the local 
> intranet.
>
> Weewx version 3.5, running on Raspberry PI.
>
> Thanks for the great weewx software.
>
> Regards Flemming
>

-- 
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: Off topic - sql issue

2016-11-08 Thread Andrew Milner
Thanks Gary - done my homework, created a subquery for today's readings 
(since MySQL can't have a subquery in a view) and selected from that.  
Still do not fully understand the where datetime is null part though - but 
it works (down to a second now)

On Wednesday, 9 November 2016 07:32:46 UTC+2, gjr80 wrote:
>
> The WHERE clause must be satisfied or surely there would be no results at 
> all? 
>
> As for optimising, that is left as homework... Seriously, you might find 
> some info by googling 'SQL optimise left join', quite a few results but a 
> bit heavy for me. Sorry but it was a stretch coming up with the query.
>
> 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.


[weewx-user] FTP Upload interval

2016-11-08 Thread Flemming Andersen
Hi.

I seek help, to change the FTP Upload, so there only uploades files every 
10 minutes. to the Internet, and still reports, every 5 min. to the local 
intranet.

Weewx version 3.5, running on Raspberry PI.

Thanks for the great weewx software.

Regards Flemming

-- 
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: Off topic - sql issue

2016-11-08 Thread gjr80
The WHERE clause must be satisfied or surely there would be no results at all? 

As for optimising, that is left as homework... Seriously, you might find some 
info by googling 'SQL optimise left join', quite a few results but a bit heavy 
for me. Sorry but it was a stretch coming up with the query.

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.


[weewx-user] Re: Interceptor using bridge new Accurate firmware

2016-11-08 Thread Jerome Helbert
This commit looks good! Thanks!

On Tuesday, November 8, 2016 at 4:06:48 PM UTC-6, mwall wrote:
>
> On Tuesday, November 8, 2016 at 3:58:04 PM UTC-5, Jerome Helbert wrote:
>
> Filter was an issue because the class Consumer init function uses 
>> pcap_filter:
>>
>
> right you are!  fixed at 2c1a2dd
>
>  
>

-- 
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: Off topic - sql issue

2016-11-08 Thread Andrew Milner
YES Gary - many many thanks!!  It produces the results required, but sadly 
takes a long time to execute (22 seconds) on my rpi - possibly because the 
readings table is quite large (14000 records) and the where clause is of 
course never satisfied.  Any ideas for making it more efficient?  At least 
I've solved my immediate problem though!!  Many thanks indeed.


On Tuesday, 8 November 2016 23:48:28 UTC+2, gjr80 wrote:

> Andrew,
>
> First off delete the single quotes, my mistake. I didn't actually use 
> 'table_name'.a or 'table_name'.b it was 'table_name' a and 'table_name' b 
> (note spaces not periods). This just creates aliases for table_name when we 
> join it to itself. So if the table name is readings the statement would 
> become:
>
> SELECT a.*
> FROM readings a
> LEFT JOIN readings b
> ON a.id=b.id AND a.datetime WHERE b.datetime IS NULL
> ORDER BY id;
>
> Added the ORDER BY if you want it sorted on id.
>
> Gary
>
> On Tuesday, 8 November 2016 23:41:26 UTC+10, Andrew Milner wrote:
>>
>> Gary
>> If the data is in  a table called readings then I assume 
>> 'table_name'.a refers to readings - but what does 'table_name'.b referring 
>> to??
>>
>>
>>
>> On Tuesday, 8 November 2016 10:51:16 UTC+2, gjr80 wrote:
>>
>>> Andrew,
>>>
>>> My SQL is somewhat rusty but what about something like:
>>>
>>> SELECT a.*
>>> FROM 'table_name' a
>>> LEFT JOIN 'table_name' b
>>> ON a.id=b.id AND a.datetime>> WHERE b.datetime IS NULL
>>>
>>> where the table is table_name. Not tested.
>>>
>>> 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.


[weewx-user] Re: Interceptor using bridge new Accurate firmware

2016-11-08 Thread mwall
On Tuesday, November 8, 2016 at 3:58:04 PM UTC-5, Jerome Helbert wrote:

Filter was an issue because the class Consumer init function uses 
> pcap_filter:
>

right you are!  fixed at 2c1a2dd

 

-- 
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: Off topic - sql issue

2016-11-08 Thread gjr80
Andrew,

First off delete the single quotes, my mistake. I didn't actually use 
'table_name'.a or 'table_name'.b it was 'table_name' a and 'table_name' b 
(note spaces not periods). This just creates aliases for table_name when we 
join it to itself. So if the table name is readings the statement would 
become:

SELECT a.*
FROM readings a
LEFT JOIN readings b
ON a.id=b.id AND a.datetime
> Gary
> If the data is in  a table called readings then I assume 
> 'table_name'.a refers to readings - but what does 'table_name'.b referring 
> to??
>
>
>
> On Tuesday, 8 November 2016 10:51:16 UTC+2, gjr80 wrote:
>
>> Andrew,
>>
>> My SQL is somewhat rusty but what about something like:
>>
>> SELECT a.*
>> FROM 'table_name' a
>> LEFT JOIN 'table_name' b
>> ON a.id=b.id AND a.datetime> WHERE b.datetime IS NULL
>>
>> where the table is table_name. Not tested.
>>
>> 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.


[weewx-user] Re: Interceptor using bridge new Accurate firmware

2016-11-08 Thread Jerome Helbert
Filter was an issue because the class Consumer init function uses 
pcap_filter:
def __init__(self, parser, mode='listen',
 address=DEFAULT_ADDR, port=DEFAULT_PORT, handler=None,
 iface=DEFAULT_IFACE, pcap_filter=DEFAULT_FILTER):

but you are still using filter as an argument name in the __main function__
device = InterceptorDriver.DEVICE_TYPES.get(options.device_type)(
 mode=options.mode,
 iface=options.iface, filter=options.filter,
 address=options.addr, port=options.port)

and class InterceptorDriver init only passes in stn_dict when the conf file 
is used, so it resolves the conf file name directly:
self._device = self.DEVICE_TYPES.get(self._device_type)(**stn_dict) 

If we use pcap_filter in the consumer class init, then we have to use the 
same argument names in the other places too.


On Tuesday, November 8, 2016 at 9:12:43 AM UTC-6, mwall wrote:
>
>
>
> On Tuesday, November 8, 2016 at 8:55:31 AM UTC-5, Jerome Helbert wrote:
>>
>> Finally got a chance to check out the driver (latest commit  2ad77b7 
>> ),
>>  
>> had to make some changes to get it to run at all. 
>>
>>
>>1. I see you had to change from filter to pcap_filter
>>1. The weewx.conf template still references filter
>>   2. The standalone version of the program (__main__) does as well
>>2. class SniffServer had references to itself in its init when 
>>referencing SniffServer.SNAPLEN, SniffServer.PROMISCUOUS, 
>>SniffServer.TIMEOUT_MSEnter code here...
>>1. Changed these to self.SNAPLEN, self.PROMISCUOUS, self.TIMEOUT_MS
>>3. The two logdbg statements in decode_ip_packet are causing 
>>problems... some of the values arent strings.
>>   1. I had no solution... just commented them out for now.
>>
>> With those changes it seems to be running great now
>>
>>>

> jerome,
>
> thank you for testing.  fixes applied at commit 3258d44
>
> i left 'filter' intentionally in the conf and command-line, although if 
> you think 'pcap_filter' is more helpful from a ui point of view i'm happy 
> to change it.  i used pcap_filter as a variable name since 'filter' is a 
> python built-in.
>
> readme and comments have been updated with the pcap details.
>
> thanks again for posting your implementation.  having pcap sniffing as an 
> option in the interceptor is very powerful.
>
> 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.


Re[2]: [weewx-user] weewx 2 different drivers

2016-11-08 Thread martin swanepoel

Neither am I
;-)




Tuesday, 8 November 2016, 16:32 +0200 from Andrew Milner  
:
>well you have to use the bindings somehow!! weewx is not psychic
>http://weewx.com/docs/customizing.htm#Using_multiple_bindings
>
>
>On Tuesday, 8 November 2016 15:44:49 UTC+2, martin swanepoel  wrote:
>>Hi Andrew,
>>
>>Here is the database part:
>>
>>[DataBindings]
>>
>>    [[wx_binding]]
>>        # The database must match one of the sections in [Databases].
>>        # This is likely to be the only option you would want to change.
>>        # database = archive_sqlite
>>        database = archive_mysql
>>        # The name of the table within the database
>>        table_name = archive
>>        # The manager handles aggregation of data for historical summaries
>>        manager = weewx.wxmanager.WXDaySummaryManager
>>        # The schema defines the structure of the database.
>>        # It is *only* used when the database is created.
>>        schema = schemas.wview.schema
>>    [[forecast_binding]]
>>        database = forecast_sqlite
>>
>>    [[bmp_binding]]
>>        database = bmp_mysql
>>        table_name = archive
>>        manager = weewx.wxmanager.WXDaySummaryManager
>>        schema = schemas.wview.schema
>>    [[bmp_fore_binding]]
>>        database = bmp_fore_mysql
>>
>>##
>>
>>#   This section defines various databases.
>>
>>[Databases]
>>
>>    # A SQLite database is simply a single file
>>    [[archive_sqlite]]
>>        database_type = SQLite
>>        database_name = weewx.sdb
>>
>>    # MySQL
>>    [[archive_mysql]]
>>        database_type = MySQL
>>        database_name = weewx
>>    [[forecast_sqlite]]
>>        database_name = forecast.sdb
>>        database_type = SQLite
>>
>>        [[ bmp_mysql]]
>>        database_type = MySQL
>>        database_name = weewxbmp
>>    [[bmp_fore_mysql]]
>>        database_name = forecastbmp
>>        database_type = MySQL
>>
>>##
>>
>>This is the only one configured with the reporting service.
>>
>>From your reply I assume I have to make changes to ( skin.conf and the 
>>templates) ?
>>
>>Thanks,
>>Martin
>>
>>
>>On Mon, Nov 7, 2016 at 2:28 PM, martin swanepoel  < marthinus...@gmail.com > 
>>wrote:
>>>Running 2 instances of weewx. 1 is the sdr driver but this station don't 
>>>have a pressure sensor. 2 Hook up a bmp085 onto the raspberry for the second 
>>>instance to get barometric data and inside temperature.
>>>
>>>Question now how do I integrate the 2 together on one www server. What 
>>>happens now is they overwrite the same pages. So sometimes I see the 
>>>barometric graphs and the next time the graphs from the sdr equipment. Any 
>>>suggestions ?
>>>
>>>Thanks,
>>>Martin
>>>-- 
>>>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/zL6dnD7el6k/unsubscribe .
>>>To unsubscribe from this group and all its topics, 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 a topic in the Google 
>Groups "weewx-user" group.
>To unsubscribe from this topic, visit  
>https://groups.google.com/d/topic/weewx-user/zL6dnD7el6k/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: Can't start weewx automatically in Ubuntu 16.04

2016-11-08 Thread Daniel Jönsson
It looks like I have two libusb 0.1.12-28 and 1.0.20-1.
pyusb is 1.0.0~b2-2

And yes. Locale is sv_SE.UTF-8

It has been working flawless on this machine for more than a year. This 
error started when I did a upgrade from Ubuntu 14.04 to 16.04.

-- 
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: Can't start weewx automatically in Ubuntu 16.04

2016-11-08 Thread mwall
On Tuesday, November 8, 2016 at 6:33:08 AM UTC-5, Daniel Jönsson wrote:
>
> Last week I upgraded my Ubuntu on my server from 14.04 to 16.04. And after 
> the upgrade I can't start weewx on boot any more.
>

daniel,

what versions of libusb and pyusb are on your system?

dpkg -l | grep usb

also, is your system localized to something other than english?

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.


[weewx-user] Re: Can't start weewx automatically in Ubuntu 16.04

2016-11-08 Thread Daniel Jönsson
The log above is when trying to start the demon with the Upstart script 
(through systemd).
If I start a terminal and switch to root and then try start the demon with 
the exact same exec then it works, and I get this in my log:

Nov  8 16:32:49 server weewx[9408]: engine: Initializing weewx version 3.6.1
Nov  8 16:32:49 server weewx[9408]: engine: Using Python 2.7.12 (default, Jul  
1 2016, 15:12:24) #012[GCC 5.4.0 20160609]
Nov  8 16:32:49 server weewx[9408]: engine: Platform 
Linux-4.4.0-45-generic-x86_64-with-Ubuntu-16.04-xenial
Nov  8 16:32:49 server weewx[9408]: engine: pid file is /var/run/weewx.pid
Nov  8 16:32:49 server weewx[9412]: engine: Using configuration file 
/etc/weewx/weewx.conf
Nov  8 16:32:49 server weewx[9412]: engine: Initializing engine
Nov  8 16:32:49 server weewx[9412]: engine: Loading station type FineOffsetUSB 
(weewx.drivers.fousb)
Nov  8 16:32:49 server weewx[9412]: fousb: driver version is 1.9
Nov  8 16:32:49 server weewx[9412]: fousb: polling mode is PERIODIC
Nov  8 16:32:49 server weewx[9412]: fousb: polling interval is 60
Nov  8 16:32:49 server weewx[9412]: fousb: found station on USB bus= device=
Nov  8 16:32:49 server weewx[9412]: engine: Loading service 
weewx.engine.StdTimeSynch
Nov  8 16:32:49 server weewx[9412]: engine: Finished loading service 
weewx.engine.StdTimeSynch
Nov  8 16:32:49 server weewx[9412]: engine: Loading service 
weewx.engine.StdConvert
Nov  8 16:32:49 server weewx[9412]: engine: StdConvert target unit is 0x1
Nov  8 16:32:49 server weewx[9412]: engine: Finished loading service 
weewx.engine.StdConvert
Nov  8 16:32:49 server weewx[9412]: engine: Loading service 
weewx.engine.StdCalibrate
Nov  8 16:32:49 server weewx[9412]: engine: Finished loading service 
weewx.engine.StdCalibrate
Nov  8 16:32:49 server weewx[9412]: engine: Loading service weewx.engine.StdQC
Nov  8 16:32:49 server weewx[9412]: engine: Finished loading service 
weewx.engine.StdQC
Nov  8 16:32:49 server weewx[9412]: engine: Loading service 
weewx.wxservices.StdWXCalculate
Nov  8 16:32:49 server weewx[9412]: wxcalculate: The following values will be 
calculated: barometer=prefer_hardware, windchill=prefer_hardware, 
dewpoint=prefer_hardware, appTemp=prefer_hardware, rainRate=prefer_hardware, 
windrun=prefer_hardware, heatindex=prefer_hardware, 
maxSolarRad=prefer_hardware, humidex=prefer_hardware, pressure=prefer_hardware, 
inDewpoint=prefer_hardware, ET=prefer_hardware, altimeter=prefer_hardware, 
cloudbase=prefer_hardware
Nov  8 16:32:49 server weewx[9412]: wxcalculate: The following algorithms will 
be used for calculations: altimeter=aaNOAA, maxSolarRad=RS
Nov  8 16:32:49 server weewx[9412]: engine: Finished loading service 
weewx.wxservices.StdWXCalculate
Nov  8 16:32:49 server weewx[9412]: engine: Loading service 
weewx.engine.StdArchive
Nov  8 16:32:49 server weewx[9412]: engine: Archive will use data binding 
wx_binding
Nov  8 16:32:49 server weewx[9412]: engine: Record generation will be attempted 
in 'hardware'
Nov  8 16:32:50 server weewx[9412]: engine: Using archive interval of 300 
seconds (specified by hardware)
Nov  8 16:32:50 server weewx[9412]: engine: Use LOOP data in hi/low 
calculations: 1
Nov  8 16:32:50 server weewx[9412]: engine: Using binding 'wx_binding' to 
database 'weewx'
Nov  8 16:32:50 server weewx[9412]: manager: Starting backfill of daily 
summaries
Nov  8 16:32:50 server weewx[9412]: manager: Daily summaries up to date
Nov  8 16:32:50 server weewx[9412]: engine: Finished loading service 
weewx.engine.StdArchive
Nov  8 16:32:50 server weewx[9412]: engine: Loading service 
weewx.restx.StdStationRegistry
Nov  8 16:32:50 server weewx[9412]: restx: StationRegistry: Registration not 
requested.
Nov  8 16:32:50 server weewx[9412]: engine: Finished loading service 
weewx.restx.StdStationRegistry
Nov  8 16:32:50 server weewx[9412]: engine: Loading service 
weewx.restx.StdWunderground
Nov  8 16:32:50 server weewx[9412]: restx: Wunderground: Posting not enabled.
Nov  8 16:32:50 server weewx[9412]: engine: Finished loading service 
weewx.restx.StdWunderground
Nov  8 16:32:50 server weewx[9412]: engine: Loading service 
weewx.restx.StdPWSweather
Nov  8 16:32:50 server weewx[9412]: restx: PWSweather: Posting not enabled.
Nov  8 16:32:50 server weewx[9412]: engine: Finished loading service 
weewx.restx.StdPWSweather
Nov  8 16:32:50 server weewx[9412]: engine: Loading service weewx.restx.StdCWOP
Nov  8 16:32:50 server weewx[9412]: restx: CWOP: Posting not enabled.
Nov  8 16:32:50 server weewx[9412]: engine: Finished loading service 
weewx.restx.StdCWOP
Nov  8 16:32:50 server weewx[9412]: engine: Loading service weewx.restx.StdWOW
Nov  8 16:32:50 server weewx[9412]: restx: WOW: Posting not enabled.
Nov  8 16:32:50 server weewx[9412]: engine: Finished loading service 
weewx.restx.StdWOW
Nov  8 16:32:50 server weewx[9412]: engine: Loading service 
weewx.restx.StdAWEKAS
Nov  8 16:32:50 server weewx[9412]: restx: AWEKAS: Posting not enabled.
Nov  8 16:32:50 server 

[weewx-user] Re: Can't start weewx automatically in Ubuntu 16.04

2016-11-08 Thread Daniel Jönsson
OK. Here is the result:

Nov  8 16:23:17 server systemd[1]: Started weewx weather system.
Nov  8 16:23:17 server weewx[8224]: engine: Initializing weewx version 3.6.1
Nov  8 16:23:17 server weewx[8224]: engine: Using Python 2.7.12 (default, Jul  
1 2016, 15:12:24) #012[GCC 5.4.0 20160609]
Nov  8 16:23:17 server weewx[8224]: engine: Platform 
Linux-4.4.0-45-generic-x86_64-with-Ubuntu-16.04-xenial
Nov  8 16:23:17 server weewx[8224]: engine: pid file is /var/run/weewx.pid
Nov  8 16:23:17 server weewx[8229]: engine: Using configuration file 
/etc/weewx/weewx.conf
Nov  8 16:23:17 server weewx[8229]: engine: Initializing engine
Nov  8 16:23:17 server weewx[8229]: engine: Loading station type FineOffsetUSB 
(weewx.drivers.fousb)
Nov  8 16:23:17 server weewx[8229]: fousb: driver version is 1.9
Nov  8 16:23:17 server weewx[8229]: fousb: polling mode is PERIODIC
Nov  8 16:23:17 server weewx[8229]: fousb: polling interval is 60
Nov  8 16:23:17 server weewx[8229]: engine: Received signal TERM (15).
Nov  8 16:23:17 server weewx[8229]: engine:   File "/usr/bin/weewxd", line 64, 
in 
Nov  8 16:23:17 server weewx[8229]: engine: weewx.engine.main(options, args)
Nov  8 16:23:17 server weewx[8229]: engine:   File 
"/usr/share/weewx/weewx/engine.py", line 847, in main
Nov  8 16:23:17 server weewx[8229]: engine: engine = 
engine_class(config_dict)
Nov  8 16:23:17 server weewx[8229]: engine:   File 
"/usr/share/weewx/weewx/engine.py", line 70, in __init__
Nov  8 16:23:17 server weewx[8229]: engine: self.setupStation(config_dict)
Nov  8 16:23:17 server weewx[8229]: engine:   File 
"/usr/share/weewx/weewx/engine.py", line 105, in setupStation
Nov  8 16:23:17 server weewx[8229]: engine: self.console = 
loader_function(config_dict, self)
Nov  8 16:23:17 server weewx[8229]: engine:   File 
"/usr/share/weewx/weewx/drivers/fousb.py", line 226, in loader
Nov  8 16:23:17 server weewx[8229]: engine: return 
FineOffsetUSB(**config_dict[DRIVER_NAME])
Nov  8 16:23:17 server weewx[8229]: engine:   File 
"/usr/share/weewx/weewx/drivers/fousb.py", line 981, in __init__
Nov  8 16:23:17 server weewx[8229]: engine: self.openPort()
Nov  8 16:23:17 server weewx[8229]: engine:   File 
"/usr/share/weewx/weewx/drivers/fousb.py", line 1032, in openPort
Nov  8 16:23:17 server weewx[8229]: engine: dev = self._find_device()
Nov  8 16:23:17 server weewx[8229]: engine:   File 
"/usr/share/weewx/weewx/drivers/fousb.py", line 1065, in _find_device
Nov  8 16:23:17 server weewx[8229]: engine: for bus in usb.busses():
Nov  8 16:23:17 server weewx[8229]: engine:   File 
"/usr/lib/python2.7/dist-packages/usb/legacy.py", line 340, in busses
Nov  8 16:23:17 server weewx[8229]: engine: 
_interop._sorted(core.find(find_all=True), key=lambda d: d.bus),
Nov  8 16:23:17 server weewx[8229]: engine:   File 
"/usr/lib/python2.7/dist-packages/usb/core.py", line 1189, in find
Nov  8 16:23:17 server weewx[8229]: engine: import usb.backend.libusb1 as 
libusb1
Nov  8 16:23:17 server weewx[8229]: engine:   File 
"/usr/lib/python2.7/dist-packages/usb/backend/libusb1.py", line 29, in 
Nov  8 16:23:17 server weewx[8229]: engine: from ctypes import *
Nov  8 16:23:17 server weewx[8229]: engine:   File 
"/usr/lib/python2.7/ctypes/__init__.py", line 497, in 
Nov  8 16:23:17 server weewx[8229]: engine: _cast = PYFUNCTYPE(py_object, 
c_void_p, py_object, py_object)(_cast_addr)
Nov  8 16:23:17 server weewx[8229]: engine:   File 
"/usr/lib/python2.7/ctypes/__init__.py", line 491, in PYFUNCTYPE
Nov  8 16:23:17 server weewx[8229]: engine: class CFunctionType(_CFuncPtr):
Nov  8 16:23:17 server weewx[8229]: import of driver failed:  ()
Nov  8 16:23:17 server weewx[8229]: engine: Unable to load driver:
Nov  8 16:23:17 server weewx[8229]:   Exiting...

-- 
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] weewx 2 different drivers

2016-11-08 Thread Andrew Milner
well you have to use the bindings somehow!! weewx is not psychic
http://weewx.com/docs/customizing.htm#Using_multiple_bindings


On Tuesday, 8 November 2016 15:44:49 UTC+2, martin swanepoel wrote:

> Hi Andrew,
>
> Here is the database part:
>
> [DataBindings]
>
> [[wx_binding]]
> # The database must match one of the sections in [Databases].
> # This is likely to be the only option you would want to change.
> # database = archive_sqlite
> database = archive_mysql
> # The name of the table within the database
> table_name = archive
> # The manager handles aggregation of data for historical summaries
> manager = weewx.wxmanager.WXDaySummaryManager
> # The schema defines the structure of the database.
> # It is *only* used when the database is created.
> schema = schemas.wview.schema
> [[forecast_binding]]
> database = forecast_sqlite
>
> [[bmp_binding]]
> database = bmp_mysql
> table_name = archive
> manager = weewx.wxmanager.WXDaySummaryManager
> schema = schemas.wview.schema
> [[bmp_fore_binding]]
> database = bmp_fore_mysql
>
>
> ##
>
> #   This section defines various databases.
>
> [Databases]
>
> # A SQLite database is simply a single file
> [[archive_sqlite]]
> database_type = SQLite
> database_name = weewx.sdb
>
> # MySQL
> [[archive_mysql]]
> database_type = MySQL
> database_name = weewx
> [[forecast_sqlite]]
> database_name = forecast.sdb
> database_type = SQLite
>
> [[ bmp_mysql]]
> database_type = MySQL
> database_name = weewxbmp
> [[bmp_fore_mysql]]
> database_name = forecastbmp
> database_type = MySQL
>
>
> ##
>
> This is the only one configured with the reporting service.
>
> From your reply I assume I have to make changes to (skin.conf and the 
> templates) ?
>
> Thanks,
> Martin
>
>
> On Mon, Nov 7, 2016 at 2:28 PM, martin swanepoel  > wrote:
>
>> Running 2 instances of weewx. 1 is the sdr driver but this station don't 
>> have a pressure sensor. 2 Hook up a bmp085 onto the raspberry for the 
>> second instance to get barometric data and inside temperature.
>>
>> Question now how do I integrate the 2 together on one www server. What 
>> happens now is they overwrite the same pages. So sometimes I see the 
>> barometric graphs and the next time the graphs from the sdr equipment. Any 
>> suggestions ?
>>
>> Thanks,
>> Martin
>>
>> -- 
>> 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/zL6dnD7el6k/unsubscribe.
>> To unsubscribe from this group and all its topics, 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] Can't start weewx automatically in Ubuntu 16.04

2016-11-08 Thread Thomas Keffer
Well, that's an interesting one. For some reason, the process is receiving
a signal TERM.

Please substitute your version of weewx/engine.py with this one. It's been
instrumented to log a stack trace when the process receives a TERM signal.
Hopefully, that will shed some light on where it is coming from.

Run with debug=1.

-tk

On Tue, Nov 8, 2016 at 3:33 AM, Daniel Jönsson <
daniel.jonsson.andr...@gmail.com> wrote:

> Hi,
>
> Last week I upgraded my Ubuntu on my server from 14.04 to 16.04. And after
> the upgrade I can't start weewx on boot any more.
>
> I have tried both whit upstart script and systemd.
> I've tried waiting after the boot is totatally completed and then "sudo
> /etc/init.d/weewx start" or "*sudo systemctl start weewx.service*"
> With the following exec: "*/usr/bin/weewxd --daemon
> --pidfile=/var/run/weewx.pid /etc/weewx/weewx.conf"*
> And the user is set to root in both init.d and systemd
>
> But the result is the same:
>
> Nov  4 22:08:04 server systemd[1]: Started weewx weather system.
> Nov  4 22:08:04 server weewx[10465]: engine: Initializing weewx version
> 3.6.1
> Nov  4 22:08:04 server weewx[10465]: engine: Using Python 2.7.12 (default,
> Jul  1 2016, 15:12:24) #012[GCC 5.4.0 20160609]
> Nov  4 22:08:04 server weewx[10465]: engine: Platform Linux-4.4.0-45-
> generic-x86_64-with-Ubuntu-16.04-xenial
> Nov  4 22:08:04 server weewx[10465]: engine: pid file is /var/run/weewx.
> pid
> Nov  4 22:08:04 server weewx[10470]: engine: Using configuration file /etc
> /weewx/weewx.conf
> Nov  4 22:08:04 server weewx[10470]: engine: Initializing engine
> Nov  4 22:08:04 server weewx[10470]: engine: Loading station type
> FineOffsetUSB (weewx.drivers.fousb)
> Nov  4 22:08:04 server weewx[10470]: engine: Received signal TERM.
> Nov  4 22:08:04 server weewx[10470]: engine: Terminating weewx version 3.6
> .1
>
> But if i ssh and tires to start the demon from command line it works
> perfect:
>
> Nov  8 12:08:14 server weewx[18210]: engine: Initializing weewx version
> 3.6.1
> Nov  8 12:08:14 server weewx[18210]: engine: Using Python 2.7.12 (default,
> Jul  1 2016, 15:12:24) #012[GCC 5.4.0 20160609]
> Nov  8 12:08:14 server weewx[18210]: engine: Platform Linux-4.4.0-45-
> generic-x86_64-with-Ubuntu-16.04-xenial
> Nov  8 12:08:14 server weewx[18210]: engine: pid file is /var/run/weewx.
> pid
> Nov  8 12:08:14 server weewx[18214]: engine: Using configuration file /etc
> /weewx/weewx.conf
> Nov  8 12:08:14 server weewx[18214]: engine: Loading station type
> FineOffsetUSB (weewx.drivers.fousb)
> Nov  8 12:08:17 server weewx[18214]: fousb: driver version is 1.9
> Nov  8 12:08:17 server weewx[18214]: fousb: polling mode is PERIODIC
> Nov  8 12:08:17 server weewx[18214]: fousb: polling interval is 60
> Nov  8 12:08:23 server weewx[18214]: fousb: found station on USB bus=
> device=
> Nov  8 12:08:23 server weewx[18214]: engine: StdConvert target unit is 0x1
> Nov  8 12:08:23 server weewx[18214]: wxcalculate: The following values
> will be calculated: barometer=prefer_hardware, windchill=prefer_hardware,
> dewpoint=prefer_hardware, appTemp=prefer_hardware, rainRate=
> prefer_hardware, windrun=prefer_hardware, heatindex=prefer_hardware,
> maxSolarRad=prefer_hardware, humidex=prefer_hardware, pressure=
> prefer_hardware, inDewpoint=prefer_hardware, ET=prefer_hardware, altimeter
> =prefer_hardware, cloudbase=prefer_hardware
> Nov  8 12:08:23 server weewx[18214]: wxcalculate: The following
> algorithms will be used for calculations: altimeter=aaNOAA, maxSolarRad=RS
> Nov  8 12:08:23 server weewx[18214]: engine: Archive will use data
> binding wx_binding
> Nov  8 12:08:23 server weewx[18214]: engine: Record generation will be
> attempted in 'hardware'
> Nov  8 12:08:24 server weewx[18214]: engine: Using archive interval of 300
> seconds (specified by hardware)
> Nov  8 12:08:34 server weewx[18214]: engine: Using binding 'wx_binding'
> to database 'weewx'
>
> Any one have any ideas what I am missing?
> Can it be something with systemd starting Python script? But then why is
> the demon starting and then exits after loading the driver?
>
> --
> 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.
#
#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 

[weewx-user] Re: Interceptor using bridge new Accurate firmware

2016-11-08 Thread Jerome Helbert
Finally got a chance to check out the driver (latest commit  2ad77b7 
),
 
had to make some changes to get it to run at all. 


   1. I see you had to change from filter to pcap_filter
   1. The weewx.conf template still references filter
  2. The standalone version of the program (__main__) does as well
   2. class SniffServer had references to itself in its init when 
   referencing SniffServer.SNAPLEN, SniffServer.PROMISCUOUS, 
   SniffServer.TIMEOUT_MSEnter code here...
   1. Changed these to self.SNAPLEN, self.PROMISCUOUS, self.TIMEOUT_MS
   3. The two logdbg statements in decode_ip_packet are causing problems... 
   some of the values arent strings.
  1. I had no solution... just commented them out for now.
   
With those changes it seems to be running great now

On Tuesday, November 8, 2016 at 7:07:54 AM UTC-6, Jerome Helbert wrote:
>
> also should mention that python-libpcap is dependent on the libpcap C 
> libraries.
>
> On Sunday, November 6, 2016 at 10:11:15 AM UTC-6, Jerome Helbert wrote:
>>
>> I looked over the commit, looks good. I will try to get a chance to pull 
>> it down and try it out later today.
>>
>> When I was first writing this stuff into the hackulink driver (and every 
>> time I would do a system reinstall) I found there a range of python pcap 
>> modules, and they had APIs that all varied. I would recommend adding the 
>> specific python module that I called out in my other thread to make 
>> installs easier.
>>
>> On Sunday, November 6, 2016 at 8:54:14 AM UTC-6, mwall wrote:
>>>
>>> On Saturday, November 5, 2016 at 10:24:08 PM UTC-4, Jerome Helbert wrote:

 I posted a modified version of the interceptor a few weeks ago, I used 
 the libpcap libraries to sniff the data stream directly (no need to run 
 tcpdump or ngrep or any of that external to the driver. 

>
>>
>>> jerome,
>>>
>>> i merged your pcap changes into the interceptor driver at commit 59f09a6 
>>> (driver version 0.15).  do you mind giving it a try?
>>>
>>> you will need a configuration something like this:
>>>
>>> [Interceptor]
>>> driver = user.interceptor
>>> device_type = acurite-bridge
>>> mode = sniff
>>> iface = eth0
>>> filter = src host X && dst port Y and greater 61
>>>
>>> plus a sensor map if you have anything beyond just a single 5n1 sensor 
>>> cluster.
>>>
>>> the implementation should be general enough to work with the os lw30x 
>>> and fine offset hardware too, but those will probably need some adjustments 
>>> to the pcap data parsing.
>>>
>>> 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.
#!/usr/bin/env python
# Copyright 2016 Matthew Wall, all rights reserved
"""
This driver runs a simple web server designed to receive data directly from an
internet weather reporting device such as the Acurite internet bridge, the
LaCrosse GW1000U internet bridge, the Oregon Scientific LW300 (LW301/LW302)
internet bridge, or the FineOffset HP1000 console or WH2600 internet bridge.

Thanks to rich of modern toil and george nincehelser for acurite parsing
  http://moderntoil.com/?p=794
  http://nincehelser.com/ipwx/

Thanks to Pat at obrienlabs.net for the fine offset parsing
  http://obrienlabs.net/redirecting-weather-station-data-from-observerip/

Thanks to sergei and waebi for the LW301/LW302 samples
  http://www.silent-gardens.com/blog/shark-hunt-lw301/

Thanks to Sam Roza for packet captures from the LW301

Thanks to skydvrz, mycal, kennkong for publishing their lacrosse work
  http://www.wxforum.net/index.php?topic=14299.0
  https://github.com/lowerpower/LaCrosse
  https://github.com/kennkong/Weather-ERF-Gateway-1000U

About the stations

Acurite Bridge

The Acurite bridge communicates with Acurite 5-in-1, 3-in-1, temperature, and
temperature/humidity sensors.  It receives signals from any number of sensors,
even though Acurite's web interface is limited to 3 devices (or 10 as of the
July 2016 firmware update).

By default, the bridge transmits data to www.acu-link.com.  Acurite requires
registration of the bridge's MAC address in order to use acu-link.com.
However, the bridge will function even if it is not registered, as long as it
receives the proper response.

The bridge sends data as soon as it receives an observation from the sensors.

Chaney did a firmware update to the bridge in July 2016.  This update made the
bridge emit data using the weather underground protocol instead of the
Chaney protocol.

Observer

Manufactured by Fine Offset as the WH2600, HP1000, and HP1003.

WH2600: bridge (wifi), cluster, THP
HP1000: console (wifi), cluster, THP
HP1003: console (no wifi), cluster, THP

Sold by Ambient as 

Re: [weewx-user] weewx 2 different drivers

2016-11-08 Thread martin swanepoel
Hi Andrew,

Here is the database part:

[DataBindings]

[[wx_binding]]
# The database must match one of the sections in [Databases].
# This is likely to be the only option you would want to change.
# database = archive_sqlite
database = archive_mysql
# The name of the table within the database
table_name = archive
# The manager handles aggregation of data for historical summaries
manager = weewx.wxmanager.WXDaySummaryManager
# The schema defines the structure of the database.
# It is *only* used when the database is created.
schema = schemas.wview.schema
[[forecast_binding]]
database = forecast_sqlite

[[bmp_binding]]
database = bmp_mysql
table_name = archive
manager = weewx.wxmanager.WXDaySummaryManager
schema = schemas.wview.schema
[[bmp_fore_binding]]
database = bmp_fore_mysql

##

#   This section defines various databases.

[Databases]

# A SQLite database is simply a single file
[[archive_sqlite]]
database_type = SQLite
database_name = weewx.sdb

# MySQL
[[archive_mysql]]
database_type = MySQL
database_name = weewx
[[forecast_sqlite]]
database_name = forecast.sdb
database_type = SQLite

[[ bmp_mysql]]
database_type = MySQL
database_name = weewxbmp
[[bmp_fore_mysql]]
database_name = forecastbmp
database_type = MySQL

##

This is the only one configured with the reporting service.

>From your reply I assume I have to make changes to (skin.conf and the
templates) ?

Thanks,
Martin


On Mon, Nov 7, 2016 at 2:28 PM, martin swanepoel <
marthinus.swanep...@gmail.com> wrote:

> Running 2 instances of weewx. 1 is the sdr driver but this station don't
> have a pressure sensor. 2 Hook up a bmp085 onto the raspberry for the
> second instance to get barometric data and inside temperature.
>
> Question now how do I integrate the 2 together on one www server. What
> happens now is they overwrite the same pages. So sometimes I see the
> barometric graphs and the next time the graphs from the sdr equipment. Any
> suggestions ?
>
> Thanks,
> Martin
>
> --
> 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/zL6dnD7el6k/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: Off topic - sql issue

2016-11-08 Thread Andrew Milner
Gary
If the data is in  a table called readings then I assume 
'table_name'.a refers to readings - but what does 'table_name'.b referring 
to??



On Tuesday, 8 November 2016 10:51:16 UTC+2, gjr80 wrote:

> Andrew,
>
> My SQL is somewhat rusty but what about something like:
>
> SELECT a.*
> FROM 'table_name' a
> LEFT JOIN 'table_name' b
> ON a.id=b.id AND a.datetime WHERE b.datetime IS NULL
>
> where the table is table_name. Not tested.
>
> 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.


[weewx-user] Re: Attempting to use a Pete Bros. Ultimeter2100 on a RPi3 with a serial to usb converter

2016-11-08 Thread John Maetta

Wow, thought I might be the only Peet user out here. Glad to see at least a 
couple more. 
Not using a USB/Serial converter, I opted for the serial port board that 
plugs onto the RPi.

I started out running Weewx on a Ultimeter 100, but the upgraded to the 
2100. The 2100 system has been up and running since July 2015 with no 
hiccups.

https://www.wunderground.com/personal-weather-station/dashboard?ID=KCALOMPO31

On Thursday, October 27, 2016 at 6:15:45 PM UTC-7, Ralph Underwood wrote:
>
> I could use some hints on what I need to modify to get the Ultimter to 
> talk to WeeWx. 
>
> I have a serial to usb converter as the Rpi does not have a serial port 
> and I somehow missed that the Ultimeter was not USB when I ordered it. 
>
> I tried to use this in my weewx.conf :
>
>
>
> ##
>
> [Ultimeter]
> # This section is for the PeetBros Ultimeter series of weather 
> stations.
>
> # Serial port such as /dev/ttyS0, /dev/ttyUSB0, or /dev/cuaU0
> port = /dev/ttyUSB0
>
> # The station model, e.g., Ultimeter 2000, Ultimeter 100
> model = Ultimeter
>
> # The driver to use:
> driver = weewx.drivers.ultimeter
>
>
> ##
>
> part of the tail :
>
> Oct 27 17:24:15 raspberrypi weewx[6672]: engine: Platform 
> Linux-4.4.21-v7+-armv7l-with-debian-8.0
> Oct 27 17:24:15 raspberrypi weewx[6672]: engine: Using configuration file 
> /home/weewx/weewx.conf
> Oct 27 17:24:15 raspberrypi weewx[6672]: engine: Initializing engine
> Oct 27 17:24:15 raspberrypi weewx[6672]: engine: Loading station type 
> Ultimeter (weewx.drivers.ultimeter)
> Oct 27 17:24:15 raspberrypi weewx[6672]: ultimeter: driver version is 0.16
> Oct 27 17:24:15 raspberrypi weewx[6672]: ultimeter: using serial port 
> /dev/ttyUSB0
> Oct 27 17:24:15 raspberrypi weewx[6672]: ultimeter: open serial port 
> /dev/ttyUSB0
> Oct 27 17:24:15 raspberrypi weewx[6672]: import of driver failed: could 
> not open port /dev/ttyUSB0: [Errno 2] No such file or directory: 
> '/dev/ttyUSB0' ()
> Oct 27 17:24:15 raspberrypi weewx[6672]: engine: Unable to load driver: 
> could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: 
> '/dev/ttyUSB0'
> Oct 27 17:24:15 raspberrypi weewx[6672]:   Exiting...
>
>
> 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: weewx 2 different drivers

2016-11-08 Thread martin swanepoel
Hi,

I went for option 2. I can see in the database that both databases is
updated with values but on the web-reports barometer and inside temperature
value still display as N/A. Only one instance have StdReport service
running and bonded to both databases.

Any suggestions where I can run a debug ?

Thanks,
Martin

On Mon, Nov 7, 2016 at 4:56 PM, mwall  wrote:

>
>
> On Monday, November 7, 2016 at 7:28:24 AM UTC-5, martin swanepoel wrote:
>>
>> Running 2 instances of weewx. 1 is the sdr driver but this station don't
>> have a pressure sensor. 2 Hook up a bmp085 onto the raspberry for the
>> second instance to get barometric data and inside temperature.
>>
>> Question now how do I integrate the 2 together on one www server. What
>> happens now is they overwrite the same pages. So sometimes I see the
>> barometric graphs and the next time the graphs from the sdr equipment. Any
>> suggestions ?
>>
>
> hi martin,
>
> here are three different approaches:
>
> option 1: make data collection from bmp085 a service instead of a driver.
> run a single instance of weewx with the sdr driver.  collect data from the
> bmp085 using a service that augments the loop and/or archive data.  display
> data in reports as usual.
>
> option 2: run two instances of weewx to collect data, but one instance
> knows about the other for reporting.  ensure that each instance is writing
> to its own database.  one instance of weewx will not generate any reports
> (remove the StdReport service from this instance).  the other instance uses
> the data_binding parameter in its reports to include data from the other
> instance (see the customization guide for details).
>
> option 3: run two instances of weewx to collect data, plus a third
> instance to do the reporting.  each data collection instance has its own
> database and HTML_ROOT.  the reporting instance has yet another HTML_ROOT
> and uses data_binding to get data from the two collector databases.
>
> although two weewx instances *can* share a single database, it is usually
> not a good idea to do so.  same goes for HTML_ROOT.
>
> there are many other possible permutations, but that should get you
> started.
>
> m
>
> --
> 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/zL6dnD7el6k/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: Interceptor using bridge new Accurate firmware

2016-11-08 Thread Jerome Helbert
also should mention that python-libpcap is dependent on the libpcap C 
libraries.

On Sunday, November 6, 2016 at 10:11:15 AM UTC-6, Jerome Helbert wrote:
>
> I looked over the commit, looks good. I will try to get a chance to pull 
> it down and try it out later today.
>
> When I was first writing this stuff into the hackulink driver (and every 
> time I would do a system reinstall) I found there a range of python pcap 
> modules, and they had APIs that all varied. I would recommend adding the 
> specific python module that I called out in my other thread to make 
> installs easier.
>
> On Sunday, November 6, 2016 at 8:54:14 AM UTC-6, mwall wrote:
>>
>> On Saturday, November 5, 2016 at 10:24:08 PM UTC-4, Jerome Helbert wrote:
>>>
>>> I posted a modified version of the interceptor a few weeks ago, I used 
>>> the libpcap libraries to sniff the data stream directly (no need to run 
>>> tcpdump or ngrep or any of that external to the driver. 
>>>

>
>> jerome,
>>
>> i merged your pcap changes into the interceptor driver at commit 59f09a6 
>> (driver version 0.15).  do you mind giving it a try?
>>
>> you will need a configuration something like this:
>>
>> [Interceptor]
>> driver = user.interceptor
>> device_type = acurite-bridge
>> mode = sniff
>> iface = eth0
>> filter = src host X && dst port Y and greater 61
>>
>> plus a sensor map if you have anything beyond just a single 5n1 sensor 
>> cluster.
>>
>> the implementation should be general enough to work with the os lw30x and 
>> fine offset hardware too, but those will probably need some adjustments to 
>> the pcap data parsing.
>>
>> 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.


Re: [weewx-user] Re: Install frustration

2016-11-08 Thread John Bennett
On 8 Nov 2016 21:48, "mwall"  wrote:
> On Tuesday, November 8, 2016 at 5:50:56 AM UTC-5, John Bennett wrote:
>>
>> Yet another frustration with 'stuff' in Linux...
>
>> Oh, and can anyone tell me what these errors are pointing at?
>
>
> john,

> the log snippet you posted shows that weewx is unable to communicate with
your weather station.  if you post more of the log we could help figure out
why.  please post from the first weewx log entries.
>
> what is your archive interval?
>
> are you using hardware record generation?
>
> the log will tell us all of this.
>
> it would also help to know which kind of fine offset hardware you are
using.
>
> btw, you could install directly from the suse rpm or tarball if you don't
want to bother with a virtual machine.

Thanks for the reply. May be a day or 2 before I get back to it. Will see
how i go! And this is just a 'Play' install before I put it on something
permanently.
Thanks, John.

-- 
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: Install frustration

2016-11-08 Thread mwall


On Tuesday, November 8, 2016 at 5:50:56 AM UTC-5, John Bennett wrote:
>
> Yet another frustration with 'stuff' in Linux...
> Have setup Debian 8.6.0 x64 in VirtualBox on Opensuse Leap42.1 (I would 
> like to say I reasonably know linux...), and tried to install Weewx, as I 
> had read a few things saying that it is probably more up-to-date, and 
> better supported than WView, which I have installed previously.
> So, vanilla Debian install, installed apache, then download Weewx 
> 3.6.1-1_all, and installed as per the instructions here: 
> http://www.weewx.com/docs/debian.htm
> I run weewxd as sudo, and it seems to be 'basically' working, but, where 
> IS everything?? (Particularly the html/web stuff) Normally I would expect 
> the web root to be at /var/www/html, as per 
> http://www.weewx.com/docs/usersguide.htm#Where_to_find_things, but there 
> is nothing there to do with weewx. Have searched the whole drive for a 
> index.html file vaguely related to weewx, and there is none.
> HELP.
> Oh, and can anyone tell me what these errors are pointing at?
>

john,

weewx does not install anything into /var/www/html.  however, it *does* put 
files and images in /var/www/html/weewx as soon as it has some data from 
the hardware.  that will not happen until after one archive interval, and 
the factory default archive interval on fine offset stations is 30 minutes.

see the 'where to find things' table in the user guide, or the 'layout' 
table at the bottom of the debian.htm guide itself.

the log snippet you posted shows that weewx is unable to communicate with 
your weather station.  if you post more of the log we could help figure out 
why.  please post from the first weewx log entries.

what is your archive interval?

are you using hardware record generation?

the log will tell us all of this.

it would also help to know which kind of fine offset hardware you are using.

btw, you could install directly from the suse rpm or tarball if you don't 
want to bother with a virtual machine.

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.


[weewx-user] Can't start weewx automatically in Ubuntu 16.04

2016-11-08 Thread Daniel Jönsson
Hi,

Last week I upgraded my Ubuntu on my server from 14.04 to 16.04. And after 
the upgrade I can't start weewx on boot any more.

I have tried both whit upstart script and systemd.
I've tried waiting after the boot is totatally completed and then "sudo 
/etc/init.d/weewx start" or "*sudo systemctl start weewx.service*"
With the following exec: "*/usr/bin/weewxd --daemon 
--pidfile=/var/run/weewx.pid /etc/weewx/weewx.conf"*
And the user is set to root in both init.d and systemd

But the result is the same:

Nov  4 22:08:04 server systemd[1]: Started weewx weather system.
Nov  4 22:08:04 server weewx[10465]: engine: Initializing weewx version 3.6.
1
Nov  4 22:08:04 server weewx[10465]: engine: Using Python 2.7.12 (default, 
Jul  1 2016, 15:12:24) #012[GCC 5.4.0 20160609]
Nov  4 22:08:04 server weewx[10465]: engine: Platform Linux-4.4.0-45-generic
-x86_64-with-Ubuntu-16.04-xenial
Nov  4 22:08:04 server weewx[10465]: engine: pid file is /var/run/weewx.pid
Nov  4 22:08:04 server weewx[10470]: engine: Using configuration file /etc/
weewx/weewx.conf
Nov  4 22:08:04 server weewx[10470]: engine: Initializing engine
Nov  4 22:08:04 server weewx[10470]: engine: Loading station type 
FineOffsetUSB (weewx.drivers.fousb)
Nov  4 22:08:04 server weewx[10470]: engine: Received signal TERM.
Nov  4 22:08:04 server weewx[10470]: engine: Terminating weewx version 3.6.1

But if i ssh and tires to start the demon from command line it works 
perfect:

Nov  8 12:08:14 server weewx[18210]: engine: Initializing weewx version 3.6.
1
Nov  8 12:08:14 server weewx[18210]: engine: Using Python 2.7.12 (default, 
Jul  1 2016, 15:12:24) #012[GCC 5.4.0 20160609]
Nov  8 12:08:14 server weewx[18210]: engine: Platform Linux-4.4.0-45-generic
-x86_64-with-Ubuntu-16.04-xenial
Nov  8 12:08:14 server weewx[18210]: engine: pid file is /var/run/weewx.pid
Nov  8 12:08:14 server weewx[18214]: engine: Using configuration file /etc/
weewx/weewx.conf
Nov  8 12:08:14 server weewx[18214]: engine: Loading station type 
FineOffsetUSB (weewx.drivers.fousb)
Nov  8 12:08:17 server weewx[18214]: fousb: driver version is 1.9
Nov  8 12:08:17 server weewx[18214]: fousb: polling mode is PERIODIC
Nov  8 12:08:17 server weewx[18214]: fousb: polling interval is 60
Nov  8 12:08:23 server weewx[18214]: fousb: found station on USB bus= device
=
Nov  8 12:08:23 server weewx[18214]: engine: StdConvert target unit is 0x1
Nov  8 12:08:23 server weewx[18214]: wxcalculate: The following values will 
be calculated: barometer=prefer_hardware, windchill=prefer_hardware, 
dewpoint=prefer_hardware, appTemp=prefer_hardware, rainRate=prefer_hardware, 
windrun=prefer_hardware, heatindex=prefer_hardware, maxSolarRad=
prefer_hardware, humidex=prefer_hardware, pressure=prefer_hardware, 
inDewpoint=prefer_hardware, ET=prefer_hardware, altimeter=prefer_hardware, 
cloudbase=prefer_hardware
Nov  8 12:08:23 server weewx[18214]: wxcalculate: The following algorithms 
will be used for calculations: altimeter=aaNOAA, maxSolarRad=RS
Nov  8 12:08:23 server weewx[18214]: engine: Archive will use data binding 
wx_binding
Nov  8 12:08:23 server weewx[18214]: engine: Record generation will be 
attempted in 'hardware'
Nov  8 12:08:24 server weewx[18214]: engine: Using archive interval of 300 
seconds (specified by hardware)
Nov  8 12:08:34 server weewx[18214]: engine: Using binding 'wx_binding' to 
database 'weewx'

Any one have any ideas what I am missing?
Can it be something with systemd starting Python script? But then why is 
the demon starting and then exits after loading the driver?

-- 
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] Install frustration

2016-11-08 Thread John Bennett
Yet another frustration with 'stuff' in Linux...
Have setup Debian 8.6.0 x64 in VirtualBox on Opensuse Leap42.1 (I would 
like to say I reasonably know linux...), and tried to install Weewx, as I 
had read a few things saying that it is probably more up-to-date, and 
better supported than WView, which I have installed previously.
So, vanilla Debian install, installed apache, then download Weewx 
3.6.1-1_all, and installed as per the instructions 
here: http://www.weewx.com/docs/debian.htm
I run weewxd as sudo, and it seems to be 'basically' working, but, where IS 
everything?? (Particularly the html/web stuff) Normally I would expect the 
web root to be at /var/www/html, as 
per http://www.weewx.com/docs/usersguide.htm#Where_to_find_things, but 
there is nothing there to do with weewx. Have searched the whole drive for 
a index.html file vaguely related to weewx, and there is none.
HELP.
Oh, and can anyone tell me what these errors are pointing at?

Nov  8 20:27:01 debian weewx[3026]: wxcalculate: The following values will 
be calculated: barometer=prefer_hardware, windchill=prefer_hardware, 
dewpoint=prefer_hardware, appTemp=prefer_hardware, rainRate=prefer_hardware, 
windrun=prefer_hardware, heatindex=prefer_hardware, maxSolarRad=
prefer_hardware, humidex=prefer_hardware, pressure=prefer_hardware, 
inDewpoint=prefer_hardware, ET=prefer_hardware, altimeter=prefer_hardware, 
cloudbase=prefer_hardware
Nov  8 20:27:01 debian weewx[3026]: wxcalculate: The following algorithms 
will be used for calculations: altimeter=aaNOAA, maxSolarRad=RS
Nov  8 20:27:01 debian weewx[3026]: engine: Archive will use data binding 
wx_binding
Nov  8 20:27:01 debian weewx[3026]: engine: Record generation will be 
attempted in 'software'
Nov  8 20:27:16 debian weewx[3026]: fousb: get archive interval failed 
attempt 1 of 3: could not detach kernel driver from interface 0: No data 
available
Nov  8 20:27:18 debian PackageKit: refresh-cache transaction /82_aeededbc 
from uid 1000 finished with failed after 21074ms
Nov  8 20:27:31 debian weewx[3026]: fousb: get archive interval failed 
attempt 2 of 3: could not detach kernel driver from interface 0: No data 
available
Nov  8 20:27:46 debian weewx[3026]: fousb: get archive interval failed 
attempt 3 of 3: could not detach kernel driver from interface 0: No data 
available
Nov  8 20:27:46 debian weewx[3026]: engine: Caught WeeWxIOError: Unable to 
read archive interval after 3 tries
Nov  8 20:27:46 debian weewx[3026]:   Waiting 60 seconds then 
retrying...

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.