Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two programs; only one customize screen in "WSView" #102

Open
Tech500 opened this issue Jan 29, 2022 · 5 comments
Open

Two programs; only one customize screen in "WSView" #102

Tech500 opened this issue Jan 29, 2022 · 5 comments

Comments

@Tech500
Copy link

Tech500 commented Jan 29, 2022

I use weewx to participate in the CWOP program using your interceptor driver for ecowitt-client.

Issue arrises when I run "CumulusMX." There is only one customize page in "WSView." Both programs run correctly seperately.

Configuration screen captures

Is there a way to somehow combine or make changes to enable both "weewx" and "CumulusMx?"

Tried using my computer ipAddress 10.0.0.146 for address = 10.0.0.146 with port 8998 only to get "unable to load driver."

William

@matthewwall
Copy link
Owner

matthewwall commented Jan 29, 2022

you should be able to have the gw1000 send to cumulus, then use weewx-interceptor in sniff mode (instead of listen mode) to capture that traffic.

there are some caveats:

  • both cumulus and weewx must be on the same subnet. more specifically, the network interface of the machine that weewx is running on must be able to see the traffic that cumulus sees. if you are running weewx and cumulus on the same host, this is no problem. if they are on different hosts, then you must configure your switch so that the port of the weewx computer can see the traffic destined to the port of the cumulus computer. most smart switches will let you do this, dumb switches will not.
  • if you cannot do port mirroring on your switch, there are many variations that could work, for example, (a) use the computer that weewx is running on as a bridge, (b) run a web server on the computer that weewx is running on, and have that web server split the traffic to both weewx and cumulus, (c) find an old hub (not switch) and put that on the network (a hub always does port mirroring), (d) modify the interceptor code to relay the traffic to another destination (if you do this, i would accept the merge request)
  • on the computer running weewx, unless you get lucky and everything just works on the first try, you will probably have to do some testing using tcpdump. this is not difficult, but it is definitely not an noobie activity.

i know this worked with python2, however, i have not yet verified it in python3

(i am working on an update to interceptor now to roll in all of the outstanding issues and merge requests)

@Tech500
Copy link
Author

Tech500 commented Jan 29, 2022

The ecowitt-client is a Tycon TP3000WC Proweatherstation; not a gw1000, believe princple is the same. Network wise both; weewx and CumulusMx are on the same subnet.

What needs to be modified in interceptor code to relay traffic to another destination?

Could you describe port mirroring? Have used port forwarding on my Netgear WNDR4300; not port mirroring.

@matthewwall
Copy link
Owner

What needs to be modified in interceptor code to relay traffic to another destination?

the interceptor has a Consumer class that contains a server and a parser. the server is either a sniffer (sniffs network traffic to receive data) or a listener (listens on a network port to receive data). when the server receives data, it sticks the packets onto a queue. the parser then pops packets off the queue and processes them into weewx LOOP packets.

to do a relay, add another object, lets call it Relay, with its own queue. when the server receives data, it would put each packet not only onto the parser's queue, but also onto the Relay queue. the Relay would run on a separate thread that would pop items off its queue and send them to a destination. this could use many types of destinations and protocols, but i'd start with host:port and http.

Could you describe port mirroring? Have used port forwarding on my Netgear WNDR4300; not port mirroring.

normally each port on a switch can see only the traffic to/from the device connected to that switch. so a computer plugging into port 1 cannot see any traffic to/from port 2 (unless, of course, the computer on port 1 is actually sending/receiving data to the device in port 2).

when you enable port mirroring, you let one port see all of the traffic on one (or more) of the other ports.

https://en.wikipedia.org/wiki/Port_mirroring

@KC1ELF
Copy link

KC1ELF commented Jan 29, 2022 via email

@matthewwall
Copy link
Owner

the sniffing is the part i have to fix for python3. if you want to sniff, use python2, at least for now. there are (were) two network capture libraries that i could use in python2. i need to figure out what to use now with python3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants