On Saturday, December 10, 2016 at 4:46:15 PM UTC-5, Sam Roza wrote:
>
> Hi Matt, 
>
> I use a simple ngrep script that you and I worked out. I worked reliably 
> for the last few months. I have been teeing the packets out to a file,  and 
> in my previous reply,  you can see the 'wfor'  shows up in there. After the 
> tee,  it's sent to interceptor. Looking at the weewx.log the POST shows the 
> packet with the 'wfor' tacked to the end. But then it looks to me as if the 
> packet is processed several times by interceptor. The tee file doesn't show 
> multi packets. 
>
> Let me know if I'm unclear, or if the log snippet included isn't making 
> sense. 
>

sam,

based on the log snippet you posted, the interceptor is doing exactly what 
it is supposed to do.

the interceptor is not processing a single POST multiple times - based on 
the log, something is *posting* what appears to be the same data multiple 
times, and some of those POSTs contain incomplete data.

the interceptor uses a standard do_POST handler on 
BaseHTTPServer.BaseHTTPRequestHandler.  i don't know how that handler could 
be duplicating POSTs - it simply puts the data it receives onto a queue.  
and i don't know how the BaseHTTPServer could be duplicating POSTs.

i know we went through the ngrep stuff in a different thread, but that was 
awhile ago and i have no way of knowing what, if anything, has changed in 
your setup.  are you using this (from a posting in october, in thread 
"weewx with OS LW301 and interceptor driver"):

#!/bin/sh
ngrep -l -q -d eth0 '0004a369e0d6' | sed -u '/mac=/!d' | xargs -n 1 curl 
http://localhost:9999 -s -d

how are you tee-ing to file?

perhaps you could have curl send to a web server that simply logs every 
POST - that might help us track down where the duplication is coming from.

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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to