Interceptor driver location and configuration help.

101 views
Skip to first unread message

Steve Shuff

unread,
Apr 8, 2025, 8:23:56 AM4/8/25
to weewx-user
Hi All,
I am making an attempt to get Weewx to communicate with my Campbell Scientific CR1000 based weather station.
I have the station successfully uploading to WeatherUnderground and I would like to configure the interceptor driver (beyond the default values) that I have installed in Weewx.
Where within Weewx does this driver reside is my primary question ?
I am sure there will be others soon !
Thanks for any help.

DR

unread,
Apr 8, 2025, 8:55:46 AM4/8/25
to weewx...@googlegroups.com
Have  you looked  at making your  CS CR1000 write a file that FileParser
will recognize and use that to input to WeeWx?  That has been one
suggestion.


I have not worked on a similar project to modify FileParser to be 'less
robust' and just taking a strictly ordered file and stuffing those
values into a loop packet for WeeWx, not worrying about going through to
match every value with a strict parse.  That was my goal and I make
progress every now and then, but get distracted by other issues and also
having to re-learn some Python again, which at my age is less easily done.


But I think the main authors of WeeWx and drivers have suggested the
FileParser method.  The trick in CRBasic is to generate the pairs.

Just my thoughts.  Dale


matthew wall

unread,
Apr 8, 2025, 8:58:20 AM4/8/25
to weewx...@googlegroups.com


> On Apr 8, 2025, at 07:30, Steve Shuff <steves...@gmail.com> wrote:
>
> Hi All,
> I am making an attempt to get Weewx to communicate with my Campbell Scientific CR1000 based weather station.
> I have the station successfully uploading to WeatherUnderground and I would like to configure the interceptor driver (beyond the default values) that I have installed in Weewx.
> Where within Weewx does this driver reside is my primary question ?

if you installed using a deb or rpm package and you are using weewx v5, then the driver will be in /etc/weewx/bin/user

however, you should not have to modify the driver code - just make changes to the configuration file.

the interceptor README describes some of the configuration options and the situations in which they are used:

https://github.com/matthewwall/weewx-interceptor


matthew wall

unread,
Apr 8, 2025, 9:01:37 AM4/8/25
to weewx...@googlegroups.com
just to be clear, if you want to capture data from a weather station that is sending data to weather underground, then you might want to start with 'sniff mode for any WU client' section:

===============================================================================
Example: sniff mode for any WU client

This example assumes two network interfaces on the computer running weewx.

1) Plug the computer into the local network using the first interface (eth0).
Plug the device into the second interface (eth1).
Bridge the two network interfaces.
If you run any web services on the computer, configure them to listen on
interface eth0, not eth1.

2) Set parameters in the weewx configuration file. The device has IP address
of X.X.X.X

[Interceptor]
driver = user.interceptor
device_type = wu-client
mode = sniff
iface = eth1
pcap_filter = src X.X.X.X and dst port 80


Steve Shuff

unread,
Apr 8, 2025, 9:54:52 AM4/8/25
to weewx...@googlegroups.com
Hi Matthew ,
Thanks for the reply.

The CR1000 based station is on the home local network , the Raspberry pi running Weewx is on the same network.
 Assuming the interceptor is expecting  to use two network interfaces I would have to remove the CR1000 from the home network and plug it into the Raspberry pi 
Alternatively, would the interceptor accept using one interface somehow, or is that not doable ?
I am running Weewx 5.1.0 .


--
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 weewx-user+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/weewx-user/9120F3AB-3CC0-449A-8002-FB5FAB0EF15F%40gmail.com.


--
Steve Shuff.

Steve Shuff

unread,
Apr 8, 2025, 9:54:52 AM4/8/25
to weewx...@googlegroups.com
Also the Raspberry pi is on a wireless connection to the network,
  Thanks 
--
Steve Shuff.

matthew wall

unread,
Apr 8, 2025, 12:07:08 PM4/8/25
to weewx...@googlegroups.com


> On Apr 8, 2025, at 10:37, Steve Shuff <steves...@gmail.com> wrote:
>
> Hi Matthew ,
> Thanks for the reply.
>
> The CR1000 based station is on the home local network , the Raspberry pi running Weewx is on the same network.
> Assuming the interceptor is expecting to use two network interfaces I would have to remove the CR1000 from the home network and plug it into the Raspberry pi
> Alternatively, would the interceptor accept using one interface somehow, or is that not doable ?

there are two modes for intercepting wu traffic: (1) listen and (2) sniff.

when you listen, you make your station send data to weewx directly, either by:
- making the station think that the weewx host is weather underground by spoofing dns
- mirroring network traffic from the station using firewall or network switch settings

when you sniff, you must ensure that the station and weewx are on the same network segment, and that any network hardware is not isolating devices. you can test this using tcpdump on the machine on which weewx is running. just do something like this:

sudo tcpdump src X.X.X.X and dst port 80

then you should see data from the station. there is no point messing with the weewx configuration until you can see something using tcpdump.

the example assumes the computer on which weewx is running is a network bridge - bridging the wifi and wired interfaces. if you are not bridging, and you are using a wired interface, then it is quite probable that you will not see anything - most network switches isolate traffic to client nodes, so any client device will see only the traffic bound for it. some 'smart' switches have an option to mirror traffic from one port to another. if you are using a wifi interface, then you might be able to see traffic bound for other devices.

when you sniff, you will probably run into permissions issues. typically root permissions are required to sniff network traffic. you can see this when you run tcpdump - if you run as an unprivileged user, you won't see anything, but if you run as root, you might. so in order to sniff traffic using the pcap bindings, the weewxd process will probably need escalated permissions. the simplest and least secure way to do this is to run weewxd as root. that was the default for v4 installations. v5 installations default to running as a non-root user, so if you sniff traffic you'll probably need to give the weewx user permissions to do that.


Reply all
Reply to author
Forward
0 new messages