[weewx-user] Re: Interceptor Driver - rainin dailyrain - Acurite 5 in 1
Hey Matt, Tried your fix and it worked great. I had to remove the "tcp" modifier on my line, but I did test browsing the web site on the bridge an no more crashes. sudo tcpflow -C -i eth1 -s src host 192.168.1.18 and dst port 80 | ./combine -lines.pl | xargs -n 1 curl http://192.168.1.19: -s -d Thanks again, Brad On Saturday, November 12, 2016 at 10:24:33 PM UTC-8, mwall wrote: > > > > On Sunday, November 13, 2016 at 12:55:46 AM UTC-5, Brad Tucker wrote: >> >> Hello Matt, >> >> I starting thinking about the time stamp on the log I just sent, and that >> was right around the time I typed in the IP address to find the boot >> version and firmware version of the Acurite Bridge for RADAR. That got me >> thinking... So I went in and viewed that website again and sure enough >> thats whats killing interceptor/weewx... If you log onto the http server of >> the Acurite Bride it takes it down... >> > > brad, > > you can fix it by tweaking your capture command. are you still using this: > > sudo tcpflow -C -i eth1 -s tcp dst port 80 | ./combine-lines.pl | xargs -n > 1 curl http://192.168.1.19: -s -d > > if so, then try indicating the source something like this: > > sudo tcpflow -C -i eth1 -s tcp src X.X.X.X and dst port 80 | ./combine- > lines.pl | xargs -n 1 curl http://192.168.1.19: -s -d > > that way you will capture only the traffic from the bridge, not from your > web browser too. > > anyway, i added a fix to the interceptor so it will just log such traffic > instead of dying. > > m > -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[weewx-user] Re: Interceptor Driver - rainin dailyrain - Acurite 5 in 1
Thanks for the tip Matt. I never changed the command because it seemed to be working great... If it aint broke why fix it ;) Ill give the new line a shot though. Thanks for help yet again! B On Saturday, November 12, 2016 at 10:24:33 PM UTC-8, mwall wrote: > > > > On Sunday, November 13, 2016 at 12:55:46 AM UTC-5, Brad Tucker wrote: >> >> Hello Matt, >> >> I starting thinking about the time stamp on the log I just sent, and that >> was right around the time I typed in the IP address to find the boot >> version and firmware version of the Acurite Bridge for RADAR. That got me >> thinking... So I went in and viewed that website again and sure enough >> thats whats killing interceptor/weewx... If you log onto the http server of >> the Acurite Bride it takes it down... >> > > brad, > > you can fix it by tweaking your capture command. are you still using this: > > sudo tcpflow -C -i eth1 -s tcp dst port 80 | ./combine-lines.pl | xargs -n > 1 curl http://192.168.1.19: -s -d > > if so, then try indicating the source something like this: > > sudo tcpflow -C -i eth1 -s tcp src X.X.X.X and dst port 80 | ./combine- > lines.pl | xargs -n 1 curl http://192.168.1.19: -s -d > > that way you will capture only the traffic from the bridge, not from your > web browser too. > > anyway, i added a fix to the interceptor so it will just log such traffic > instead of dying. > > m > -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [weewx-user] Re: Interceptor Driver - rainin dailyrain - Acurite 5 in 1
The Acurite Bridge is running it own web server on port 80. It basically just shows you the MAC address of the Bridge along with the firmware and hardware versions. Since my TCPflow command is sniffing any traffic and trying to parse it from that IP address on port 80 it grabs the traffic and kills weewx. For most uses its not a big deal. I have no need to see the firmware version or the hardware version. Blocking the port 80 at the router would not work in my circumstance. I have a raspberry pi running wth 2 ethernet cards acting in bridge mode. It is between the accurate bridge and the router. It sniffs all traffic being sent from the acurite bride on port 80 that is headed to myacurite and parses that information, along with sending it off to Myacurite so I can still access that interface. Thanks, Brad On Saturday, November 12, 2016 at 10:17:47 PM UTC-8, Liz wrote: > > On Sat, 12 Nov 2016 21:55:45 -0800 (PST) > Brad Tucker <br...@makeitrad.com > wrote: > > > Hello Matt, > > > > I starting thinking about the time stamp on the log I just sent, and > > that was right around the time I typed in the IP address to find the > > boot version and firmware version of the Acurite Bridge for RADAR. > > That got me thinking... So I went in and viewed that website again > > and sure enough thats whats killing interceptor/weewx... If you log > > onto the http server of the Acurite Bride it takes it down... > > > > Guess it makes since when you think about it... Not sure what could > > be done about it, but at least I know what not to do anymore ;) > > > > Take Care, > > Brad > > What port does the bridge use to communicate with their server? > Is there a possibility to block that port at your router? > > Liz > -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[weewx-user] Re: Interceptor Driver - rainin dailyrain - Acurite 5 in 1
Hello Matt, I starting thinking about the time stamp on the log I just sent, and that was right around the time I typed in the IP address to find the boot version and firmware version of the Acurite Bridge for RADAR. That got me thinking... So I went in and viewed that website again and sure enough thats whats killing interceptor/weewx... If you log onto the http server of the Acurite Bride it takes it down... Guess it makes since when you think about it... Not sure what could be done about it, but at least I know what not to do anymore ;) Take Care, Brad On Saturday, November 12, 2016 at 9:42:56 PM UTC-8, Brad Tucker wrote: > > Hey Matt, > > I had the interceptor crash this morning. I have attached the current logs. > > Thanks, > Brad > > > Nov 12 06:52:37 weather weewx[725]: interceptor: MainThread: raw data: > dateutc=now=updateraw=1=24C86E06B15C=5N1x38=2179=1=43=58.8=29.39=normal=3 > Nov 12 06:52:37 weather weewx[725]: interceptor: MainThread: ignored > parameter realtime=1 > Nov 12 06:52:37 weather weewx[725]: interceptor: MainThread: ignored > parameter action=updateraw > Nov 12 06:52:37 weather weewx[725]: interceptor: MainThread: raw packet: > {'sensor_type.2179.24C86E06B15C': '5N1x38', > 'sensor_id.2179.24C86E06B15C': '2179', > 'temperature.2179.24C86E06B15C': 58.8, > 'dateTime.2179.24C86E06B15C': 1478962358, > 'usUnits.2179.24C86E06B15C': 1, 'battery.2179.24C86E06B15C': 0, > 'dateTime': 1478962358, 'humidity.2179.24C86E06B15C': 43.0, > 'bridge_id.2179.24C86E06B15C': '24C86E06B15C', > 'barometer.2179.24C86E06B15C': 29.39, 'rssi.2179.24C86E06B15C': > 0.75, 'windspeed.2179.24C86E06B15C': 1.0, 'usUnits': 1} > Nov 12 06:52:37 weather weewx[725]: interceptor: MainThread: mapped > packet: {'barometer': 29.39, 'outHumidity': 43.0, 'dateTime': 1478962358, > 'outTemp': 58.8, 'windSpeed': 1.0, 'usUnits': 1} > Nov 12 06:52:37 weather weewx[725]: interceptor: ServerThread: POST: / > Nov 12 06:52:37 weather weewx[725]: interceptor: MainThread: raw data: / > Nov 12 06:52:37 weather weewx[725]: interceptor: MainThread: raw packet: {} > Nov 12 06:52:37 weather weewx[725]: engine: Main loop exiting. Shutting > engine down. > Nov 12 06:52:37 weather weewx[725]: engine: Shutting down StdReport thread > Nov 12 06:52:37 weather weewx[725]: engine: StdReport thread has been > terminated > Nov 12 06:52:37 weather weewx[725]: interceptor: MainThread: shutting down > server thread > Nov 12 06:52:38 weather weewx[725]: engine: Caught unrecoverable exception > in engine: > Nov 12 06:52:38 weather weewx[725]: 'dateTime' > Nov 12 06:52:38 weather weewx[725]: Traceback (most recent call > last): > Nov 12 06:52:38 weather weewx[725]: File > "/home/weewx/bin/weewx/engine.py", line 844, in main > Nov 12 06:52:38 weather weewx[725]: engine.run() > Nov 12 06:52:38 weather weewx[725]: File > "/home/weewx/bin/weewx/engine.py", line 186, in run > Nov 12 06:52:38 weather weewx[725]: for packet in > self.console.genLoopPackets(): > Nov 12 06:52:38 weather weewx[725]: File > "/home/weewx/bin/user/interceptor.py", line 1597, in genLoopPackets > Nov 12 06:52:38 weather weewx[725]: pkt = > self._device.parser.map_to_fields(pkt, self._obs_map) > Nov 12 06:52:38 weather weewx[725]: File > "/home/weewx/bin/user/interceptor.py", line 701, in map_to_fields > Nov 12 06:52:38 weather weewx[725]: return > Consumer.Parser.map_to_fields(pkt, sensor_map) > Nov 12 06:52:38 weather weewx[725]: File > "/home/weewx/bin/user/interceptor.py", line 355, in map_to_fields > Nov 12 06:52:38 weather weewx[725]: packet = {'dateTime': > pkt['dateTime'], 'usUnits': pkt['usUnits']} > Nov 12 06:52:38 weather weewx[725]: KeyError: 'dateTime' > Nov 12 06:52:38 weather weewx[725]: Exiting. > > -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[weewx-user] Re: Interceptor using bridge new Accurate firmware
I think the 104 boot version means it is older hardware just updated. I have seen people with a much later boot version. Not positive on the details though. Good luck. B -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[weewx-user] Re: Interceptor using bridge new Accurate firmware
Hello Radar, I see you and Matt are already trouble shooting your problems but to answer your question, I believe I am using a new hub. I only bought the unit weeks ago. With that said here is what the bridge reports. Boot firmware version : 104 Application version : 224 Hope this helps, Brad -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[weewx-user] Re: Interceptor Driver - rainin dailyrain - Acurite 5 in 1
Still going strong! Thanks Matt! B On Tuesday, November 8, 2016 at 7:12:45 AM UTC-8, Brad Tucker wrote: > > It's been running for 24 hours :) > I'll let it go for a few more days and let you know my findings. > > Thanks Matt! > B > -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[weewx-user] Re: Interceptor Driver - rainin dailyrain - Acurite 5 in 1
It has been loaded. Ill report back in the morning if all goes well. Thanks Matt, Brad On Monday, November 7, 2016 at 7:57:39 AM UTC-8, mwall wrote: > > > > On Monday, November 7, 2016 at 12:08:35 AM UTC-5, Brad Tucker wrote: >> >> Good Evening Matt, >> >> I thought tcpflow would go forever but forever happened to only be 12 >> hours ;) After running for a very long time everything crashed. Ive been >> keeping a mindful eye on it so I caught it pretty early... Attached is a >> syslog. Let me know if you see anything I should look for. The error codes >> are the same as the last crash. Not ure that helps any... >> > > hi brad, > > please try the latest interceptor.py. i added rejection of unexpected cgi > formats at commit 2ad77b7 > > m > -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[weewx-user] Re: Interceptor Driver - rainin dailyrain - Acurite 5 in 1
Good Evening Matt, I thought tcpflow would go forever but forever happened to only be 12 hours ;) After running for a very long time everything crashed. Ive been keeping a mindful eye on it so I caught it pretty early... Attached is a syslog. Let me know if you see anything I should look for. The error codes are the same as the last crash. Not ure that helps any... Thanks, Brad Nov 6 20:47:52 weather weewx[20110]: interceptor: MainThread: raw packet: {'dateTime.00012694.24C86E06B15C': 1478494073, 'sensor_type.00012694.24C86E06B15C': 'tower', 'rssi.00012694.24C86E06B15C': 0.75, 'battery.00012694.24C86E06B15C': 0, 'dateTime': 1478494073, 'bridge_id.00012694.24C86E06B15C': '24C86E06B15C', 'usUnits': 1, 'humidity.00012694.24C86E06B15C': 51.0, 'usUnits.00012694.24C86E06B15C': 1, 'barometer.00012694.24C86E06B15C': 29.36, 'temperature.00012694.24C86E06B15C': 70.8, 'sensor_id.00012694.24C86E06B15C': '00012694'} Nov 6 20:47:52 weather weewx[20110]: interceptor: MainThread: mapped packet: {'extraHumid1': 51.0, 'extraTemp1': 70.8, 'barometer': 29.36, 'usUnits': 1, 'dateTime': 1478494073} Nov 6 20:48:02 weather weewx[20110]: interceptor: MainThread: empty queue Nov 6 20:48:05 weather weewx[20110]: interceptor: ServerThread: POST: / Nov 6 20:48:05 weather weewx[20110]: interceptor: MainThread: raw data: / Nov 6 20:48:05 weather weewx[20110]: engine: Main loop exiting. Shutting engine down. Nov 6 20:48:05 weather weewx[20110]: engine: Shutting down StdReport thread Nov 6 20:48:05 weather weewx[20110]: engine: StdReport thread has been terminated Nov 6 20:48:05 weather weewx[20110]: interceptor: MainThread: shutting down server thread Nov 6 20:48:05 weather weewx[20110]: engine: Caught unrecoverable exception in engine: Nov 6 20:48:05 weather weewx[20110]: need more than 1 value to unpack Nov 6 20:48:05 weather weewx[20110]: Traceback (most recent call last): Nov 6 20:48:05 weather weewx[20110]: File "/home/weewx/bin/weewx/engine.py", line 844, in main Nov 6 20:48:05 weather weewx[20110]: engine.run() Nov 6 20:48:05 weather weewx[20110]: File "/home/weewx/bin/weewx/engine.py", line 186, in run Nov 6 20:48:05 weather weewx[20110]: for packet in self.console.genLoopPackets(): Nov 6 20:48:05 weather weewx[20110]: File "/home/weewx/bin/user/interceptor.py", line 1447, in genLoopPackets Nov 6 20:48:05 weather weewx[20110]: pkt = self._device.parser.parse(data) Nov 6 20:48:05 weather weewx[20110]: File "/home/weewx/bin/user/interceptor.py", line 478, in parse Nov 6 20:48:05 weather weewx[20110]: return self.parse_chaney(s) Nov 6 20:48:05 weather weewx[20110]: File "/home/weewx/bin/user/interceptor.py", line 522, in parse_chaney Nov 6 20:48:05 weather weewx[20110]: (n, v) = x.split('=') Nov 6 20:48:05 weather weewx[20110]: ValueError: need more than 1 value to unpack Nov 6 20:48:05 weather weewx[20110]: Exiting. -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[weewx-user] Re: Interceptor Driver - rainin dailyrain - Acurite 5 in 1
Great. I was thinking to add it to the initd startup but I like the idea of adding if it to the weewx initd instead. Thanks for the thoughts. Thanks, Brad -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[weewx-user] Re: Interceptor Driver - rainin dailyrain - Acurite 5 in 1
Hello Matt, So far so good!!! Tcpflow has been running for over an hour. Data seems to be making its way. I'll go up on the roof and poor in some water shortly and see if it logs the values. Here is my working command: sudo tcpflow -C -i eth1 -s tcp dst port 80 | ./combine-lines.pl | xargs -n 1 curl http://192.168.1.19: -s -d Thanks again for all the hard work on this. I would have given up days ago w/o you :) If you'd like me to test the pcap code you implemented last night Im happy to do so once I test the rain sensor. Thanks -Brad On Sunday, November 6, 2016 at 4:47:09 AM UTC-8, mwall wrote: > > > > On Sunday, November 6, 2016 at 2:32:46 AM UTC-5, Brad Tucker wrote: >> >> Decided to turn off the FTP skin and see if it changed anything. I still >> got the crash and here is the syslog: >> >> > tcpdump is picking up the traffic from your web server/browser and the > weewx web pages. > > you need to adjust the tcpdump filter so that it only captures traffic > from the acurite bridge > > try adding a src clause something like this: > > tcpdump ... src X.X.X.X and dst port 80 > > where X.X.X.X is the address of the bridge > > or just listen on the eth1 interface (the one to which the bridge is > connected) instead of the eth0 interface (the one to which the rest of the > network is connected) > > m > -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[weewx-user] Re: Interceptor Driver - rainin dailyrain - Acurite 5 in 1
Hello Matt! I think I have some good news. After I did the clean install tcpdump worked exactly as it had before. However this time I tried to give tcpflow a shot. It has a great output and then once I run it through your perl script it looks really pretty and all on one line. It will run for a good 10 min then it crashes. I don't believe the crash is because of bad characters in the tcpdump this time though. Its as clean as Ive ever seen! This looks the most promising. Please take a look and let me know what you think. Thanks, Brad *sudo tcpflow -C -s tcp dst port 80* GET /weatherstation/updateweatherstation?dateutc=now=updateraw=1 =24C86E06B15C=5N1x31=2179 =0=180 =0.00=0.00=93=51.5=49 =29.30=normal=3 HTTP/1.1 Host: hubapi.myacurite.com User-Agent: Hub/224 Connection: close GET /weatherstation/updateweatherstation.php?ID=KCATHOUS110==now=updateraw=1 =36 =24C86E06B15C=5N1x31=2179 =0=180 =0.00=0.00=93=51.5=49 =29.30=normal=3 HTTP/1.1 Host: rtupdate.wunderground.com Connection: close GET /weatherstation/updateweatherstation?dateutc=now=updateraw=1 =24C86E06B15C=5N1x38=2179 =0=93 =51.5 =29.30=normal=3 HTTP/1.1 Host: hubapi.myacurite.com User-Agent: Hub/224 Connection: close GET /weatherstation/updateweatherstation?dateutc=now=updateraw=1 =24C86E06B15C=tower=00012694 =51=70.6 =29.30=normal=4 HTTP/1.1 Host: hubapi.myacurite.com User-Agent: Hub/224 Connection: close GET /weatherstation/updateweatherstation?dateutc=now=updateraw=1 =24C86E06B15C=tower=8384 =34=81.4 =29.30=normal=2 HTTP/1.1 Host: hubapi.myacurite.com User-Agent: Hub/224 Connection: close *sudo tcpflow -C -s tcp dst port 80 | ./combine-lines.pl* tcpflow: listening on eth0 dateutc=now=updateraw=1=24C86E06B15C=tower=8384=34=81.4=29.30=normal=2 dateutc=now=updateraw=1=24C86E06B15C=tower=00012694=51=70.6=29.30=normal=4 dateutc=now=updateraw=1=24C86E06B15C=5N1x31=2179=0=90=0.00=0.00=93=51.5=49=29.30=normal=3 ID=KCATHOUS110=dateutc=now=updateraw=1=36=24C86E06B15C=5N1x31=2179=0=90=0.00=0.00=93=51.5=49=29.30=normal=3 dateutc=now=updateraw=1=24C86E06B15C=5N1x38=2179=0=93=51.4=29.30=normal=3 *syslog:* Nov 6 00:00:35 weather weewx[19425]: interceptor: ServerThread: POST: dateutc=now=updateraw=1=24C86E06B15C=5N1x31=2179=0=180=0.00=0.00=95=51.4=50=29.30=normal=3 Nov 6 00:00:35 weather weewx[19425]: interceptor: MainThread: raw data: dateutc=now=updateraw=1=24C86E06B15C=5N1x31=2179=0=180=0.00=0.00=95=51.4=50=29.30=normal=3 Nov 6 00:00:35 weather weewx[19425]: interceptor: MainThread: ignored parameter realtime=1 Nov 6 00:00:35 weather weewx[19425]: interceptor: MainThread: ignored parameter dewptf=50 Nov 6 00:00:35 weather weewx[19425]: interceptor: MainThread: ignored parameter rainin=0.00 Nov 6 00:00:35 weather weewx[19425]: interceptor: MainThread: ignored parameter action=updateraw Nov 6 00:00:35 weather weewx[19425]: interceptor: MainThread: raw packet: {'sensor_type.2179.24C86E06B15C': '5N1x31', 'sensor_id.2179.24C86E06B15C': '2179', 'winddir.2179.24C86E06B15C': 180.0, 'temperature.2179.24C86E06B15C': 51.4, 'rssi.2179.24C86E06B15C': 0.75, 'usUnits.2179.24C86E06B15C': 1, 'battery.2179.24C86E06B15C': 0, 'rainfall.2179.24C86E06B15C': 0.0, 'dateTime.2179.24C86E06B15C': 1478415635, 'bridge_id.2179.24C86E06B15C': '24C86E06B15C', 'barometer.2179.24C86E06B15C': 29.3, 'dateTime': 1478415635, 'windspeed.2179.24C86E06B15C': 0.0, 'humidity.2179.24C86E06B15C': 95.0, 'usUnits': 1} Nov 6 00:00:35 weather weewx[19425]: interceptor: MainThread: mapped packet: {'barometer': 29.3, 'outHumidity': 95.0, 'rain': 0.0, 'dateTime': 1478415635, 'windDir': 180.0, 'outTemp': 51.4, 'windSpeed': 0.0, 'usUnits': 1} Nov 6 00:00:35 weather weewx[19425]: interceptor: ServerThread: POST: ID=KCATHOUS110==now=updateraw=1=36=24C86E06B15C=5N1x31=2179=0=180=0.00=0.00=95=51.4=50=29.30=normal=3 Nov 6 00:00:35 weather weewx[19425]: interceptor: MainThread: raw data: ID=KCATHOUS110==now=updateraw=1=36=24C86E06B15C=5N1x31=2179=0=180=0.00=0.00=95=51.4=50=29.30=normal=3 Nov 6 00:00:35 weather weewx[19425]: interceptor: MainThread: ignored parameter realtime=1 Nov 6 00:00:35 weather weewx[19425]: interceptor: MainThread: ignored parameter dewptf=50 Nov 6 00:00:35 weather weewx[19425]: interceptor: MainThread: ignored parameter rainin=0.00 Nov 6 00:00:35 weather weewx[19425]: interceptor: MainThread: ignored parameter rtfreq=36 Nov 6 00:00:35 weather weewx[19425]: interceptor: MainThread: ignored parameter action=updateraw Nov 6 00:00:35 weather weewx[19425]: interceptor: MainThread: ignored parameter PASSWORD= Nov 6 00:00:35 weather weewx[19425]: interceptor: MainThread: ignored parameter ID=KCATHOUS110 Nov 6 00:00:35 weather weewx[19425]: interceptor: MainThread: raw packet: {'sensor_type.2179.24C86E06B15C': '5N1x31', 'sensor_id.2179.24C86E06B15C': '2179',
[weewx-user] Re: Interceptor Driver - rainin dailyrain - Acurite 5 in 1
Hey Matt, This is in syslog when the tcpdump chokes... Nov 5 18:58:55 weather weewx[2574]: interceptor: MainThread: parse failed for dateutc=now=updateraw=1=24C86E06B15C=tower=8384=31=81.4=29.28=normal=2#012dateutc=now=updateraw=1^=24C86E06B15C=tower=00012694^=48=71.9^=29.28=normal=3^: dictionary update sequence element #10 has length 3; 2 is required Nov 5 18:58:55 weather weewx[2574]: engine: Main loop exiting. Shutting engine down. Nov 5 18:58:55 weather weewx[2574]: engine: Shutting down StdReport thread Nov 5 18:58:55 weather weewx[2574]: engine: StdReport thread has been terminated Nov 5 18:58:55 weather weewx[2574]: interceptor: MainThread: shutting down server thread Nov 5 18:58:55 weather weewx[2574]: engine: Caught unrecoverable exception in engine: Nov 5 18:58:55 weather weewx[2574]: 'dateTime' Nov 5 18:58:55 weather weewx[2574]: Traceback (most recent call last): Nov 5 18:58:55 weather weewx[2574]: File "/home/weewx/bin/weewx/engine.py", line 844, in main Nov 5 18:58:55 weather weewx[2574]: engine.run() Nov 5 18:58:55 weather weewx[2574]: File "/home/weewx/bin/weewx/engine.py", line 186, in run Nov 5 18:58:55 weather weewx[2574]: for packet in self.console.genLoopPackets(): Nov 5 18:58:55 weather weewx[2574]: File "/home/weewx/bin/user/interceptor.py", line 1447, in genLoopPackets Nov 5 18:58:55 weather weewx[2574]: pkt = self._device.parser.parse(data) Nov 5 18:58:55 weather weewx[2574]: File "/home/weewx/bin/user/interceptor.py", line 477, in parse Nov 5 18:58:55 weather weewx[2574]: return self.parse_wu(s) Nov 5 18:58:55 weather weewx[2574]: File "/home/weewx/bin/user/interceptor.py", line 513, in parse_wu Nov 5 18:58:55 weather weewx[2574]: return self.add_identifiers(pkt) Nov 5 18:58:55 weather weewx[2574]: File "/home/weewx/bin/user/interceptor.py", line 568, in add_identifiers Nov 5 18:58:56 weather weewx[2574]: packet = {'dateTime': pkt['dateTime'], 'usUnits': pkt['usUnits']} Nov 5 18:58:56 weather weewx[2574]: KeyError: 'dateTime' Nov 5 18:58:56 weather weewx[2574]: Exiting. to get going again, I have to restart weewx completely... sudo service weewx restart -Brad On Saturday, November 5, 2016 at 7:02:50 PM UTC-7, Brad Tucker wrote: > > Hello Matt, > > Things seem to go ok for a few min but then the tcpdump stops going. It > just holds and displays nothing more... It probably gets 50 or 60 of the > "success": 1, "checkversion": "126" messages... We are getting really > close. Still havnt seen the rain show up in the graphed plots but the logs > for the 5N1 have rain entries in the POST statement. > > > > sudo tcpdump -Anpl -s0 -w - -i eth0 dst port 80 | stdbuf -oL strings -n5 | > ./combine-lines.pl | xargs -n 1 curl http://192.168.1.7:8080 -s -d > tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size > 262144 bytes > { "success": 1, "checkversion": "126" }{ "success": 1, "checkversion": > "126" }{ "success": 1, "checkversion": "126" }{ "success": 1, > "checkversion": "126" }{ "success": 1, "checkversion": "126" }{ "success": > 1, "checkversion": "126" }{ "success": 1, "checkversion": "126" }{ > "success": 1, "checkversion": "126" }{ "success": 1, "checkversion": "126" > }{ "success": 1, "checkversion": "126" }{ "success": 1, "checkversion": > "126" }{ "success": 1, "checkversion": "126" }{ "success": 1, > "checkversion": "126" }{ "success": 1, "checkversion": "126" }{ "success": > 1, "checkversion": "126" }{ "success": 1, "checkversion": "126" }{ > "success": 1, "checkversion": "126" } > > > tail -f /var/log/syslog |grep POST > > pi@weather:/home/weewx $ tail -f /var/log/syslog |grep POST > Nov 5 18:56:31 weather weewx[2574]: interceptor: ServerThread: POST: > dateutc=now=updateraw=1=24C86E06B15C=5N1x38=2179=0=86=59.0=29.28=normal=3 > Nov 5 18:56:40 weather weewx[2574]: interceptor: ServerThread: POST: > dateutc=now=updateraw=1=24C86E06B15C=tower=00012694=48=71.9=29.28=normal=3 > Nov 5 18:56:44 weather weewx[2574]: interceptor: ServerThread: POST: > dateutc=now=updateraw=1=24C86E06B15C=tower=8384=31=
[weewx-user] Re: Interceptor Driver - rainin dailyrain - Acurite 5 in 1
', 'weewx.cheetahgenerator.Station', 'weewx.cheetahgenerator.Stats', 'weewx.cheetahgenerator.UnitInfo', 'weewx.cheetahgenerator.Extras'] Nov 5 18:45:25 weather weewx[2331]: interceptor: ServerThread: POST: dateutc=now=updateraw=14=24C86E06B15C=tower=000126944=48=71.94=29.28=normal=34 Nov 5 18:45:25 weather weewx[2331]: interceptor: MainThread: raw data: dateutc=now=updateraw=14=24C86E06B15C=tower=000126944=48=71.94=29.28=normal=34 Nov 5 18:45:25 weather weewx[2331]: interceptor: MainThread: ignored parameter realtime=14 Nov 5 18:45:25 weather weewx[2331]: interceptor: MainThread: ignored parameter action=updateraw Nov 5 18:45:25 weather weewx[2331]: interceptor: MainThread: raw packet: {'barometer.000126944.24C86E06B15C': 29.28, 'sensor_id.000126944.24C86E06B15C': '000126944', 'dateTime.000126944.24C86E06B15C': 1478396725, 'usUnits.000126944.24C86E06B15C': 1, 'rssi.000126944.24C86E06B15C': 8.5, 'bridge_id.000126944.24C86E06B15C': '24C86E06B15C', 'dateTime': 1478396725, 'humidity.000126944.24C86E06B15C': 48.0, 'sensor_type.000126944.24C86E06B15C': 'tower', 'battery.000126944.24C86E06B15C': 0, 'usUnits': 1, 'temperature.000126944.24C86E06B15C': 71.94} Nov 5 18:45:25 weather weewx[2331]: interceptor: MainThread: mapped packet: {'barometer': 29.28, 'usUnits': 1, 'dateTime': 1478396725} Nov 5 18:45:32 weather weewx[2331]: interceptor: ServerThread: POST: dateutc=now=updateraw=1;=24C86E06B15C=tower=8384;=31=81.1<=29.28=normal=2< Nov 5 18:45:32 weather weewx[2331]: interceptor: MainThread: raw data: dateutc=now=updateraw=1;=24C86E06B15C=tower=8384;=31=81.1<=29.28=normal=2< Nov 5 18:45:32 weather weewx[2331]: interceptor: MainThread: parse failed for dateutc=now=updateraw=1;=24C86E06B15C=tower=8384;=31=81.1<=29.28=normal=2<: invalid literal for float(): 81.1< Nov 5 18:45:32 weather weewx[2331]: interceptor: MainThread: raw packet: {'usUnits..': 1, 'dateTime..': 1478396732, 'usUnits': 1, 'dateTime': 1478396732} Nov 5 18:45:32 weather weewx[2331]: interceptor: MainThread: mapped packet: {'usUnits': 1, 'dateTime': 1478396732} Nov 5 18:45:35 weather weewx[2331]: interceptor: ServerThread: POST: dateutc=now=updateraw=1>=24C86E06B15C=5N1x31=2179>=0=45>=0.00=0.20=85=59.9=55>=29.28=normal=3> Nov 5 18:45:35 weather weewx[2331]: interceptor: MainThread: raw data: dateutc=now=updateraw=1>=24C86E06B15C=5N1x31=2179>=0=45>=0.00=0.20=85=59.9=55>=29.28=normal=3> Nov 5 18:45:35 weather weewx[2331]: interceptor: MainThread: ignored parameter realtime=1> Nov 5 18:45:35 weather weewx[2331]: interceptor: MainThread: unrecognized parameter dewptf=55> Nov 5 18:45:35 weather weewx[2331]: interceptor: MainThread: ignored parameter rainin=0.00 Nov 5 18:45:35 weather weewx[2331]: interceptor: MainThread: parse failed for dateutc=now=updateraw=1>=24C86E06B15C=5N1x31=2179>=0=45>=0.00=0.20=85=59.9=55>=29.28=normal=3>: invalid literal for float(): 45> Nov 5 18:45:35 weather weewx[2331]: interceptor: MainThread: skipping rain measurement of 0.2: no last rain Nov 5 18:45:35 weather weewx[2331]: interceptor: MainThread: raw packet: {'dateTime': 1478396735, 'usUnits..': 1, 'temperature..': 59.9, 'windspeed..': 0.0, 'dateTime..': 1478396735, 'usUnits': 1, 'rainfall..': None, 'barometer..': 29.28} Nov 5 18:45:35 weather weewx[2331]: interceptor: MainThread: mapped packet: {'barometer': 29.28, 'inTemp': 59.9, 'usUnits': 1, 'dateTime': 1478396735} Nov 5 18:45:35 weather weewx[2331]: interceptor: ServerThread: POST: ID=KCATHOUS110==now=updateraw=1>=36>=24C86E06B15C=5N1x31=00002179>=0=45>=0.00=0.20=85=59.9=55>=29.28=normal=3> Nov 5 18:45:35 weather weewx[2331]: interceptor: MainThread: raw data: ID=KCATHOUS110==now=updateraw=1>=36>=24C86E06B15C=5N1x31=2179>=0=45>=0.00=0.20=85=59.9=55>=29.28=normal=3> I did notice some of the posts that have the Weather Underground PASSWORD have in them. I wrote out the one that had the password with . Not sure if you where hiding it in the logs or if something else is going on... Thanks, Brad On Saturday, November 5, 2016 at 5:21:00 PM UTC-7, mwall wrote: > > On Saturday, November 5, 2016 at 8:06:26 PM UTC-4, Brad Tucker wrote: >> >> Unfortunately once I add curl into the mix nothing happens: >> > > so close! i'll bet the perl script is buffering. > > try putting this after the 'use strict' line in the perl script: > > $| = 1; > > (that is supposed to be the 'less cryptic' way of doing it! gotta love > perl :) > > m > -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[weewx-user] Re: Interceptor Driver - rainin dailyrain - Acurite 5 in 1
and a raw tcpdump: sudo tcpdump -Anpl -s0 -w - -i eth0 dst port 80 | stdbuf -oL strings -n8 pi@weather:~ $ sudo tcpdump -Anpl -s0 -w - -i eth0 dst port 80 | stdbuf -oL strings -n8 tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes GET /weatherstation/updateweatherstation?dateutc=now=updateraw=1 =24C86E06B15C=5N1x31=2179 =1=293 =0.00=0.20=55=71.1=54 =29.29=normal=3 HTTP/1.1 hubapi.myacurite.com User-Agent: Hub/224 Connection: close GET /weatherstation/updateweatherstation.php?ID=KCATHOUS110==now=updateraw=1 =36 =24C86E06B15C=5N1x31=2179 =1=293 =0.00=0.20=55=71.1=54 =29.29=normal=3 HTTP/1.1 rtupdate.wunderground.com Connection: close GET /weatherstation/updateweatherstation?dateutc=now=updateraw=1 =24C86E06B15C=tower=8384 =30=80.0 =29.29=normal=2 HTTP/1.1 hubapi.myacurite.com User-Agent: Hub/224 Connection: close GET /weatherstation/updateweatherstation?dateutc=now=updateraw=1 =24C86E06B15C=tower=00012694 =45=71.5 =29.29=normal=3 HTTP/1.1 hubapi.myacurite.com User-Agent: Hub/224 Connection: close ^C58 packets captured 58 packets received by filter 0 packets dropped by kernel > > > > On Saturday, November 5, 2016 at 4:28:20 PM UTC-7, Brad Tucker wrote: >> >> Here is the dump.txt >> >> On Saturday, November 5, 2016 at 4:23:22 PM UTC-7, mwall wrote: >>> >>> On Saturday, November 5, 2016 at 6:47:45 PM UTC-4, Brad Tucker wrote: >>>> >>>> this is looking yummy :) >>>> >>>>> >>>>> >>> getting close. i don't know where the spurious l_, q_ etc are coming >>> from in your tcpdump output, and i am unable to duplicate the behavior. >>> could you send the tcpdump output to file and post that file? >>> >>> sudo tcpdump -Anpl -s0 -w - -i eth0 dst port 80 > dump.txt >>> >>> meanwhile, i tightened up the combiner a bit. please try version 0.2 of >>> combine-lines.pl from the interceptor repository: >>> >>> >>> https://raw.githubusercontent.com/matthewwall/weewx-interceptor/master/util/combine-lines.pl >>> >>> that should prevent the hostnames from being appended to the cgi args >>> >>> m >>> >> -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[weewx-user] Re: Interceptor Driver - rainin dailyrain - Acurite 5 in 1
Here is the latest out put with the new combine.pl. I rebooted the pi as I was getting strange outputs as well. Once I reboot this new output was looking mighty fine... -B pi@weather:~ $ sudo tcpdump -Anpl -s0 -w - -i eth0 dst port 80 | stdbuf -oL strings -n8 | ./combine.pl tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes dateutc=now=updateraw=1=24C86E06B15C=5N1x38=2179=0=51=71.9=29.29=normal=2hubapi.myacurite.com dateutc=now=updateraw=1=24C86E06B15C=tower=8384=30=79.6=29.29=normal=2hubapi.myacurite.com dateutc=now=updateraw=1=24C86E06B15C=5N1x31=2179=0=90=0.00=0.20=51=71.9=53=29.29=normal=3hubapi.myacurite.com ID=KCATHOUS110==now=updateraw=1=36=24C86E06B15C=5N1x31=2179=0=90=0.00=0.20=51=71.9=53=29.29=normal=3rtupdate.wunderground.com dateutc=now=updateraw=1=24C86E06B15C=tower=00012694=45=71.2=29.29=normal=3hubapi.myacurite.com dateutc=now=updateraw=1=24C86E06B15C=tower=8384=30=79.8=29.29=normal=2hubapi.myacurite.com dateutc=now=updateraw=1=24C86E06B15C=5N1x38=2179=0=51=71.9=29.29=normal=2hubapi.myacurite.com dateutc=now=updateraw=1=24C86E06B15C=tower=00012694=45=71.2=29.29=normal=3hubapi.myacurite.com dateutc=now=updateraw=1=24C86E06B15C=tower=8384=30=79.8=29.29=normal=2hubapi.myacurite.com ^C131 packets captured 131 packets received by filter 0 packets dropped by kernel On Saturday, November 5, 2016 at 4:28:20 PM UTC-7, Brad Tucker wrote: > > Here is the dump.txt > > On Saturday, November 5, 2016 at 4:23:22 PM UTC-7, mwall wrote: >> >> On Saturday, November 5, 2016 at 6:47:45 PM UTC-4, Brad Tucker wrote: >>> >>> this is looking yummy :) >>> >>>> >>>> >> getting close. i don't know where the spurious l_, q_ etc are coming >> from in your tcpdump output, and i am unable to duplicate the behavior. >> could you send the tcpdump output to file and post that file? >> >> sudo tcpdump -Anpl -s0 -w - -i eth0 dst port 80 > dump.txt >> >> meanwhile, i tightened up the combiner a bit. please try version 0.2 of >> combine-lines.pl from the interceptor repository: >> >> >> https://raw.githubusercontent.com/matthewwall/weewx-interceptor/master/util/combine-lines.pl >> >> that should prevent the hostnames from being appended to the cgi args >> >> m >> > -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[weewx-user] Re: Interceptor Driver - rainin dailyrain - Acurite 5 in 1
Here is the dump.txt On Saturday, November 5, 2016 at 4:23:22 PM UTC-7, mwall wrote: > > On Saturday, November 5, 2016 at 6:47:45 PM UTC-4, Brad Tucker wrote: >> >> this is looking yummy :) >> >>> >>> > getting close. i don't know where the spurious l_, q_ etc are coming from > in your tcpdump output, and i am unable to duplicate the behavior. could > you send the tcpdump output to file and post that file? > > sudo tcpdump -Anpl -s0 -w - -i eth0 dst port 80 > dump.txt > > meanwhile, i tightened up the combiner a bit. please try version 0.2 of > combine-lines.pl from the interceptor repository: > > > https://raw.githubusercontent.com/matthewwall/weewx-interceptor/master/util/combine-lines.pl > > that should prevent the hostnames from being appended to the cgi args > > m > -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. Ôò¡ GjX+û <