I am using the interceptor extension for my Ambient Weather WS-2902. Data sent to wunderground, ambientweather.net, and weathercloud are the same as on my console. The data sent through weewx is way off. I.E., temperature is off by 12 degrees.
I installed weewx in the simulator mode. Here is the relevant sections in my weewx.conf
##############################################################################
[Simulator]
# This section is for the weewx weather station simulator
# The time (in seconds) between LOOP packets.
loop_interval = 2.5
# The simulator mode can be either 'simulator' or 'generator'.
# Real-time simulator. Sleep between each LOOP packet.
mode = simulator
# Generator. Emit LOOP packets as fast as possible (useful for testing).
#mode = generator
# The start time. Format is YYYY-mm-ddTHH:MM. If not specified, the default
# is to use the present time.
#start = 2011-01-01T00:00
# The driver to use:
driver = weewx.drivers.simulator
##############################################################################
[Interceptor
# This section is for the network traffic interceptor driver.
# The driver to use:
driver = user.interceptor
# Specify the hardware device to capture. Options include:
# acurite-bridge - acurite internet bridge
# observer - fine offset WH2600/HP1000/HP1003, aka 'observer'
# lw30x - oregon scientific LW301/LW302
# lacrosse-bridge - lacrosse GW1000U/C84612 internet bridge
device_type = observer
# mode = sniff
# iface = eth1
# pcap_filter = src 192.168.0.25 and dst port 80 (Note: this the IP of my console – but don’t see anything with tcpdump)
Here is the uploading section from my syslog file:
Mar 17 10:05:15 freyr weewx[23744]: manager: Added record 2018-03-17 10:05:16 PDT (1521306316) to database 'cmon.sdb'
Mar 17 10:05:15 freyr weewx[23744]: manager: Added record 2018-03-17 10:05:16 PDT (1521306316) to daily summary in 'cmon.sdb'
Mar 17 10:05:15 freyr weewx[23744]: manager: Added record 2018-03-17 10:05:00 PDT (1521306300) to database 'weewx.sdb'
Mar 17 10:05:15 freyr weewx[23744]: manager: Added record 2018-03-17 10:05:00 PDT (1521306300) to daily summary in 'weewx.sdb'
Mar 17 10:05:16 freyr weewx[23744]: forecast: NWSThread: NWS: downloading forecast from 'http://forecast.weather.gov/product.php?site=NWS&product=PFM&format=txt&issuedby=PQR'
Mar 17 10:05:16 freyr weewx[23744]: restx: PWSWeather: Published record 2018-03-17 10:05:00 PDT (1521306300)
Mar 17 10:05:16 freyr weewx[23744]: forecast: NWSThread: NWS: no PFM found for MIWO3 in forecast from PQR
Mar 17 10:05:16 freyr weewx[23744]: restx: AWEKAS: Published record 2018-03-17 10:05:00 PDT (1521306300)
Mar 17 10:05:16 freyr weewx[23744]: restx: CWOP: Published record 2018-03-17 10:05:00 PDT (1521306300)
Mar 17 10:05:16 freyr weewx[23744]: restx: WeatherBug: Published record 2018-03-17 10:05:00 PDT (1521306300)
Mar 17 10:05:16 freyr weewx[23744]: cheetahgenerator: Generated 14 files for report StandardReport in 0.82 seconds
Mar 17 10:05:17 freyr weewx[23744]: imagegenerator: Generated 16 images for StandardReport in 0.49 seconds
Mar 17 10:05:17 freyr weewx[23744]: copygenerator: copied 0 files to /var/www/weewx
Mar 17 10:05:17 freyr weewx[23744]: cheetahgenerator: Generated 1 files for report cmon in 0.01 seconds
Mar 17 10:05:22 freyr weewx[23744]: imagegenerator: Generated 32 images for cmon in 4.98 seconds
Mar 17 10:05:31 freyr weewx[23744]: cheetahgenerator: Generated 10 files for report forecast in 9.00 seconds
Mar 17 10:05:31 freyr weewx[23744]: copygenerator: copied 0 files to /var/www/weewx/forecast
and here is output from tcpdump (tcpdump -vvv -i eth1 src 192.168.0.5 and port 80):
09:20:16.112303 IP (tos 0x0, ttl 64, id 47369, offset 0, flags [DF], proto TCP (6), length 60)
freyr.asgard.33494 > a23-194-100-92.deploy.static.akamaitechnologies.com.http: Flags [S], cksum 0x60a9 (correct), seq 232509794, win 29200, options [mss 1460,sackOK,TS val 4259239991 ecr 0,nop,wscale 7], length 0
09:20:16.127521 IP (tos 0x0, ttl 64, id 16817, offset 0, flags [DF], proto TCP (6), length 60)
freyr.asgard.59422 > ip165.kremstalnet.at.http: Flags [S], cksum 0x75c4 (correct), seq 2754030047, win 29200, options [mss 1460,sackOK,TS val 1353633783 ecr 0,nop,wscale 7], length 0
09:20:16.137197 IP (tos 0x0, ttl 64, id 47370, offset 0, flags [DF], proto TCP (6), length 52)
freyr.asgard.33494 > a23-194-100-92.deploy.static.akamaitechnologies.com.http: Flags [.], cksum 0xa3e5 (correct), seq 232509795, ack 1145923412, win 229, options [nop,nop,TS val 4259240016 ecr 244163171], length 0
09:20:16.140364 IP (tos 0x0, ttl 64, id 40069, offset 0, flags [DF], proto TCP (6), length 60)
freyr.asgard.41310 > ec2-52-73-22-124.compute-1.amazonaws.com.http: Flags [S], cksum 0x8565 (correct), seq 2192307447, win 29200, options [mss 1460,sackOK,TS val 259923016 ecr 0,nop,wscale 7], length 0
09:20:16.140437 IP (tos 0x0, ttl 64, id 47371, offset 0, flags [DF], proto TCP (6), length 231)
freyr.asgard.33494 > a23-194-100-92.deploy.static.akamaitechnologies.com.http: Flags [P.], cksum 0x10d1 (correct), seq 0:179, ack 1, win 229, options [nop,nop,TS val 4259240019 ecr 244163171], length 179: HTTP, length: 179
GET /product.php?site=NWS&product=PFM&format=txt&issuedby=PQR HTTP/1.1
Accept-Encoding: identity
Host: forecast.weather.gov
Connection: close
User-Agent: Python-urllib/2.7
09:20:16.140508 IP (tos 0x0, ttl 64, id 30599, offset 0, flags [DF], proto TCP (6), length 60)
freyr.asgard.52722 > ec2-107-23-220-109.compute-1.amazonaws.com.http: Flags [S], cksum 0xcd8a (correct), seq 871833589, win 29200, options [mss 1460,sackOK,TS val 2759997825 ecr 0,nop,wscale 7], length 0
09:20:16.166457 IP (tos 0x0, ttl 64, id 47372, offset 0, flags [DF], proto TCP (6), length 52)
freyr.asgard.33494 > a23-194-100-92.deploy.static.akamaitechnologies.com.http: Flags [.], cksum 0xa20c (correct), seq 179, ack 228, win 237, options [nop,nop,TS val 4259240045 ecr 244163201], length 0
09:20:16.166971 IP (tos 0x0, ttl 64, id 47373, offset 0, flags [DF], proto TCP (6), length 52)
freyr.asgard.33494 > a23-194-100-92.deploy.static.akamaitechnologies.com.http: Flags [F.], cksum 0xa20b (correct), seq 179, ack 228, win 237, options [nop,nop,TS val 4259240045 ecr 244163201], length 0
09:20:16.167302 IP (tos 0x0, ttl 64, id 47374, offset 0, flags [DF], proto TCP (6), length 52)
freyr.asgard.33494 > a23-194-100-92.deploy.static.akamaitechnologies.com.http: Flags [.], cksum 0xa209 (correct), seq 180, ack 229, win 237, options [nop,nop,TS val 4259240046 ecr 244163201], length 0
09:20:16.233472 IP (tos 0x0, ttl 64, id 40070, offset 0, flags [DF], proto TCP (6), length 52)
freyr.asgard.41310 > ec2-52-73-22-124.compute-1.amazonaws.com.http: Flags [.], cksum 0x6291 (correct), seq 2192307448, ack 3314839672, win 229, options [nop,nop,TS val 259923109 ecr 1574055551], length 0
09:20:16.233530 IP (tos 0x0, ttl 64, id 40071, offset 0, flags [DF], proto TCP (6), length 452)
freyr.asgard.41310 > ec2-52-73-22-124.compute-1.amazonaws.com.http: Flags [P.], cksum 0x9040 (correct), seq 0:400, ack 1, win 229, options [nop,nop,TS val 259923109 ecr 1574055551], length 400: HTTP, length: 400
GET /pwsupdate/pwsupdate.php?action=updateraw&ID=KORMILWA6&PASSWORD=active75&softwaretype=weewx-3.8.0&baromin=31.089&dewptf=25.0&humidity=080&dateutc=2018-03-17%2016%3A20%3A00&UV=8.06&solarradiation=575.88&dailyrainin=0.02&winddir=358&tempf=30.5&windspeedmph=0.1&windgustmph=0.1&rainin=0.00 HTTP/1.1
Accept-Encoding: identity
Host: www.pwsweather.com
Connection: close
User-Agent: weewx/3.8.0
09:20:16.234843 IP (tos 0x0, ttl 64, id 30600, offset 0, flags [DF], proto TCP (6), length 52)
freyr.asgard.52722 > ec2-107-23-220-109.compute-1.amazonaws.com.http: Flags [.], cksum 0x0d94 (correct), seq 871833590, ack 4004644241, win 229, options [nop,nop,TS val 2759997919 ecr 149512787], length 0
09:20:16.235004 IP (tos 0x0, ttl 64, id 30601, offset 0, flags [DF], proto TCP (6), length 514)
freyr.asgard.52722 > ec2-107-23-220-109.compute-1.amazonaws.com.http: Flags [P.], cksum 0x0665 (correct), seq 0:462, ack 1, win 229, options [nop,nop,TS val 2759997920 ecr 149512787], length 462: HTTP, length: 462
GET /data/livedata.aspx?dateutc=2018-03-17+16%3A20%3A00&solarradiation=575.9&softwaretype=weewx_3.8.0&tempfhi=53.9&windspeedmph=0.1&baromin=31.089&UV=8&tempflo=30.5&rainin=0.00&windgustmph=0.1&dailyRainin=0.02&winddir=358&dewptf=25.0&tempf=30.5&Num=20717&Key=active75&Yearlyrainin=103.61&action=live&humidity=
80&ID=p09121&monthlyrainin=91.33 HTTP/1.1
Accept-Encoding: identity
Host: data.backyard2.weatherbug.com
Connection: close
User-Agent: weewx/3.8.0
09:20:16.322698 IP (tos 0x0, ttl 64, id 16818, offset 0, flags [DF], proto TCP (6), length 52)
freyr.asgard.59422 > ip165.kremstalnet.at.http: Flags [.], cksum 0xae32 (correct), seq 2754030048, ack 2758269565, win 229, options [nop,nop,TS val 1353633978 ecr 1258790089], length 0
09:20:16.322957 IP (tos 0x0, ttl 64, id 16819, offset 0, flags [DF], proto TCP (6), length 343)
freyr.asgard.59422 > ip165.kremstalnet.at.http: Flags [P.], cksum 0xdb81 (correct), seq 0:291, ack 1, win 229, options [nop,nop,TS val 1353633978 ecr 1258790089], length 291: HTTP, length: 291
GET /eingabe_pruefung.php?val=jawoodruff;025080a30e83aac73394c2f257549880;17.03.2018;16:20;-0.8;80;1052.802;0.60;0.1;358;;;;de;;0.1;575.88;8.06;;;;0.00;weewx_3.8.0;-122.605295;45.450916 HTTP/1.1
Accept-Encoding: identity
Host: data.awekas.at
Connection: close
User-Agent: weewx/3.8.0
09:20:16.330937 IP (tos 0x0, ttl 64, id 40072, offset 0, flags [DF], proto TCP (6), length 52)
freyr.asgard.41310 > ec2-52-73-22-124.compute-1.amazonaws.com.http: Flags [.], cksum 0x5f3b (correct), seq 400, ack 326, win 237, options [nop,nop,TS val 259923206 ecr 1574055575], length 0
09:20:16.331306 IP (tos 0x0, ttl 64, id 40073, offset 0, flags [DF], proto TCP (6), length 52)
freyr.asgard.41310 > ec2-52-73-22-124.compute-1.amazonaws.com.http: Flags [F.], cksum 0x5f38 (correct), seq 400, ack 327, win 237, options [nop,nop,TS val 259923207 ecr 1574055575], length 0
09:20:16.526397 IP (tos 0x0, ttl 64, id 16820, offset 0, flags [DF], proto TCP (6), length 52)
freyr.asgard.59422 > ip165.kremstalnet.at.http: Flags [.], cksum 0xab49 (correct), seq 291, ack 192, win 237, options [nop,nop,TS val 1353634182 ecr 1258790140], length 0
09:20:16.568030 IP (tos 0x0, ttl 64, id 16821, offset 0, flags [DF], proto TCP (6), length 52)
freyr.asgard.59422 > ip165.kremstalnet.at.http: Flags [.], cksum 0xab1d (correct), seq 291, ack 193, win 237, options [nop,nop,TS val 1353634224 ecr 1258790141], length 0
09:20:16.616029 IP (tos 0x0, ttl 64, id 30602, offset 0, flags [DF], proto TCP (6), length 52)
freyr.asgard.52722 > ec2-107-23-220-109.compute-1.amazonaws.com.http: Flags [.], cksum 0x0909 (correct), seq 462, ack 278, win 237, options [nop,nop,TS val 2759998301 ecr 149512821], length 0
09:20:16.664378 IP (tos 0x0, ttl 64, id 30603, offset 0, flags [DF], proto TCP (6), length 52)
freyr.asgard.52722 > ec2-107-23-220-109.compute-1.amazonaws.com.http: Flags [F.], cksum 0x08d8 (correct), seq 462, ack 278, win 237, options [nop,nop,TS val 2759998349 ecr 149512821], length 0
09:20:16.664709 IP (tos 0x0, ttl 64, id 16822, offset 0, flags [DF], proto TCP (6), length 52)
freyr.asgard.59422 > ip165.kremstalnet.at.http: Flags [F.], cksum 0xaabc (correct), seq 291, ack 193, win 237, options [nop,nop,TS val 1353634320 ecr 1258790141], length 0
FYI, I have stopped apache2.
Any suggestions?
What I see in the interceptor section of your config file that you must remove the last three # symbols to activate those lines.
Also try using the HP1000 extension rather than the interceptor. I have found it much more reliable and easier to setup.
Hope this might help to get your further along the road.
Ian
Jim
iptables -t mangle -A PREROUTING -s 192.168.179.52 -j ROUTE --tee --gw 192.168.179.118
iptables -t mangle -A POSTROUTING -d 192.168.179.52 -j ROUTE --tee --gw 192.168.179.118
The first IP is my weatherstation, the second IP is the raspberry pi with weewx
I have also added my weewx.conf
Maybe this helps you
I have also struggled with my Ubee modem/router.
The solution for me was to install an asus router (second hand rt-n66u) behind my Ubee and switched the Ubee to bridge mode.
I setup the asus router in wireless router mode. After that this router has the possibility to add the right ip tables with telnet in the command line.
Later I updated my asus with the free asuswrt-merlin firmware. With that it's possible to enable ssh and I used that instead of telnet.
Then it is also possible to put the ip tables into a firewall start script.
The profit is that after a reboot of the router the ip tables are not disappeared.
Maybe there is a more simple way to connect the ws-2902 with the weewx, but I could not discover it.
My configuration is running now for 3 months without problems.
sudo tcpdump -vvv -i en0 dst ec2-52-25-111-41.us-west-2.compute.amazonaws.com and port 80 | nc -D -v 10.0.1.120 9999
and
sudo tcpdump -vvv -i en0 dst ec2-52-25-111-41.us-west-2.compute.amazonaws.com and port 80 | xargs -n 1 curl http://10.0.1.120:9999 -s -d -v
sudo PYTHONPATH=/home/weewx/bin python /home/weewx/bin/user/interceptor.py --device=observer --mode=sniff --iface=wlan0 --filter="src 10.0.1.144 and dst port 9999" --debug
and
sudo PYTHONPATH=/home/weewx/bin python /home/weewx/bin/user/interceptor.py --device=observer --mode=sniff --iface=wlan0 --filter="src 10.0.1.1 and dst port 9999" --debug
sudo PYTHONPATH=/home/weewx/bin python /home/weewx/bin/user/interceptor.py --device=observer --mode=sniff --iface=wlan0 --filter="src 10.0.1.120 and dst port 9999" --debug
and yet still no success....
sudo tcpdump -vvv -i en0 dst ec2-52-25-111-41.us-west-2.compute.amazonaws.com and port 80 > ~/Desktop/test
obviously writes the dump to a file that the destination is ec2-52-25-111-41.us-west-2.compute.amazonaws.com which is fine.
To verify the dump I send it to the host that I wish it would get it to with the following command...
nc 10.0.1.120 9999 < ~/Desktop/test
and it works all fine, the host receives and parse it.
now with that logic is assumed that this would have worked but it's not.
sudo tcpdump -vvv -i en0 dst ec2-52-25-111-41.us-west-2.compute.amazonaws.com and port 80 | nc -D -v 10.0.1.120 9999 &
at least now I know that weewx is running and that the interceptor is also running and working...
just got to figure out how to get the a shell script running on my mac/router.....