On Saturday, October 8, 2016 at 4:29:20 PM UTC-4, Sam Roza wrote: > > > With sed command, it strips the unwanted data from the output, but for > some reason, it's not working. I've tried with both curl and nc, but I > don't see any issues. Is there a way to debug this? >
take it one step at a time. make sure that the interceptor is actually responding. with weewx running and debug=1, tail the log file in one shell while you do this in another: curl -s -d 'mac=0004a369e0d6&id=c2&pv=0&lb=0&ac=0®=1009&lost=0000&baro=1005&ptr=0&wfor=0&p=1' http://localhost:9999 you should see a response from the interceptor in the weewx log output. what output do you see from curl? from the other end, make sure that the ngrep-sed-curl chain is working. the main thing we are looking for here is that we get one curl connection for each line of data from ngrep. with weewx *not* running, run 'nc -l 9999' as a fake server in one shell, then do this as a 'client' in another shell: ngrep -l -q -d eth0 '0004a369e0d6'| sed -e 's/T.*//;/^\s*$/d' | curl -s -d @- http://localhost:9999 what do you see in the 'server' shell, and what do you see in the 'client' shell? i suspect we'll have to use xargs to split the newlines into separate curl invocations. 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.
