station_type = Interceptor
...
[Interceptor]
driver = user.interceptor
device_type = observer
port = 9000
...
[[Wunderground]]
enable = true
..
Jan 21 21:32:28 cql-server weewx[5408]: restx: Wunderground-PWS: Data for station KILLAGRA32 will be posted
Jan 21 21:32:28 cql-server weewx[5408]: restx: PWSweather: Posting not enabled.
Jan 21 21:32:28 cql-server weewx[5408]: restx: CWOP: Posting not enabled.
Jan 21 21:32:28 cql-server weewx[5408]: restx: WOW: Posting not enabled.
Jan 21 21:32:28 cql-server weewx[5408]: restx: AWEKAS: Posting not enabled.
Jan 21 21:32:28 cql-server weewx[5408]: engine: Starting up weewx version 3.9.2
Jan 21 21:32:28 cql-server weewx[5408]: engine: Starting main packet loop.
Jan 21 21:47:16 cql-server weewx[5408]: cheetahgenerator: Generated 8 files for report SeasonsReport in 3.75 seconds
Jan 21 21:47:17 cql-server weewx[5408]: imagegenerator: Generated 14 images for SeasonsReport in 1.04 seconds
Jan 21 21:47:17 cql-server weewx[5408]: copygenerator: copied 5 files to /var/www/html/weewx
Jan 21 21:50:04 cql-server weewx[5408]: manager: Added record 2020-01-21 21:50:00 CST (1579665000) to database 'weewx.sdb'
Jan 21 21:50:04 cql-server weewx[5408]: manager: Added record 2020-01-21 21:50:00 CST (1579665000) to daily summary in 'weewx.sdb'
Jan 21 21:50:06 cql-server weewx[5408]: cheetahgenerator: Generated 8 files for report SeasonsReport in 1.26 seconds
Jan 21 21:50:07 cql-server weewx[5408]: imagegenerator: Generated 14 images for SeasonsReport in 0.98 seconds
Jan 21 21:50:07 cql-server weewx[5408]: copygenerator: copied 0 files to /var/www/html/weewx
Jan 21 21:50:21 cql-server weewx[5408]: restx: Wunderground-PWS: Failed to publish record 2020-01-21 21:50:00 CST (1579665000): Failed upload after 3 tries
- put the WS-2902A console behind the WeeWx system so that it can see the WU packets and actually intercept them. This is done by creating a separate network hotspot for the WS-2902A to connect to.
- or you need d to do DNS poisoning so that the WS-2902A sends the data to the WeeWx system instead of to WU servers. The WS-2902A will think it is sending data to WU but the DNS resolution will be changed so that it resolves to the WeeWx system's IP address instead.
Yet another alternative is to forget using the WS-2902A console and instead use the Ecowitt GW1000 to pick up your sensors and then the GW1000 can be configured to send the data to the WeeWx system using its "Customized" server settings. This is an option that the WS-2902A console device does not have hence is a reason adding the GW1000 is appealing. The other benefit to using the GW1000 is that you'll be able to add more sensors that the WS-2902A can't pick up (extra temp/hum, soil moisture, lightning, PM2.5, and more). You can then use the GW1000 with Ecowitt.net protocol instead of WU protocol to send these extra sensors to WeeWx.
Still the GW1000 is a better way. No need for DNS trickery.
mapped packet: {'usUnits': 16, 'dateTime': 1579808958}
iptables -t nat -A PREROUTING -s 10.10.100.72 -p tcp --dport 80 -j DNAT --to-destination 10.10.100.13:8099 iptables -t nat -A POSTROUTING -j MASQUERADE
My WS-1400-IP device has IP address 10.10.100.72
My weewx computer has IP address 10.10.100.13
My router changes the destination IP and port, my examples use 8099.
My weewx.conf file has the following interceptor settings,
[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
port = 8099
There is another way to use interceptor in sniff mode but I think it requires different firewall rules.
If your stock router uses 'iptables' you can try the lines I used just replace the IP addresses with whatever you are using.
Change the device_type in your weewx.conf to whatever is apropriate for your device.
Beware! the firewall rules use fixed IP addresses.
If you use DHCP on your router it is necessary to make sure your router always gives the same IP to your 2902 and your PC running weewx.
The solution is to add Static Leases to your DHCP server on your router for the 2902 and weewx respectively.
If you don't do this and one of the devices gets a different address it can be "level 3 fun" figuring out why something stopped working when you did not change anything.