Re: [weewx-user] Re: No data from station

2016-11-06 Thread Alberto Sánchez

I am noob with Raspberry and weewx, so I have done a clean installation of 
raspbian (Jessie) and Weewx 3.6.1 with the same result:

pi@raspberrypi:~ $ sudo /etc/init.d/weewx status -l
● weewx.service - LSB: weewx weather system
   Loaded: loaded (/etc/init.d/weewx)
   Active: active (running) since sáb 2016-11-05 13:52:08 CET; 5min ago
  Process: 426 ExecStart=/etc/init.d/weewx start (code=exited, 
status=0/SUCCESS)
   CGroup: /system.slice/weewx.service
   └─958 python /usr/bin/weewxd --daemon 
--pidfile=/var/run/weewx.pid /etc/weewx/weewx.conf

nov 05 13:57:13 raspberrypi weewx[958]: restx: PWSweather: Posting not 
enabled.
nov 05 13:57:13 raspberrypi weewx[958]: restx: CWOP: Posting not enabled.
nov 05 13:57:13 raspberrypi weewx[958]: restx: WOW: Posting not enabled.
nov 05 13:57:13 raspberrypi weewx[958]: restx: AWEKAS: Posting not enabled.
nov 05 13:57:13 raspberrypi weewx[958]: engine: Starting up weewx version 
3.6.1
nov 05 13:57:13 raspberrypi weewx[958]: wmr300: reading records since 
*** N/A *** (N/A   )
nov 05 13:57:13 raspberrypi weewx[958]: wmr300: read: failed attempt 1 of 
5: could not detach kernel driver from interface 0: No hay datos disponibles
nov 05 13:57:16 raspberrypi weewx[958]: wmr300: read: failed attempt 2 of 
5: could not detach kernel driver from interface 0: No hay datos disponibles
nov 05 13:57:19 raspberrypi weewx[958]: wmr300: read: failed attempt 3 of 
5: could not detach kernel driver from interface 0: No hay datos disponibles
nov 05 13:57:22 raspberrypi weewx[958]: wmr300: read: failed attempt 4 of 
5: could not detach kernel driver from interface 0: No hay datos disponibles
pi@raspberrypi:~ $ sudo /etc/init.d/weewx status
● weewx.service - LSB: weewx weather system
   Loaded: loaded (/etc/init.d/weewx)
   Active: active (exited) since sáb 2016-11-05 13:52:08 CET; 19h ago
  Process: 426 ExecStart=/etc/init.d/weewx start (code=exited, 
status=0/SUCCESS)

nov 05 19:27:17 raspberrypi weewx[958]: wmr300: read failed: max retries 
(5) exceeded
nov 05 19:27:17 raspberrypi weewx[958]: engine: Caught WeeWxIOError: read 
failed: max retries (5) exceeded
nov 05 19:27:17 raspberrypi weewx[958]:   Waiting 60 seconds then 
retrying...
nov 05 19:28:17 raspberrypi weewx[958]: engine: retrying...
nov 05 19:28:17 raspberrypi weewx[958]: engine: Using configuration file 
/etc/weewx/weewx.conf
nov 05 19:28:17 raspberrypi weewx[958]: engine: Loading station type WMR300 
(weewx.drivers.wmr300)
nov 05 19:28:17 raspberrypi weewx[958]: wmr300: driver version is 0.13
nov 05 19:28:17 raspberrypi weewx[958]: import of driver failed: could not 
reset: No existe el dispositivo ()
nov 05 19:28:17 raspberrypi weewx[958]: engine: Unable to load driver: 
could not reset: No existe el dispositivo
nov 05 19:28:17 raspberrypi weewx[958]:   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.


[weewx-user] Re: Interceptor Driver - rainin dailyrain - Acurite 5 in 1

2016-11-06 Thread Brad Tucker
Hello Matt!

I think I have some good news. After I did the clean install tcpdump worked 
exactly as it had before. However this time I tried to give tcpflow a shot. 
It has a great output and then once I run it through your perl script it 
looks really pretty and all on one line. It will run for a good 10 min then 
it crashes. I don't believe the crash is because of bad characters in the 
tcpdump this time though. Its as clean as Ive ever seen! This looks the 
most promising. Please take a look and let me know what you think.

Thanks,
Brad


*sudo tcpflow -C -s tcp dst port 80*
GET 
/weatherstation/updateweatherstation?dateutc=now=updateraw=1
=24C86E06B15C=5N1x31=2179
=0=180
=0.00=0.00=93=51.5=49
=29.30=normal=3
 HTTP/1.1
Host:
hubapi.myacurite.com
User-Agent: Hub/224

Connection: close


GET 
/weatherstation/updateweatherstation.php?ID=KCATHOUS110==now=updateraw=1
=36
=24C86E06B15C=5N1x31=2179
=0=180
=0.00=0.00=93=51.5=49
=29.30=normal=3
 HTTP/1.1
Host:
rtupdate.wunderground.com

Connection: close


GET 
/weatherstation/updateweatherstation?dateutc=now=updateraw=1
=24C86E06B15C=5N1x38=2179
=0=93
=51.5
=29.30=normal=3
 HTTP/1.1
Host:
hubapi.myacurite.com

User-Agent: Hub/224

Connection: close


GET 
/weatherstation/updateweatherstation?dateutc=now=updateraw=1
=24C86E06B15C=tower=00012694
=51=70.6
=29.30=normal=4
 HTTP/1.1
Host:
hubapi.myacurite.com
User-Agent: Hub/224

Connection: close


GET 
/weatherstation/updateweatherstation?dateutc=now=updateraw=1
=24C86E06B15C=tower=8384
=34=81.4
=29.30=normal=2
 HTTP/1.1
Host:
hubapi.myacurite.com
User-Agent: Hub/224

Connection: close


*sudo tcpflow -C -s tcp dst port 80 | ./combine-lines.pl*
tcpflow: listening on eth0

dateutc=now=updateraw=1=24C86E06B15C=tower=8384=34=81.4=29.30=normal=2

dateutc=now=updateraw=1=24C86E06B15C=tower=00012694=51=70.6=29.30=normal=4

dateutc=now=updateraw=1=24C86E06B15C=5N1x31=2179=0=90=0.00=0.00=93=51.5=49=29.30=normal=3

ID=KCATHOUS110=dateutc=now=updateraw=1=36=24C86E06B15C=5N1x31=2179=0=90=0.00=0.00=93=51.5=49=29.30=normal=3

dateutc=now=updateraw=1=24C86E06B15C=5N1x38=2179=0=93=51.4=29.30=normal=3



*syslog:*
Nov  6 00:00:35 weather weewx[19425]: interceptor: ServerThread: POST: 
dateutc=now=updateraw=1=24C86E06B15C=5N1x31=2179=0=180=0.00=0.00=95=51.4=50=29.30=normal=3
Nov  6 00:00:35 weather weewx[19425]: interceptor: MainThread: raw data: 
dateutc=now=updateraw=1=24C86E06B15C=5N1x31=2179=0=180=0.00=0.00=95=51.4=50=29.30=normal=3
Nov  6 00:00:35 weather weewx[19425]: interceptor: MainThread: ignored 
parameter realtime=1
Nov  6 00:00:35 weather weewx[19425]: interceptor: MainThread: ignored 
parameter dewptf=50
Nov  6 00:00:35 weather weewx[19425]: interceptor: MainThread: ignored 
parameter rainin=0.00
Nov  6 00:00:35 weather weewx[19425]: interceptor: MainThread: ignored 
parameter action=updateraw
Nov  6 00:00:35 weather weewx[19425]: interceptor: MainThread: raw packet: 
{'sensor_type.2179.24C86E06B15C': '5N1x31', 
'sensor_id.2179.24C86E06B15C': '2179', 
'winddir.2179.24C86E06B15C': 180.0, 
'temperature.2179.24C86E06B15C': 51.4, 'rssi.2179.24C86E06B15C': 
0.75, 'usUnits.2179.24C86E06B15C': 1, 'battery.2179.24C86E06B15C': 
0, 'rainfall.2179.24C86E06B15C': 0.0, 'dateTime.2179.24C86E06B15C': 
1478415635, 'bridge_id.2179.24C86E06B15C': '24C86E06B15C', 
'barometer.2179.24C86E06B15C': 29.3, 'dateTime': 1478415635, 
'windspeed.2179.24C86E06B15C': 0.0, 'humidity.2179.24C86E06B15C': 
95.0, 'usUnits': 1}
Nov  6 00:00:35 weather weewx[19425]: interceptor: MainThread: mapped 
packet: {'barometer': 29.3, 'outHumidity': 95.0, 'rain': 0.0, 'dateTime': 
1478415635, 'windDir': 180.0, 'outTemp': 51.4, 'windSpeed': 0.0, 'usUnits': 
1}
Nov  6 00:00:35 weather weewx[19425]: interceptor: ServerThread: POST: 
ID=KCATHOUS110==now=updateraw=1=36=24C86E06B15C=5N1x31=2179=0=180=0.00=0.00=95=51.4=50=29.30=normal=3
Nov  6 00:00:35 weather weewx[19425]: interceptor: MainThread: raw data: 
ID=KCATHOUS110==now=updateraw=1=36=24C86E06B15C=5N1x31=2179=0=180=0.00=0.00=95=51.4=50=29.30=normal=3
Nov  6 00:00:35 weather weewx[19425]: interceptor: MainThread: ignored 
parameter realtime=1
Nov  6 00:00:35 weather weewx[19425]: interceptor: MainThread: ignored 
parameter dewptf=50
Nov  6 00:00:35 weather weewx[19425]: interceptor: MainThread: ignored 
parameter rainin=0.00
Nov  6 00:00:35 weather weewx[19425]: interceptor: MainThread: ignored 
parameter rtfreq=36
Nov  6 00:00:35 weather weewx[19425]: interceptor: MainThread: ignored 
parameter action=updateraw
Nov  6 00:00:35 weather weewx[19425]: interceptor: MainThread: ignored 
parameter PASSWORD=
Nov  6 00:00:35 weather weewx[19425]: interceptor: MainThread: ignored 
parameter ID=KCATHOUS110
Nov  6 00:00:35 weather weewx[19425]: interceptor: MainThread: raw packet: 
{'sensor_type.2179.24C86E06B15C': '5N1x31', 
'sensor_id.2179.24C86E06B15C': '2179', 

[weewx-user] Re: non ascii code in template for cheetah generator erorr

2016-11-06 Thread Andrew Milner
If the html you are including is complete try
#include raw "/dir/weather_service.html"



On Sunday, 6 November 2016 11:36:31 UTC+2, Eelco F wrote:

> I tried your suggestion, but it still yields the same error.
>
> To be more precise: I have a template which include a general header for 
> my webpages. Further down on the page I want to include a simple html page 
> from our weatherservice.
> I could do this with an iframe, but then I get problems with the css. So I 
> just wanted the template to include the html.
>
> The template contains the line:
>
> #include "/dir/weather_service.html"
> weather_service.html is in UTF-8 encoding.
>
> the error: File "/usr/lib/python2.7/dist-packages/Cheetah/Compiler.py", 
> line 1579, in __init__
> Nov  6 10:30:16 weerstation weewx[1367]:   source = unicode(source)
> Nov  6 10:30:16 weerstation weewx[1367]:   UnicodeDecodeError: 'ascii' 
> codec can't decode byte 0xc3 in position 751: ordinal not in range(128)
>
>
> Op zondag 6 november 2016 00:17:19 UTC+1 schreef gjr80:
>>
>> Hi,
>>
>> So have you explicity set or tried changing the encoding parameter for 
>> the report concerned in skin.conf? eg
>>
>> [[[testreport]]]
>> encoding = html_entities
>> template = testreport.tmpl
>>
>> You can read about the encoding parameter in here 
>>  in the weewx 
>> Customization Guide 
>>
>> Gary
>>
>> On Sunday, 6 November 2016 08:10:22 UTC+10, Eelco F wrote:
>>>
>>> Hi,
>>>
>>> I'm trying to include some html from an external source in one of my 
>>> templates. However these html contains some non-ascii symbols like the 
>>> degree symbol or ë, á ï for instance.
>>> These html files are encoded in UTF-8.
>>>
>>> The cheetah generator doesn't accept them:
>>>
>>> Traceback (most recent call last):
>>> Nov  5 23:05:17 weerstation weewx[1367]: File 
>>> "/usr/share/weewx/weewx/cheetahgenerator.py", line 315, in generate
>>> Nov  5 23:05:17 weerstation weewx[1367]:   print >> _file, text
>>> Nov  5 23:05:17 weerstation weewx[1367]: File 
>>> "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1005, in 
>>> __str__
>>> Nov  5 23:05:17 weerstation weewx[1367]:   rc = getattr(self, 
>>> mainMethName)()
>>> Nov  5 23:05:17 weerstation weewx[1367]: File 
>>> "cheetah__etc_weewx_skins_Aangepast_beoordeling_html_tmpl_1478382317_27_88088.py",
>>>  
>>> line 90, in respond
>>> Nov  5 23:05:17 weerstation weewx[1367]: File 
>>> "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1597, in 
>>> _handleCheetahInclude
>>> Nov  5 23:05:17 weerstation weewx[1367]:   nestedTemplateClass = 
>>> compiler.compile(source=source, file=file)
>>> Nov  5 23:05:17 weerstation weewx[1367]: File 
>>> "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 740, in compile
>>> Nov  5 23:05:17 weerstation weewx[1367]:  
>>>  settings=(compilerSettings or {}))
>>> Nov  5 23:05:17 weerstation weewx[1367]: File 
>>> "/usr/lib/python2.7/dist-packages/Cheetah/Compiler.py", line 1579, in 
>>> __init__
>>> Nov  5 23:05:17 weerstation weewx[1367]:   source = 
>>> unicode(source)
>>> Nov  5 23:05:17 weerstation weewx[1367]:   UnicodeDecodeError: 
>>> 'ascii' codec can't decode byte 0xc3 in position 720: ordinal not in 
>>> range(128)
>>>
>>> Apparently only the 128 ascii codes are acceptable? So no extended ascii 
>>> or UTF-8? Is there a way to get this right?
>>>
>>> I could use sed to replace these characters, but I would rather leave 
>>> them in place.
>>>
>>

-- 
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 Driver - rainin dailyrain - Acurite 5 in 1

2016-11-06 Thread mwall


On Sunday, November 6, 2016 at 2:32:46 AM UTC-5, Brad Tucker wrote:
>
> Decided to turn off the FTP skin and see if it changed anything. I still 
> got the crash and here is the syslog:
>
>
tcpdump is picking up the traffic from your web server/browser and the 
weewx web pages.

you need to adjust the tcpdump filter so that it only captures traffic from 
the acurite bridge

try adding a src clause something like this:

tcpdump ... src X.X.X.X and dst port 80

where X.X.X.X is the address of the bridge

or just listen on the eth1 interface (the one to which the bridge is 
connected) instead of the eth0 interface (the one to which the rest of the 
network is connected)

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: Interceptor using bridge new Accurate firmware

2016-11-06 Thread mwall
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] Output current weather conditions to xml

2016-11-06 Thread Thomas Keffer
There are lots of ways to accomplish this.

1. You could modify the csv service extension
 to save output in XML (instead of
csv).

2. You could modify the StdPrint service to output XML to a file instead of
printing to stdout.

-tk

On Sun, Nov 6, 2016 at 3:38 AM, Hiljo Lodewijk 
wrote:

> Hello everyone,
>
> I'm pretty new into weewx, but for what i see, it is an awsome piece of
> software! Thnx for the development so far :)
>
> But for now i'm having a small issue:
> What i see is that when i run weewx from te command line, the current
> received weather conditions are printed to STDOUT. This happens multiple
> times per minute. But when i look at the archive database, the conditions
> are only inserted every 5 minutes. I'd like to output the current
> conditions to an XML file, so i can get the most recent conditions (and not
> those 5 minutes old).
> But where to start? How can i get Weewx to not output the conditions to
> STDOUT but to an XML file?
>
> Thnx for a little help!
>
> --
> 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] Re: No data from station

2016-11-06 Thread mwall
On Sunday, November 6, 2016 at 8:58:36 AM UTC-5, Thomas O wrote:
>
> I see the same issue with 0.15rc1 from master and WMR300.
>
> Any data you need to further debug ; I am trying to diff 0.9 and 0.15rc1 
> but I didn't find anything obvious yet.
>
> Can i provide some more traces ?
>

thomas,

please post your usb configuration 'dpkg -l | grep usb'

also, please post the exception stack when you run 0.15rc1

this is rather perplexing. i thought the localization that alberto (es) and 
roland (de) are using might be causing the problem, but i'm not sure.  the 
driver checks for 'No data available' and 'No error' messages from libusb.  
(i have not yet figured out a way to check for an error code that works 
across different libusb versions)

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: Intercept Driver - delta_rain bug

2016-11-06 Thread mwall
On Sunday, November 6, 2016 at 1:17:42 PM UTC-5, Jerome Helbert wrote:
>
> is option b actually something that some of this hardware will produce?
>

i've seen it happen with acurite hardware, but that was with the acurite 
driver and the usb interface.  never saw it with the acurite bridge and the 
chaney data formats.  no experience with the acurite bridge and wu data 
formats. 

-- 
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: Intercept Driver - delta_rain bug

2016-11-06 Thread mwall
On Sunday, November 6, 2016 at 1:24:02 PM UTC-5, Jerome Helbert wrote:
>
> When I first ran into this issue, I ended up actively watching the packets 
> coming from the bridge during a transition and they reset to 0 (watching 
> rainin, but I would assume dayrainin would behave the same.)
>

dayrainin should be more reliable than rainin, since rainin is a sliding 
one-hour window

the interceptor uses yearlyrainin for the observer hardware

for anyone out there designing hardware/firmware: please report absolute 
counter values, not values relative to some point in time.  reporting 
deltas is error-prone when there can be gaps in communication.

and don't make the sensors report a metric 10 different ways.  a single, 
reliable rain counter is much better than stuffing a packet full of rainin, 
dayrainin, monthrainin, yearlyrainin

(power monitors have the same issue)

-- 
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 Driver - rainin dailyrain - Acurite 5 in 1

2016-11-06 Thread Brad Tucker
Great. I was thinking to add it to the initd startup but I like the idea of 
adding if it to the weewx initd instead. Thanks for the thoughts.

Thanks,
Brad

-- 
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 Driver - rainin dailyrain - Acurite 5 in 1

2016-11-06 Thread Brad Tucker
Hello Matt,

So far so good!!! Tcpflow has been running for over an hour. Data seems to 
be making its way. I'll go up on the roof and poor in some water shortly 
and see if it logs the values.

Here is my working command:
sudo tcpflow -C -i eth1 -s tcp dst port 80 | ./combine-lines.pl | xargs -n 1 
curl http://192.168.1.19: -s -d

Thanks again for all the hard work on this. I would have given up days ago 
w/o you :)

If you'd like me to test the pcap code you implemented last night Im happy 
to do so once I test the rain sensor.

Thanks
-Brad


On Sunday, November 6, 2016 at 4:47:09 AM UTC-8, mwall wrote:
>
>
>
> On Sunday, November 6, 2016 at 2:32:46 AM UTC-5, Brad Tucker wrote:
>>
>> Decided to turn off the FTP skin and see if it changed anything. I still 
>> got the crash and here is the syslog:
>>
>>
> tcpdump is picking up the traffic from your web server/browser and the 
> weewx web pages.
>
> you need to adjust the tcpdump filter so that it only captures traffic 
> from the acurite bridge
>
> try adding a src clause something like this:
>
> tcpdump ... src X.X.X.X and dst port 80
>
> where X.X.X.X is the address of the bridge
>
> or just listen on the eth1 interface (the one to which the bridge is 
> connected) instead of the eth0 interface (the one to which the rest of the 
> network is connected)
>
> 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: Intercept Driver - delta_rain bug

2016-11-06 Thread Jerome Helbert
is option b actually something that some of this hardware will produce?

On Sunday, November 6, 2016 at 12:16:00 PM UTC-6, mwall wrote:
>
> On Sunday, November 6, 2016 at 12:12:54 PM UTC-5, Jerome Helbert wrote:
>>
>> Matt,
>> How would you prefer bugs be written up? Just posts here, or would it 
>> work better to create an issue in github?
>>
>
> here is fine.  if the solutions get complicated enough to reference the 
> code we can move the discussion to github.
>
> option a (current): report a delta of None when wraparound is detected.  
> this is guaranteed to miss one rain report whenever the counter wraps.
>
> option b (proposed): report a delta equal to the new counter value when 
> wraparound is detected.  this can result in wild values for rain in the 
> database if there are spurious rain counter readings, i.e., when the 
> counter is less than the previous value but not actually a count since zero.
>
> i have implemented option b at commit 81765e5.  we'll see what kind of 
> spurious readings we get with this combination of hardware...
>
> 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: Interceptor Driver - rainin dailyrain - Acurite 5 in 1

2016-11-06 Thread mwall
On Sunday, November 6, 2016 at 12:14:08 PM UTC-5, Brad Tucker wrote:

And here is the celebration dance... Hope Im not doing this too early but I 
> have a couple hours of tcpflow going and I see data in both my database and 
> on my skin. PIZZA PARTY!
>

thank *you* for being patient.  nice work!
 

> One last question... How would you recommend implementing the tcpflow 
> command so it runs with the service. Currently Im running it manually from 
> the command line with an "&" to send it to the background but Id like to 
> automate this.
>

put the one-liner in a shell script, say /usr/local/bin/wxcapture.sh:

#!/bin/sh
sudo tcpflow -C -i eth1 -s tcp dst port 80 | ./combine-lines.pl | xargs -n 1 
curl http://192.168.1.19: -s -d

then make the script executable:

sudo chmod 755 /usr/local/bin/wxcapture.sh

then invoke capture.sh in your init system somewhere.  one approach is to 
invoke it in /etc/rc.local.  another approach is to invoke it in the start 
section of the weewx init script.  another approach is to create a systemd 
unit file for it.

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: Interceptor Driver - rainin dailyrain - Acurite 5 in 1

2016-11-06 Thread mwall
btw, you'll need the full path to combine-lines.pl, so you might want to 
put combine-lines.pl in /usr/local/bin and invoke it like this:

#!/bin/sh
tcpflow -C -i eth1 -s tcp dst port 80 | /usr/local/bin/combine-lines.pl | 
xargs -n 1 curl http://192.168.1.19: -s -d

-- 
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 Driver - rainin dailyrain - Acurite 5 in 1

2016-11-06 Thread mwall
btw, you'll need the full path to combine-lines.pl, so you might want to 
put combine-lines.pl in /usr/local/bin and invoke it like this:

#!/bin/sh
sudo tcpflow -C -i eth1 -s tcp dst port 80 | /usr/local/bin/combine-lines.pl 
| xargs -n 1 curl http://192.168.1.19: -s -d

-- 
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: Intercept Driver - delta_rain bug

2016-11-06 Thread mwall
On Sunday, November 6, 2016 at 12:12:54 PM UTC-5, Jerome Helbert wrote:
>
> Matt,
> How would you prefer bugs be written up? Just posts here, or would it work 
> better to create an issue in github?
>

here is fine.  if the solutions get complicated enough to reference the 
code we can move the discussion to github.

option a (current): report a delta of None when wraparound is detected.  
this is guaranteed to miss one rain report whenever the counter wraps.

option b (proposed): report a delta equal to the new counter value when 
wraparound is detected.  this can result in wild values for rain in the 
database if there are spurious rain counter readings, i.e., when the 
counter is less than the previous value but not actually a count since zero.

i have implemented option b at commit 81765e5.  we'll see what kind of 
spurious readings we get with this combination of hardware...

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] Intercept Driver - delta_rain bug

2016-11-06 Thread Jerome Helbert
Matt,
How would you prefer bugs be written up? Just posts here, or would it work 
better to create an issue in github?

I noticed the wrap-around portion of _delta_rain() could lead to lost data. 
When a wrap-around occurs (new_rain < last_rain), you return None. But it's 
entirely possible that we could've actually received rain in that interval, 
and we will just be throwing it away... ie at 11:59pm it is raining and 
we've received something like .15" of rain. We happen to be experiencing a 
downpour at that time, and the sensor has logged another .04" of rain. 
Since we go into a new day, the bridges internal counter resets to 0, and 
then reports .03" on the next packet. The interceptor driver will throw the 
.03" away, but then resume operating normally.

I would suggest that when we detect a wrap-around, we substitute 0.0 in 
place of last_rain, and report the delta based on that.

-- 
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: Unable to get weewx going on an ubuntu 16.04 box

2016-11-06 Thread David Kowis
Of note: I started weewx as root and it has the exact same errors, so I 
don't think it's who I'm running it as.

On Sunday, November 6, 2016 at 4:38:18 PM UTC-6, David Kowis wrote:
>
> I had it working on an archlinux box, and I'm slowly changing my boxes 
> over to Ubuntu.
>
> It's not starting:
>
> ```
> Nov  6 16:35:28 ubuntubase weewx[15446]: engine: Initializing weewx 
> version 3.6.1
> Nov  6 16:35:28 ubuntubase weewx[15446]: engine: Using Python 2.7.12 
> (default, Jul  1 2016, 15:12:24) #012[GCC 5.4.0 20160609]
> Nov  6 16:35:28 ubuntubase weewx[15446]: engine: Platform 
> Linux-4.4.0-45-generic-x86_64-with-Ubuntu-16.04-xenial
> Nov  6 16:35:28 ubuntubase weewx[15446]: engine: Using configuration file 
> /etc/weewx/weewx.conf
> Nov  6 16:35:28 ubuntubase weewx[15446]: engine: Loading station type 
> Vantage (weewx.drivers.vantage)
> Nov  6 16:35:28 ubuntubase weewx[15446]: import of driver failed: [Errno 
> 22] Invalid argument ()
> Nov  6 16:35:28 ubuntubase weewx[15446]: engine: Unable to load driver: 
> [Errno 22] Invalid argument
> Nov  6 16:35:28 ubuntubase weewx[15446]:   Exiting...
> ```
>
> I'm using an IP-to-serial connector that connects my old Vantage Pro via 
> socat. That's working fine and is creating things according to the right 
> user.
>
> The only changes from default installation are to have weewx run as 
> non-root, and the socket is created as the same user (weewx, weewx)
>
> Can anyone point me at why I'm getting an IO error, or how to get more 
> information? I'm going to keep hacking at it, and see if I can't figure it 
> out myself, but google isn't showing me anything :(
>
> Thanks,
> David Kowis
>

-- 
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: WU import missing rain data

2016-11-06 Thread Andrew Chilvers
Gary,
Sorry I was a bit vague. Used the wu-example file and edited my station 
name, and adjusted the interval to 1. Importing around 18 mo. data.
No error messages in the log, and browsing the archive data directly in the 
DB, the rain column is blank, and the rainRate column is 0.0 for all 
records. The data is there on WU.

Andrew 

On Sunday, November 6, 2016 at 4:50:44 PM UTC-5, gjr80 wrote:
>
> Hi,
>
> Going to need a little more info.
>
> You say 'all the rain data is missing', what makes you say this? Have you 
> looked in your weewx archive? Are your reports missing data? Are there any 
> errors, warnings or other messages in your log from the import session? 
> What import config file did you use and what changes did you make to it?
>
> 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] Unable to get weewx going on an ubuntu 16.04 box

2016-11-06 Thread David Kowis
I had it working on an archlinux box, and I'm slowly changing my boxes over 
to Ubuntu.

It's not starting:

```
Nov  6 16:35:28 ubuntubase weewx[15446]: engine: Initializing weewx version 
3.6.1
Nov  6 16:35:28 ubuntubase weewx[15446]: engine: Using Python 2.7.12 
(default, Jul  1 2016, 15:12:24) #012[GCC 5.4.0 20160609]
Nov  6 16:35:28 ubuntubase weewx[15446]: engine: Platform 
Linux-4.4.0-45-generic-x86_64-with-Ubuntu-16.04-xenial
Nov  6 16:35:28 ubuntubase weewx[15446]: engine: Using configuration file 
/etc/weewx/weewx.conf
Nov  6 16:35:28 ubuntubase weewx[15446]: engine: Loading station type 
Vantage (weewx.drivers.vantage)
Nov  6 16:35:28 ubuntubase weewx[15446]: import of driver failed: [Errno 
22] Invalid argument ()
Nov  6 16:35:28 ubuntubase weewx[15446]: engine: Unable to load driver: 
[Errno 22] Invalid argument
Nov  6 16:35:28 ubuntubase weewx[15446]:   Exiting...
```

I'm using an IP-to-serial connector that connects my old Vantage Pro via 
socat. That's working fine and is creating things according to the right 
user.

The only changes from default installation are to have weewx run as 
non-root, and the socket is created as the same user (weewx, weewx)

Can anyone point me at why I'm getting an IO error, or how to get more 
information? I'm going to keep hacking at it, and see if I can't figure it 
out myself, but google isn't showing me anything :(

Thanks,
David Kowis

-- 
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] WU import missing rain data

2016-11-06 Thread Andrew Chilvers
I wanted to import my historical data from WU and used the importer, 
however all the rain data is missing.
Any ideas?

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.


[weewx-user] Re: Interceptor Driver - rainin dailyrain - Acurite 5 in 1

2016-11-06 Thread Brad Tucker
Good Evening Matt,

I thought tcpflow would go forever but forever happened to only be 12 hours 
;) After running for a very long time everything crashed. Ive been keeping 
a mindful eye on it so I caught it pretty early... Attached is a syslog. 
Let me know if you see anything I should look for. The error codes are the 
same as the last crash. Not ure that helps any...

Thanks,
Brad

Nov  6 20:47:52 weather weewx[20110]: interceptor: MainThread: raw packet: 
{'dateTime.00012694.24C86E06B15C': 1478494073, 
'sensor_type.00012694.24C86E06B15C': 'tower', 'rssi.00012694.24C86E06B15C': 
0.75, 'battery.00012694.24C86E06B15C': 0, 'dateTime': 1478494073, 
'bridge_id.00012694.24C86E06B15C': '24C86E06B15C', 'usUnits': 1, 
'humidity.00012694.24C86E06B15C': 51.0, 'usUnits.00012694.24C86E06B15C': 1, 
'barometer.00012694.24C86E06B15C': 29.36, 
'temperature.00012694.24C86E06B15C': 70.8, 
'sensor_id.00012694.24C86E06B15C': '00012694'}
Nov  6 20:47:52 weather weewx[20110]: interceptor: MainThread: mapped 
packet: {'extraHumid1': 51.0, 'extraTemp1': 70.8, 'barometer': 29.36, 
'usUnits': 1, 'dateTime': 1478494073}
Nov  6 20:48:02 weather weewx[20110]: interceptor: MainThread: empty queue
Nov  6 20:48:05 weather weewx[20110]: interceptor: ServerThread: POST: /
Nov  6 20:48:05 weather weewx[20110]: interceptor: MainThread: raw data: /
Nov  6 20:48:05 weather weewx[20110]: engine: Main loop exiting. Shutting 
engine down.
Nov  6 20:48:05 weather weewx[20110]: engine: Shutting down StdReport thread
Nov  6 20:48:05 weather weewx[20110]: engine: StdReport thread has been 
terminated
Nov  6 20:48:05 weather weewx[20110]: interceptor: MainThread: shutting 
down server thread
Nov  6 20:48:05 weather weewx[20110]: engine: Caught unrecoverable 
exception in engine:
Nov  6 20:48:05 weather weewx[20110]:   need more than 1 value to 
unpack
Nov  6 20:48:05 weather weewx[20110]:   Traceback (most recent call 
last):
Nov  6 20:48:05 weather weewx[20110]: File 
"/home/weewx/bin/weewx/engine.py", line 844, in main
Nov  6 20:48:05 weather weewx[20110]:   engine.run()
Nov  6 20:48:05 weather weewx[20110]: File 
"/home/weewx/bin/weewx/engine.py", line 186, in run
Nov  6 20:48:05 weather weewx[20110]:   for packet in 
self.console.genLoopPackets():
Nov  6 20:48:05 weather weewx[20110]: File 
"/home/weewx/bin/user/interceptor.py", line 1447, in genLoopPackets
Nov  6 20:48:05 weather weewx[20110]:   pkt = 
self._device.parser.parse(data)
Nov  6 20:48:05 weather weewx[20110]: File 
"/home/weewx/bin/user/interceptor.py", line 478, in parse
Nov  6 20:48:05 weather weewx[20110]:   return 
self.parse_chaney(s)
Nov  6 20:48:05 weather weewx[20110]: File 
"/home/weewx/bin/user/interceptor.py", line 522, in parse_chaney
Nov  6 20:48:05 weather weewx[20110]:   (n, v) = x.split('=')
Nov  6 20:48:05 weather weewx[20110]:   ValueError: need more than 
1 value to unpack
Nov  6 20:48:05 weather weewx[20110]:   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] Noob question... where to find the actual data (temp) within weewx?

2016-11-06 Thread gjr80
I am not aware of a single place, whenever I want more info I just go 'the dot 
code' in the Customization Guide. I don't know the reasoning behind why it is 
like it is, perhaps part historical when the suite of tags was less extensive 
than it is now, perhaps there is an expectation that if you are wanting to get 
down into rolling your own then you should do a bit of reading. Maybe there is 
a bit of 'give a man a fish and you feed him today, teach him to fish and you 
feed him for life' - if you understand the dot code structure you can work most 
anything out. I also think that a 'simple table of tags' would probably be 
anything but simple eg what does $span mean? If people have to go back to some 
descriptive text maybe they should go there to start off with. Tom and Matthew 
may have some more eloquent words, or maybe it's just a case of someone making 
a clone and submitting a pull request :)

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] Noob question... where to find the actual data (temp) within weewx?

2016-11-06 Thread Andrew Milner
The problem is that I have a horrible suspicion that not all possibilities 
are actually mentioned in the documentation at the present time  of 
course my suspicion may well be totally unjustified!!!  I am a staunch 
believer in the documentation - as you know - but I confess to missing that 
ordinal_compass one when I went looking and in fact got 
sidetracked/confused, I think, by the [[ordinates]] labels which I 
discovered whilst trying to find what "ordnates" referred to in the 
original question.

On Monday, 7 November 2016 06:25:57 UTC+2, gjr80 wrote:
>
> I am not aware of a single place, whenever I want more info I just go 'the 
> dot code' in the Customization Guide. I don't know the reasoning behind why 
> it is like it is, perhaps part historical when the suite of tags was less 
> extensive than it is now, perhaps there is an expectation that if you are 
> wanting to get down into rolling your own then you should do a bit of 
> reading. Maybe there is a bit of 'give a man a fish and you feed him today, 
> teach him to fish and you feed him for life' - if you understand the dot 
> code structure you can work most anything out. I also think that a 'simple 
> table of tags' would probably be anything but simple eg what does $span 
> mean? If people have to go back to some descriptive text maybe they should 
> go there to start off with. Tom and Matthew may have some more eloquent 
> words, or maybe it's just a case of someone making a clone and submitting a 
> pull request :)
>
> 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: Unable to get weewx going on an ubuntu 16.04 box

2016-11-06 Thread David Kowis
This is just a thread of me answering myself because I ask questions too 
soon, heh.

http://packages.ubuntu.com/zesty/all/python-serial/download

Go grab and install that via dpkg -i, and now the thing will connect. No 
clue if it'll affect other programs, but probably not.

On Sunday, November 6, 2016 at 7:30:58 PM UTC-6, David Kowis wrote:
>
> Well, I figured out the problem: 
> https://github.com/pyserial/pyserial/issues/59
>
> Somehow I need to use a version of pyserial that's not 3.0.1, because 
> 3.0.1 has a bug that involves working with socat and that breaks 
> everything 
>
> Anyone have advice on how to install a newer version of pyserial that will 
> be compatible with the dpkg install of weewx?
>
> On Sunday, November 6, 2016 at 7:07:16 PM UTC-6, David Kowis wrote:
>>
>> I hacked in an exception stack trace: 
>>
>> ```
>> exception details Traceback (most recent call last):
>>   File "/usr/share/weewx/weewx/engine.py", line 107, in setupStation
>> self.console = loader_function(config_dict, self)
>>   File "/usr/share/weewx/weewx/drivers/vantage.py", line 27, in loader
>> return VantageService(engine, config_dict)
>>   File "/usr/share/weewx/weewx/drivers/vantage.py", line 1703, in __init__
>> Vantage.__init__(self, **config_dict[DRIVER_NAME])
>>   File "/usr/share/weewx/weewx/drivers/vantage.py", line 476, in __init__
>> self.port.openPort()
>>   File "/usr/share/weewx/weewx/drivers/vantage.py", line 283, in openPort
>> self.serial_port = serial.Serial(self.port, self.baudrate, 
>> timeout=self.timeout)
>>   File "/usr/lib/python2.7/dist-packages/serial/serialutil.py", line 180, 
>> in __init__
>> self.open()
>>   File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 
>> 311, in open
>> self._update_dtr_state()
>>   File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 
>> 605, in _update_dtr_state
>> fcntl.ioctl(self.fd, TIOCMBIS, TIOCM_DTR_str)
>> IOError: [Errno 22] Invalid argument
>> ```
>>
>> An invalid argument? Is this a library problem, or a permissions problem, 
>> I'm not familiar enough with python to know exactly why it's upset here, 
>> but it seems to be dying in the library, not in weewx... maybe?
>>
>> On Sunday, November 6, 2016 at 4:39:09 PM UTC-6, David Kowis wrote:
>>>
>>> Of note: I started weewx as root and it has the exact same errors, so I 
>>> don't think it's who I'm running it as.
>>>
>>> On Sunday, November 6, 2016 at 4:38:18 PM UTC-6, David Kowis wrote:

 I had it working on an archlinux box, and I'm slowly changing my boxes 
 over to Ubuntu.

 It's not starting:

 ```
 Nov  6 16:35:28 ubuntubase weewx[15446]: engine: Initializing weewx 
 version 3.6.1
 Nov  6 16:35:28 ubuntubase weewx[15446]: engine: Using Python 2.7.12 
 (default, Jul  1 2016, 15:12:24) #012[GCC 5.4.0 20160609]
 Nov  6 16:35:28 ubuntubase weewx[15446]: engine: Platform 
 Linux-4.4.0-45-generic-x86_64-with-Ubuntu-16.04-xenial
 Nov  6 16:35:28 ubuntubase weewx[15446]: engine: Using configuration 
 file /etc/weewx/weewx.conf
 Nov  6 16:35:28 ubuntubase weewx[15446]: engine: Loading station type 
 Vantage (weewx.drivers.vantage)
 Nov  6 16:35:28 ubuntubase weewx[15446]: import of driver failed: 
 [Errno 22] Invalid argument ()
 Nov  6 16:35:28 ubuntubase weewx[15446]: engine: Unable to load driver: 
 [Errno 22] Invalid argument
 Nov  6 16:35:28 ubuntubase weewx[15446]:   Exiting...
 ```

 I'm using an IP-to-serial connector that connects my old Vantage Pro 
 via socat. That's working fine and is creating things according to the 
 right user.

 The only changes from default installation are to have weewx run as 
 non-root, and the socket is created as the same user (weewx, weewx)

 Can anyone point me at why I'm getting an IO error, or how to get more 
 information? I'm going to keep hacking at it, and see if I can't figure it 
 out myself, but google isn't showing me anything :(

 Thanks,
 David Kowis

>>>

-- 
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: Unable to get weewx going on an ubuntu 16.04 box

2016-11-06 Thread David Kowis
I hacked in an exception stack trace: 

```
exception details Traceback (most recent call last):
  File "/usr/share/weewx/weewx/engine.py", line 107, in setupStation
self.console = loader_function(config_dict, self)
  File "/usr/share/weewx/weewx/drivers/vantage.py", line 27, in loader
return VantageService(engine, config_dict)
  File "/usr/share/weewx/weewx/drivers/vantage.py", line 1703, in __init__
Vantage.__init__(self, **config_dict[DRIVER_NAME])
  File "/usr/share/weewx/weewx/drivers/vantage.py", line 476, in __init__
self.port.openPort()
  File "/usr/share/weewx/weewx/drivers/vantage.py", line 283, in openPort
self.serial_port = serial.Serial(self.port, self.baudrate, 
timeout=self.timeout)
  File "/usr/lib/python2.7/dist-packages/serial/serialutil.py", line 180, 
in __init__
self.open()
  File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 311, 
in open
self._update_dtr_state()
  File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 605, 
in _update_dtr_state
fcntl.ioctl(self.fd, TIOCMBIS, TIOCM_DTR_str)
IOError: [Errno 22] Invalid argument
```

An invalid argument? Is this a library problem, or a permissions problem, 
I'm not familiar enough with python to know exactly why it's upset here, 
but it seems to be dying in the library, not in weewx... maybe?

On Sunday, November 6, 2016 at 4:39:09 PM UTC-6, David Kowis wrote:
>
> Of note: I started weewx as root and it has the exact same errors, so I 
> don't think it's who I'm running it as.
>
> On Sunday, November 6, 2016 at 4:38:18 PM UTC-6, David Kowis wrote:
>>
>> I had it working on an archlinux box, and I'm slowly changing my boxes 
>> over to Ubuntu.
>>
>> It's not starting:
>>
>> ```
>> Nov  6 16:35:28 ubuntubase weewx[15446]: engine: Initializing weewx 
>> version 3.6.1
>> Nov  6 16:35:28 ubuntubase weewx[15446]: engine: Using Python 2.7.12 
>> (default, Jul  1 2016, 15:12:24) #012[GCC 5.4.0 20160609]
>> Nov  6 16:35:28 ubuntubase weewx[15446]: engine: Platform 
>> Linux-4.4.0-45-generic-x86_64-with-Ubuntu-16.04-xenial
>> Nov  6 16:35:28 ubuntubase weewx[15446]: engine: Using configuration file 
>> /etc/weewx/weewx.conf
>> Nov  6 16:35:28 ubuntubase weewx[15446]: engine: Loading station type 
>> Vantage (weewx.drivers.vantage)
>> Nov  6 16:35:28 ubuntubase weewx[15446]: import of driver failed: [Errno 
>> 22] Invalid argument ()
>> Nov  6 16:35:28 ubuntubase weewx[15446]: engine: Unable to load driver: 
>> [Errno 22] Invalid argument
>> Nov  6 16:35:28 ubuntubase weewx[15446]:   Exiting...
>> ```
>>
>> I'm using an IP-to-serial connector that connects my old Vantage Pro via 
>> socat. That's working fine and is creating things according to the right 
>> user.
>>
>> The only changes from default installation are to have weewx run as 
>> non-root, and the socket is created as the same user (weewx, weewx)
>>
>> Can anyone point me at why I'm getting an IO error, or how to get more 
>> information? I'm going to keep hacking at it, and see if I can't figure it 
>> out myself, but google isn't showing me anything :(
>>
>> Thanks,
>> David Kowis
>>
>

-- 
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] Noob question... where to find the actual data (temp) within weewx?

2016-11-06 Thread Jim W.
Moving on:

If I add  $ordnates.windDir to the .tmpl file should I get a Cardinal or 
Ordinal return?
Thanks again.


 

On Thursday, November 3, 2016 at 9:09:39 PM UTC-4, Jim W. wrote:
>
> THANK YOU THANK YOU THANK YOU!!! 
> and thanks for your patience!
>
> On Thursday, November 3, 2016 at 8:21:29 PM UTC-4, Tom Keffer wrote:
>>
>> The weewx report generator processes temp.txt.tmpl to produce a file 
>> temp.txt, which will contain the current temperature as a string.
>>
>> It has nothing to do with the shell.
>>
>> Take a look in /var/www/html/weewx/temp.txt
>>
>> -tk
>>
>>
>> On Thu, Nov 3, 2016 at 4:35 PM, Jim W.  wrote:
>>
>>> As I understand it, $current.outTemp represents a string variable the 
>>> value of which should be the outside temperature.  When I try to view the 
>>> value (echo $current.outTemp )  I dose't work. I've tried a few other 
>>> schemes as well, like making a shell script that does this: 
>>> #!/bin/bash
>>> current_outTemp=$current.outTemp
>>> echo $current_outTemp
>>>
>>>
>>> Can you give me an idea of how to accomplish this?
>>>
>>>
>>>
>>>
>>> On Thursday, November 3, 2016 at 5:45:26 PM UTC-4, Tom Keffer wrote:

 On Thu, Nov 3, 2016 at 2:35 PM, Jim W.  wrote:

>
> Does the temp.txt.tmpl file require special formatting? Right now this 
> is what it contains: 
> $current.outTemp
>
>
 ​It should contain just text. Why do you ask?

 -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+...@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: Unable to get weewx going on an ubuntu 16.04 box

2016-11-06 Thread David Kowis
Well, I figured out the 
problem: https://github.com/pyserial/pyserial/issues/59

Somehow I need to use a version of pyserial that's not 3.0.1, because 3.0.1 
has a bug that involves working with socat and that breaks everything 

Anyone have advice on how to install a newer version of pyserial that will 
be compatible with the dpkg install of weewx?

On Sunday, November 6, 2016 at 7:07:16 PM UTC-6, David Kowis wrote:
>
> I hacked in an exception stack trace: 
>
> ```
> exception details Traceback (most recent call last):
>   File "/usr/share/weewx/weewx/engine.py", line 107, in setupStation
> self.console = loader_function(config_dict, self)
>   File "/usr/share/weewx/weewx/drivers/vantage.py", line 27, in loader
> return VantageService(engine, config_dict)
>   File "/usr/share/weewx/weewx/drivers/vantage.py", line 1703, in __init__
> Vantage.__init__(self, **config_dict[DRIVER_NAME])
>   File "/usr/share/weewx/weewx/drivers/vantage.py", line 476, in __init__
> self.port.openPort()
>   File "/usr/share/weewx/weewx/drivers/vantage.py", line 283, in openPort
> self.serial_port = serial.Serial(self.port, self.baudrate, 
> timeout=self.timeout)
>   File "/usr/lib/python2.7/dist-packages/serial/serialutil.py", line 180, 
> in __init__
> self.open()
>   File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 311, 
> in open
> self._update_dtr_state()
>   File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 605, 
> in _update_dtr_state
> fcntl.ioctl(self.fd, TIOCMBIS, TIOCM_DTR_str)
> IOError: [Errno 22] Invalid argument
> ```
>
> An invalid argument? Is this a library problem, or a permissions problem, 
> I'm not familiar enough with python to know exactly why it's upset here, 
> but it seems to be dying in the library, not in weewx... maybe?
>
> On Sunday, November 6, 2016 at 4:39:09 PM UTC-6, David Kowis wrote:
>>
>> Of note: I started weewx as root and it has the exact same errors, so I 
>> don't think it's who I'm running it as.
>>
>> On Sunday, November 6, 2016 at 4:38:18 PM UTC-6, David Kowis wrote:
>>>
>>> I had it working on an archlinux box, and I'm slowly changing my boxes 
>>> over to Ubuntu.
>>>
>>> It's not starting:
>>>
>>> ```
>>> Nov  6 16:35:28 ubuntubase weewx[15446]: engine: Initializing weewx 
>>> version 3.6.1
>>> Nov  6 16:35:28 ubuntubase weewx[15446]: engine: Using Python 2.7.12 
>>> (default, Jul  1 2016, 15:12:24) #012[GCC 5.4.0 20160609]
>>> Nov  6 16:35:28 ubuntubase weewx[15446]: engine: Platform 
>>> Linux-4.4.0-45-generic-x86_64-with-Ubuntu-16.04-xenial
>>> Nov  6 16:35:28 ubuntubase weewx[15446]: engine: Using configuration 
>>> file /etc/weewx/weewx.conf
>>> Nov  6 16:35:28 ubuntubase weewx[15446]: engine: Loading station type 
>>> Vantage (weewx.drivers.vantage)
>>> Nov  6 16:35:28 ubuntubase weewx[15446]: import of driver failed: [Errno 
>>> 22] Invalid argument ()
>>> Nov  6 16:35:28 ubuntubase weewx[15446]: engine: Unable to load driver: 
>>> [Errno 22] Invalid argument
>>> Nov  6 16:35:28 ubuntubase weewx[15446]:   Exiting...
>>> ```
>>>
>>> I'm using an IP-to-serial connector that connects my old Vantage Pro via 
>>> socat. That's working fine and is creating things according to the right 
>>> user.
>>>
>>> The only changes from default installation are to have weewx run as 
>>> non-root, and the socket is created as the same user (weewx, weewx)
>>>
>>> Can anyone point me at why I'm getting an IO error, or how to get more 
>>> information? I'm going to keep hacking at it, and see if I can't figure it 
>>> out myself, but google isn't showing me anything :(
>>>
>>> Thanks,
>>> David Kowis
>>>
>>

-- 
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] Noob question... where to find the actual data (temp) within weewx?

2016-11-06 Thread Andrew Milner
Gary - is there a list of dot options anywhere??  eg ordinal_compass was 
hard to find - I made a guess at the unit/formatting dot code being just 
.ordinate, but I was wrong!!  A complete list of tags/units/dotcodes would 
be very useful eg as an appendix maybe to the guide (or have I missed it?)

On Monday, 7 November 2016 05:01:52 UTC+2, gjr80 wrote:
>
> Hi,
>
> I think you will get nothing other than an error message. 
> $windDir.ordinal_compass will give you an ordinal compass direction for the 
> latest wind direction. Have a read about wind ordinals in the Customization 
> Guide http://weewx.com/docs/customizing.htm#unit_conversion_options
>
> 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.