matthewwall / weewx-interceptor

weewx driver that intercepts web traffic from internet 'bridge' devices such as Acurite Access, ObserverIP, OS LW30x, LaCross GW1000U, FineOffset GW1000
GNU General Public License v3.0
105 stars 46 forks source link

Forward onto other ecowitt handler #105

Open spacelama opened 2 years ago

spacelama commented 2 years ago

I want to be able to run weewx-interceptor to answer port 8000, but then also forward onto another URI (in my case, homeassistant:4199/weatherdata/report).

Using the hints at the bottom of the README, I came up with this:

sudo ngrep -l -q -W byline -d eth0 dst 192.168.1.17 and port 8000 | grep --line-buffered PASSKEY | xargs -n 1 curl http://homeassistant:4199/weatherdata/report/ -s -d

It works, but not a huge fan of packet captures running permanently. It should be an easy task for weewx-interceptor to forward all received raw data onto another receiver, with appropriately short connection timeouts etc (don't both with store-and-forward). But I ain't no good with python. Or I might be missing something really basic.

chrisgilldc commented 2 years ago

This would likewise be very useful to me - I want to split my weather station traffic to both my home automation system and to WeeWx, and all other options are turning into a big ball of kludges.