matthewwall / weewx-interceptor

weewx driver that intercepts web traffic from internet 'bridge' devices such as Acurite Access, ObserverIP, OS LW30x, LaCross GW1000U, FineOffset GW1000
GNU General Public License v3.0
105 stars 46 forks source link

wu-client messages not parsed #82

Open willew opened 4 years ago

willew commented 4 years ago

Configuration

When running Interceptor in the foreground in the debug mode, I see the following messages raw packet: {'usUnits': 1, 'dateTime': 1600253325} mapped packet: {'usUnits': 1, 'dateTime': 1600253325}

However, the weather data is seen in the network data capture (tcpdump)

After I changed interceptor.py as follows (I have NEVER written any python), the system started to work.

       def do_GET(self):
            # get the query string from an HTTP GET
            # VWe: the data passed here included only the url parameters, skip parsing
            # data = urlparse.urlparse(self.path).query
            data = self.path
            logdbg('GET: %s' % _obfuscate_passwords(data))
            Consumer.queue.put(data)
            self.reply()