weewx-interceptor
weewx-interceptor copied to clipboard
Two programs; only one customize screen in "WSView"
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.
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
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)
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.
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
Hi Matt,
I upgraded to Python3 Raspian Bullseye and now can no longer get pypcap to work (won't install) which means I don't have the ability to "sniff". You mention interceptor is not verified in python3, so should I stop ripping my hair out and go back to python2? Thank you!
Kind Regards, Tom Kavanaugh
------ Original Message ------ From: "Matthew Wall" @.> To: "matthewwall/weewx-interceptor" @.> Cc: "Subscribed" @.***> Sent: 1/29/2022 8:59:12 AM Subject: Re: [matthewwall/weewx-interceptor] Two programs; only one customize screen in "WSView" (Issue #102)
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.
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)
— Reply to this email directly, view it on GitHub https://github.com/matthewwall/weewx-interceptor/issues/102#issuecomment-1024916956, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE7CISNTBSO43NM6GVBEXWLUYPXDBANCNFSM5NCOXICQ. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you are subscribed to this thread.Message ID: @.***>
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.