weewx interceptor with acurite and raspberry not working.

855 views
Skip to first unread message

Eddie Lent

unread,
Aug 31, 2017, 2:28:44 PM8/31/17
to weewx-user
I my set up is an acurite smarthub, a raspberry pi 1 running weewx and weewx-interceptor in sniff mode, port mirroring using netgear GS105Ev2.  

I can't seem to get data into weewx.
I can run tcpdump on my router and see the packets. I can run tcpdump on the raspberry pi and see packets.

but I am not getting any data into weewx:

from weewx.conf:
[Interceptor]
    # This section is for the network traffic interceptor driver.

    # The driver to use:
    driver = user.interceptor

    # Specify the hardware device to capture.  Options include:
    #   acurite-bridge - acurite internet bridge
    #   observer - fine offset WH2600/HP1000/HP1003, aka 'observer'
    #   lw30x - oregon scientific LW301/LW302
    #   lacrosse-bridge - lacrosse GW1000U/C84612 internet bridge
    device_type = acurite-bridge
mode = sniff
iface = eth0
pcap_filter = src 192.168.5.230 and dst port 80


pi@raspberrypiFB:~ $ tcpdump --version
tcpdump version 4.9.0
libpcap version 1.6.2
OpenSSL 1.0.1t  3 May 2016

If I run this line while I watch tcpdump on my router to ensure acurite packets have been sent, I get nothing.

pi@raspberrypiFB:~ $ sudo PYTHONPATH=/usr/share/weewx python /usr/share/weewx/user/interceptor.py --device=acurite-bridge --mode=sniff --iface=eth0 --filter="dst port 80"
^CTraceback (most recent call last):
  File "/usr/share/weewx/user/interceptor.py", line 2060, in <module>
    _data = device.get_queue().get(True, 10)
  File "/usr/lib/python2.7/Queue.py", line 177, in get
    self.not_empty.wait(remaining)
  File "/usr/lib/python2.7/threading.py", line 359, in wait
    _sleep(delay)
KeyboardInterrupt
Exception in thread ServerThread (most likely raised during interpreter shutdown):
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
  File "/usr/lib/python2.7/threading.py", line 763, in run
  File "/usr/share/weewx/user/interceptor.py", line 285, in run_server
  File "/usr/share/weewx/user/interceptor.py", line 320, in run
  File "/usr/lib/python2.7/dist-packages/pcap.py", line 116, in dispatch
<type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'pcapObject_dispatch'


Here is a tcpdump run:

pi@raspberrypiFB:~ $ sudo tcpdump  -U -i eth0 src 192.168.5.230 and port 80
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
14:12:28.859374 IP Acurite.1978 > ec2-52-22-110-201.compute-1.amazonaws.com.http: Flags [S], seq 241058131, win 400, options [mss 536], length 0
14:12:28.887870 IP Acurite.1978 > ec2-52-22-110-201.compute-1.amazonaws.com.http: Flags [.], ack 912225648, win 400, length 0
14:12:28.889708 IP Acurite.1978 > ec2-52-22-110-201.compute-1.amazonaws.com.http: Flags [P.], seq 0:80, ack 1, win 400, length 80: HTTP: GET /weatherstation/updateweatherstation?dateutc=now&action=updateraw&realtime=1[!http]
14:12:28.920267 IP Acurite.1978 > ec2-52-22-110-201.compute-1.amazonaws.com.http: Flags [P.], seq 80:122, ack 1, win 400, length 42: HTTP
14:12:28.922539 IP Acurite.1978 > ec2-52-22-110-201.compute-1.amazonaws.com.http: Flags [P.], seq 122:149, ack 1, win 400, length 27: HTTP
14:12:28.924796 IP Acurite.1978 > ec2-52-22-110-201.compute-1.amazonaws.com.http: Flags [P.], seq 149:160, ack 1, win 400, length 11: HTTP
14:12:28.931672 IP Acurite.1978 > ec2-52-22-110-201.compute-1.amazonaws.com.http: Flags [P.], seq 160:196, ack 1, win 400, length 36: HTTP
14:12:28.957005 IP Acurite.1978 > ec2-52-22-110-201.compute-1.amazonaws.com.http: Flags [P.], seq 80:196, ack 1, win 400, length 116: HTTP
14:12:28.961918 IP Acurite.1978 > ec2-52-22-110-201.compute-1.amazonaws.com.http: Flags [P.], seq 196:213, ack 1, win 400, length 17: HTTP
14:12:28.963793 IP Acurite.1978 > ec2-52-22-110-201.compute-1.amazonaws.com.http: Flags [P.], seq 213:254, ack 1, win 400, length 41: HTTP
14:12:28.965296 IP Acurite.1978 > ec2-52-22-110-201.compute-1.amazonaws.com.http: Flags [P.], seq 254:277, ack 1, win 400, length 23: HTTP
14:12:29.006661 IP Acurite.1978 > ec2-52-22-110-201.compute-1.amazonaws.com.http: Flags [.], ack 401, win 400, length 0
14:12:29.032033 IP Acurite.1978 > ec2-52-22-110-201.compute-1.amazonaws.com.http: Flags [.], ack 413, win 389, length 0
14:12:29.033168 IP Acurite.1978 > ec2-52-22-110-201.compute-1.amazonaws.com.http: Flags [.], ack 413, win 400, length 0
14:12:29.034156 IP Acurite.1978 > ec2-52-22-110-201.compute-1.amazonaws.com.http: Flags [F.], seq 277, ack 413, win 400, length 0
14:12:29.034827 IP Acurite.1978 > ec2-52-22-110-201.compute-1.amazonaws.com.http: Flags [R.], seq 277, ack 413, win 400, length 0
^C
16 packets captured
17 packets received by filter
0 packets dropped by kernel

nothing is coming out of combine-lines.pl when I try it:
sudo tcpdump  -A -U -w - -i eth0 src 192.168.5.230 and port 80 | /etc/weewx/weewx-interceptor-master/util/combine/combine-lines.pl
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
^C1922 packets captured
1922 packets received by filter
0 packets dropped by kernel

Is tcpdump getting all the packet?  It seems like only part of the line is there.
 I assume I am missing something obvious, but I am quite frustrated and don't know what to try next.
Thanks!

Eddie Lent

unread,
Aug 31, 2017, 2:40:30 PM8/31/17
to weewx-user
While I was rerunning all those commands for my post, here is my syslog:

It appears that, it all of the sudden started getting packets while I was running the tests.  You can see that weewx started up 5.5 hours before it started getting data from interceptor.

Aug 31 07:59:45 raspberrypiFB weewx[456]: engine: Locale is 'en_GB.UTF-8'
Aug 31 07:59:45 raspberrypiFB weewx[456]: engine: pid file is /var/run/weewx.pid
Aug 31 07:59:45 raspberrypiFB weewx[362]: Starting weewx weather system: weewx.
Aug 31 07:59:45 raspberrypiFB systemd[1]: Started LSB: weewx weather system.
Aug 31 07:59:45 raspberrypiFB weewx[559]: engine: Using configuration file /etc/weewx/weewx.conf
Aug 31 07:59:45 raspberrypiFB weewx[559]: engine: Loading station type Interceptor (user.interceptor)
Aug 31 07:59:45 raspberrypiFB weewx[559]: interceptor: MainThread: driver version is 0.30
Aug 31 07:59:45 raspberrypiFB weewx[559]: interceptor: MainThread: device type: acurite-bridge
Aug 31 07:59:45 raspberrypiFB weewx[559]: interceptor: MainThread: sensor map: None
Aug 31 07:59:45 raspberrypiFB weewx[559]: interceptor: MainThread: mode is sniff
Aug 31 07:59:45 raspberrypiFB weewx[559]: interceptor: MainThread: sniff iface=eth0 promiscuous=0
Aug 31 07:59:45 raspberrypiFB weewx[559]: interceptor: MainThread: sniff filter 'src 192.168.5.230 and dst port 80'
Aug 31 07:59:45 raspberrypiFB weewx[559]: engine: StdConvert target unit is 0x1
Aug 31 07:59:45 raspberrypiFB weewx[559]: wxcalculate: The following values will be calculated: barometer=prefer_hardware, windchill=prefer_hardware, dewpoint=prefer_hardware, appTemp=prefer_hardware, rainRate=prefer_hardware, windrun=prefer_hardware, heatindex=prefer_hardware, maxSolarRad=prefer_hardware, humidex=prefer_hardware, pressure=prefer_hardware, inDewpoint=prefer_hardware, ET=prefer_hardware, altimeter=prefer_hardware, cloudbase=prefer_hardware
Aug 31 07:59:45 raspberrypiFB weewx[559]: wxcalculate: The following algorithms will be used for calculations: altimeter=aaNOAA, maxSolarRad=RS
Aug 31 07:59:45 raspberrypiFB weewx[559]: engine: Archive will use data binding wx_binding
Aug 31 07:59:45 raspberrypiFB weewx[559]: engine: Record generation will be attempted in 'hardware'
Aug 31 07:59:45 raspberrypiFB weewx[559]: engine: Using archive interval of 300 seconds (specified in weewx configuration)
Aug 31 07:59:45 raspberrypiFB weewx[559]: engine: Using binding 'wx_binding' to database 'weewx.sdb'
Aug 31 07:59:45 raspberrypiFB weewx[559]: manager: Starting backfill of daily summaries
Aug 31 07:59:46 raspberrypiFB weewx[559]: restx: StationRegistry: Station will not be registered: no station_url specified.
Aug 31 07:59:46 raspberrypiFB weewx[559]: restx: Wunderground: Posting not enabled.
Aug 31 07:59:46 raspberrypiFB weewx[559]: restx: PWSweather: Posting not enabled.
Aug 31 07:59:46 raspberrypiFB weewx[559]: restx: CWOP: Data for station FW1491 will be posted
Aug 31 07:59:46 raspberrypiFB weewx[559]: restx: WOW: Posting not enabled.
Aug 31 07:59:46 raspberrypiFB weewx[559]: restx: AWEKAS: Posting not enabled.
Aug 31 07:59:46 raspberrypiFB weewx[559]: engine: Starting up weewx version 3.7.1
Aug 31 07:59:46 raspberrypiFB weewx[559]: engine: Starting main packet loop.
Aug 31 13:21:41 raspberrypiFB weewx[559]: interceptor: MainThread: skipping rain measurement of 0.3: no last rain
Aug 31 13:21:41 raspberrypiFB weewx[559]: engine: garbage collected 0 objects
Aug 31 13:21:41 raspberrypiFB weewx[559]: engine: Launch of report thread aborted: existing report thread still running
Aug 31 13:21:59 raspberrypiFB weewx[559]: engine: Launch of report thread aborted: existing report thread still running
Aug 31 13:22:01 raspberrypiFB weewx[559]: cheetahgenerator: Generated 14 files for report StandardReport in 18.81 seconds
Aug 31 13:22:04 raspberrypiFB weewx[559]: imagegenerator: Generated 12 images for StandardReport in 2.66 seconds
Aug 31 13:22:04 raspberrypiFB weewx[559]: copygenerator: copied 9 files to /var/www/html/weewx
Aug 31 13:22:18 raspberrypiFB weewx[559]: engine: Launch of report thread aborted: existing report thread still running
Aug 31 13:22:24 raspberrypiFB weewx[559]: cheetahgenerator: Generated 14 files for report StandardReport in 6.47 seconds
Aug 31 13:22:27 raspberrypiFB weewx[559]: imagegenerator: Generated 12 images for StandardReport in 2.56 seconds
Aug 31 13:22:27 raspberrypiFB weewx[559]: copygenerator: copied 0 files to /var/www/html/weewx
Aug 31 13:22:42 raspberrypiFB weewx[559]: cheetahgenerator: Generated 14 files for report StandardReport in 6.42 seconds
Aug 31 13:22:45 raspberrypiFB weewx[559]: imagegenerator: Generated 12 images for StandardReport in 2.56 seconds
Aug 31 13:22:45 raspberrypiFB weewx[559]: copygenerator: copied 0 files to /var/www/html/weewx
Aug 31 13:22:54 raspberrypiFB weewx[559]: engine: Launch of report thread aborted: existing report thread still running
Aug 31 13:23:01 raspberrypiFB weewx[559]: cheetahgenerator: Generated 14 files for report StandardReport in 6.48 seconds
Aug 31 13:23:03 raspberrypiFB weewx[559]: imagegenerator: Generated 12 images for StandardReport in 2.63 seconds
Aug 31 13:23:03 raspberrypiFB weewx[559]: copygenerator: copied 0 files to /var/www/html/weewx
Aug 31 13:23:19 raspberrypiFB weewx[559]: cheetahgenerator: Generated 14 files for report StandardReport in 6.42 seconds
Aug 31 13:23:21 raspberrypiFB weewx[559]: imagegenerator: Generated 12 images for StandardReport in 2.63 seconds

Andrew Milner

unread,
Aug 31, 2017, 9:16:12 PM8/31/17
to weewx-user
The log shows that you appear to have multiple copies of weewx running - with PID of 456, 362 and 559.  Although the process with PID of 559 appears to be running, it is still aborting a report run since it believes another report process is running.

Can I suggest you ensure only one copy of weewx is actually running (reboot if necessary) - and post the log from reboot to first archive interval

Eddie Lent

unread,
Sep 7, 2017, 10:18:52 AM9/7/17
to weewx-user
Here is the syslog from right after a reboot.  After waiting 20 min, I do not see any new data in weewx webpage after the reboot.

Sep  7 09:45:56 raspberrypiFB systemd[1]: Starting LSB: weewx weather system...
Sep  7 09:46:00 raspberrypiFB weewx[450]: engine: Initializing weewx version 3.7.1
Sep  7 09:46:00 raspberrypiFB weewx[450]: engine: Using Python 2.7.9 (default, Sep 17 2016, 20:26:04) #012[GCC 4.9.2]
Sep  7 09:46:00 raspberrypiFB weewx[450]: engine: Platform Linux-4.9.28+-armv6l-with-debian-8.0
Sep  7 09:46:00 raspberrypiFB weewx[450]: engine: Locale is 'en_GB.UTF-8'
Sep  7 09:46:00 raspberrypiFB weewx[450]: engine: pid file is /var/run/weewx.pid
Sep  7 09:46:00 raspberrypiFB weewx[364]: Starting weewx weather system: weewx.
Sep  7 09:46:00 raspberrypiFB systemd[1]: Started LSB: weewx weather system.
Sep  7 09:46:00 raspberrypiFB weewx[559]: engine: Using configuration file /etc/weewx/weewx.conf
Sep  7 09:46:00 raspberrypiFB weewx[559]: engine: Loading station type Interceptor (user.interceptor)
Sep  7 09:46:00 raspberrypiFB weewx[559]: interceptor: MainThread: driver version is 0.30
Sep  7 09:46:00 raspberrypiFB weewx[559]: interceptor: MainThread: device type: acurite-bridge
Sep  7 09:46:00 raspberrypiFB weewx[559]: interceptor: MainThread: sensor map: None
Sep  7 09:46:00 raspberrypiFB weewx[559]: interceptor: MainThread: mode is sniff
Sep  7 09:46:00 raspberrypiFB weewx[559]: interceptor: MainThread: sniff iface=eth0 promiscuous=0
Sep  7 09:46:00 raspberrypiFB weewx[559]: interceptor: MainThread: sniff filter 'src 192.168.5.230 and dst port 80'
Sep  7 09:46:00 raspberrypiFB weewx[559]: engine: StdConvert target unit is 0x1
Sep  7 09:46:00 raspberrypiFB weewx[559]: wxcalculate: The following values will be calculated: barometer=prefer_hardware, windchill=prefer_hardware, dewpoint=prefer_hardware, appTemp=prefer_hardware, rainRate=prefer_hardware, windrun=prefer_hardware, heatindex=prefer_hardware, maxSolarRad=prefer_hardware, humidex=prefer_hardware, pressure=prefer_hardware, inDewpoint=prefer_hardware, ET=prefer_hardware, altimeter=prefer_hardware, cloudbase=prefer_hardware
Sep  7 09:46:00 raspberrypiFB weewx[559]: wxcalculate: The following algorithms will be used for calculations: altimeter=aaNOAA, maxSolarRad=RS
Sep  7 09:46:00 raspberrypiFB weewx[559]: engine: Archive will use data binding wx_binding
Sep  7 09:46:00 raspberrypiFB weewx[559]: engine: Record generation will be attempted in 'hardware'
Sep  7 09:46:00 raspberrypiFB weewx[559]: engine: Using archive interval of 300 seconds (specified in weewx configuration)
Sep  7 09:46:00 raspberrypiFB weewx[559]: engine: Using binding 'wx_binding' to database 'weewx.sdb'
Sep  7 09:46:00 raspberrypiFB weewx[559]: manager: Starting backfill of daily summaries
Sep  7 09:46:01 raspberrypiFB weewx[559]: restx: StationRegistry: Station will not be registered: no station_url specified.
Sep  7 09:46:01 raspberrypiFB weewx[559]: restx: Wunderground: Posting not enabled.
Sep  7 09:46:01 raspberrypiFB weewx[559]: restx: PWSweather: Posting not enabled.
Sep  7 09:46:01 raspberrypiFB weewx[559]: restx: CWOP: Data for station FW1491 will be posted
Sep  7 09:46:01 raspberrypiFB weewx[559]: restx: WOW: Posting not enabled.
Sep  7 09:46:01 raspberrypiFB weewx[559]: restx: AWEKAS: Posting not enabled.
Sep  7 09:46:01 raspberrypiFB weewx[559]: engine: Starting up weewx version 3.7.1
Sep  7 09:46:01 raspberrypiFB weewx[559]: engine: Starting main packet loop.
pi@raspberrypiFB:~ $ uptime
 09:49:54 up 3 min,  2 users,  load average: 0.21, 0.23, 0.10
pi@raspberrypiFB:~ $


Then at 10:11 I ran the following command in a new putty session:
pi@raspberrypiFB:~ $ sudo tcpdump  -U -w - -i eth0 src 192.168.5.230 and port 80 | /etc/weewx/weewx-interceptor-master/util/combine/combine-lines.pl
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes


I have included the tail of the syslog so you can see what happened.  weewx started hearing data and updating the webpage.


Sep  7 09:46:01 raspberrypiFB weewx[559]: restx: CWOP: Data for station FW1491 will be posted
Sep  7 09:46:01 raspberrypiFB weewx[559]: restx: WOW: Posting not enabled.
Sep  7 09:46:01 raspberrypiFB weewx[559]: restx: AWEKAS: Posting not enabled.
Sep  7 09:46:01 raspberrypiFB weewx[559]: engine: Starting up weewx version 3.7.1
Sep  7 09:46:01 raspberrypiFB weewx[559]: engine: Starting main packet loop.
Sep  7 10:11:53 raspberrypiFB weewx[559]: interceptor: MainThread: skipping rain measurement of 0.0: no last rain
Sep  7 10:11:54 raspberrypiFB weewx[559]: engine: Launch of report thread aborted: existing report thread still running
Sep  7 10:12:12 raspberrypiFB weewx[559]: engine: Launch of report thread aborted: existing report thread still running
Sep  7 10:12:14 raspberrypiFB weewx[559]: cheetahgenerator: Generated 14 files for report StandardReport in 19.55 seconds
Sep  7 10:12:17 raspberrypiFB weewx[559]: imagegenerator: Generated 12 images for StandardReport in 3.05 seconds
Sep  7 10:12:17 raspberrypiFB weewx[559]: copygenerator: copied 9 files to /var/www/html/weewx
Sep  7 10:12:30 raspberrypiFB weewx[559]: engine: Launch of report thread aborted: existing report thread still running
Sep  7 10:12:37 raspberrypiFB weewx[559]: cheetahgenerator: Generated 14 files for report StandardReport in 6.98 seconds
Sep  7 10:12:40 raspberrypiFB weewx[559]: imagegenerator: Generated 12 images for StandardReport in 3.01 seconds
Sep  7 10:12:40 raspberrypiFB weewx[559]: copygenerator: copied 0 files to /var/www/html/weewx


So did I miss something in the instructions that I need to run the tcpdump line manually or is something not happening correctly in weewx-interceptor to startup the sniffer?

mwall

unread,
Sep 7, 2017, 10:38:09 AM9/7/17
to weewx-user
On Thursday, September 7, 2017 at 10:18:52 AM UTC-4, Eddie Lent wrote:

So did I miss something in the instructions that I need to run the tcpdump line manually or is something not happening correctly in weewx-interceptor to startup the sniffer?


you're not missing anything in the instructions.  something odd indeed is at play.

what happens if you do the following:

1) restart the pi
2) wait for 10 or 15 minutes
3) login and verify that weewx is not hearing data
4) shut down weewx using '/etc/init.d/weewx stop'
5) start weewx using '/etc/init.d/weewx start'
6) wait for 10 or 15 minutes
7) see whether weewx is hearing data

this will tell us whether there is something during system startup that is preventing the sniffing, such as a network interface not being ready (but not being reported)

m

Eddie Lent

unread,
Sep 7, 2017, 3:12:15 PM9/7/17
to weewx-user
ok, here is the output, the weewx restart did not get it listening again:


Sep  7 11:56:12 raspberrypiFB systemd[1]: Starting LSB: weewx weather system...
Sep  7 11:56:16 raspberrypiFB weewx[458]: engine: Initializing weewx version 3.7.1
Sep  7 11:56:16 raspberrypiFB weewx[458]: engine: Using Python 2.7.9 (default, Sep 17 2016, 20:26:04) #012[GCC 4.9.2]
Sep  7 11:56:16 raspberrypiFB weewx[458]: engine: Platform Linux-4.9.28+-armv6l-with-debian-8.0
Sep  7 11:56:16 raspberrypiFB weewx[458]: engine: Locale is 'en_GB.UTF-8'
Sep  7 11:56:16 raspberrypiFB weewx[458]: engine: pid file is /var/run/weewx.pid
Sep  7 11:56:16 raspberrypiFB weewx[364]: Starting weewx weather system: weewx.
Sep  7 11:56:16 raspberrypiFB systemd[1]: Started LSB: weewx weather system.
Sep  7 11:56:16 raspberrypiFB weewx[560]: engine: Using configuration file /etc/weewx/weewx.conf
Sep  7 11:56:16 raspberrypiFB weewx[560]: engine: Loading station type Interceptor (user.interceptor)
Sep  7 11:56:16 raspberrypiFB weewx[560]: interceptor: MainThread: driver version is 0.30
Sep  7 11:56:16 raspberrypiFB weewx[560]: interceptor: MainThread: device type: acurite-bridge
Sep  7 11:56:16 raspberrypiFB weewx[560]: interceptor: MainThread: sensor map: None
Sep  7 11:56:16 raspberrypiFB weewx[560]: interceptor: MainThread: mode is sniff
Sep  7 11:56:16 raspberrypiFB weewx[560]: interceptor: MainThread: sniff iface=eth0 promiscuous=0
Sep  7 11:56:16 raspberrypiFB weewx[560]: interceptor: MainThread: sniff filter 'src 192.168.5.230 and dst port 80'
Sep  7 11:56:16 raspberrypiFB weewx[560]: engine: StdConvert target unit is 0x1
Sep  7 11:56:16 raspberrypiFB weewx[560]: wxcalculate: The following values will be calculated: barometer=prefer_hardware, windchill=prefer_hardware, dewpoint=prefer_hardware, appTemp=prefer_hardware, rainRate=prefer_hardware, windrun=prefer_hardware, heatindex=prefer_hardware, maxSolarRad=prefer_hardware, humidex=prefer_hardware, pressure=prefer_hardware, inDewpoint=prefer_hardware, ET=prefer_hardware, altimeter=prefer_hardware, cloudbase=prefer_hardware
Sep  7 11:56:16 raspberrypiFB weewx[560]: wxcalculate: The following algorithms will be used for calculations: altimeter=aaNOAA, maxSolarRad=RS
Sep  7 11:56:16 raspberrypiFB weewx[560]: engine: Archive will use data binding wx_binding
Sep  7 11:56:16 raspberrypiFB weewx[560]: engine: Record generation will be attempted in 'hardware'
Sep  7 11:56:16 raspberrypiFB weewx[560]: engine: Using archive interval of 300 seconds (specified in weewx configuration)
Sep  7 11:56:16 raspberrypiFB weewx[560]: engine: Using binding 'wx_binding' to database 'weewx.sdb'
Sep  7 11:56:16 raspberrypiFB weewx[560]: manager: Starting backfill of daily summaries
Sep  7 11:56:17 raspberrypiFB weewx[560]: restx: StationRegistry: Station will not be registered: no station_url specified.
Sep  7 11:56:17 raspberrypiFB weewx[560]: restx: Wunderground: Posting not enabled.
Sep  7 11:56:17 raspberrypiFB weewx[560]: restx: PWSweather: Posting not enabled.
Sep  7 11:56:17 raspberrypiFB weewx[560]: restx: CWOP: Data for station FW1491 will be posted
Sep  7 11:56:17 raspberrypiFB weewx[560]: restx: WOW: Posting not enabled.
Sep  7 11:56:17 raspberrypiFB weewx[560]: restx: AWEKAS: Posting not enabled.
Sep  7 11:56:17 raspberrypiFB weewx[560]: engine: Starting up weewx version 3.7.1
Sep  7 11:56:17 raspberrypiFB weewx[560]: engine: Starting main packet loop.
pi@raspberrypiFB:~ $ uptime
 12:11:11 up 15 min,  2 users,  load average: 0.04, 0.08, 0.07
pi@raspberrypiFB:~ $ sudo /etc/init.d/weewx status
â weewx.service - LSB: weewx weather system
   Loaded: loaded (/etc/init.d/weewx)
   Active: active (running) since Thu 2017-09-07 11:56:16 EDT; 16min ago
  Process: 364 ExecStart=/etc/init.d/weewx start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/weewx.service
           ââ560 python /usr/bin/weewxd --daemon --pidfile=/var/run/weewx.pid /etc/weewx/weewx.conf

pi@raspberrypiFB:~ $ sudo /etc/init.d/weewx stop
[ ok ] Stopping weewx (via systemctl): weewx.service.
pi@raspberrypiFB:~ $ sudo /etc/init.d/weewx start
[ ok ] Starting weewx (via systemctl): weewx.service.

then

Sep  7 11:56:17 raspberrypiFB weewx[560]: restx: AWEKAS: Posting not enabled.
Sep  7 11:56:17 raspberrypiFB weewx[560]: engine: Starting up weewx version 3.7.1
Sep  7 11:56:17 raspberrypiFB weewx[560]: engine: Starting main packet loop.
Sep  7 12:13:03 raspberrypiFB systemd[1]: Stopping LSB: weewx weather system...
Sep  7 12:13:03 raspberrypiFB weewx[560]: interceptor: MainThread: shutting down server thread
Sep  7 12:13:03 raspberrypiFB weewx[560]: engine: Terminating weewx version 3.7.1
Sep  7 12:13:08 raspberrypiFB weewx[858]: Stopping weewx weather system: weewx..
Sep  7 12:13:09 raspberrypiFB systemd[1]: Stopped LSB: weewx weather system.
Sep  7 12:13:24 raspberrypiFB systemd[1]: Starting LSB: weewx weather system...
Sep  7 12:13:25 raspberrypiFB weewx[931]: engine: Initializing weewx version 3.7.1
Sep  7 12:13:25 raspberrypiFB weewx[931]: engine: Using Python 2.7.9 (default, Sep 17 2016, 20:26:04) #012[GCC 4.9.2]
Sep  7 12:13:25 raspberrypiFB weewx[931]: engine: Platform Linux-4.9.28+-armv6l-with-debian-8.0
Sep  7 12:13:25 raspberrypiFB weewx[931]: engine: Locale is 'en_GB.UTF-8'
Sep  7 12:13:25 raspberrypiFB weewx[931]: engine: pid file is /var/run/weewx.pid
Sep  7 12:13:25 raspberrypiFB weewx[921]: Starting weewx weather system: weewx.
Sep  7 12:13:25 raspberrypiFB systemd[1]: Started LSB: weewx weather system.
Sep  7 12:13:25 raspberrypiFB weewx[935]: engine: Using configuration file /etc/weewx/weewx.conf
Sep  7 12:13:25 raspberrypiFB weewx[935]: engine: Loading station type Interceptor (user.interceptor)
Sep  7 12:13:26 raspberrypiFB weewx[935]: interceptor: MainThread: driver version is 0.30
Sep  7 12:13:26 raspberrypiFB weewx[935]: interceptor: MainThread: device type: acurite-bridge
Sep  7 12:13:26 raspberrypiFB weewx[935]: interceptor: MainThread: sensor map: None
Sep  7 12:13:26 raspberrypiFB weewx[935]: interceptor: MainThread: mode is sniff
Sep  7 12:13:26 raspberrypiFB weewx[935]: interceptor: MainThread: sniff iface=eth0 promiscuous=0
Sep  7 12:13:26 raspberrypiFB weewx[935]: interceptor: MainThread: sniff filter 'src 192.168.5.230 and dst port 80'
Sep  7 12:13:26 raspberrypiFB weewx[935]: engine: StdConvert target unit is 0x1
Sep  7 12:13:26 raspberrypiFB weewx[935]: wxcalculate: The following values will be calculated: barometer=prefer_hardware, windchill=prefer_hardware, dewpoint=prefer_hardware, appTemp=prefer_hardware, rainRate=prefer_hardware, windrun=prefer_hardware, heatindex=prefer_hardware, maxSolarRad=prefer_hardware, humidex=prefer_hardware, pressure=prefer_hardware, inDewpoint=prefer_hardware, ET=prefer_hardware, altimeter=prefer_hardware, cloudbase=prefer_hardware
Sep  7 12:13:26 raspberrypiFB weewx[935]: wxcalculate: The following algorithms will be used for calculations: altimeter=aaNOAA, maxSolarRad=RS
Sep  7 12:13:26 raspberrypiFB weewx[935]: engine: Archive will use data binding wx_binding
Sep  7 12:13:26 raspberrypiFB weewx[935]: engine: Record generation will be attempted in 'hardware'
Sep  7 12:13:26 raspberrypiFB weewx[935]: engine: Using archive interval of 300 seconds (specified in weewx configuration)
Sep  7 12:13:26 raspberrypiFB weewx[935]: engine: Using binding 'wx_binding' to database 'weewx.sdb'
Sep  7 12:13:26 raspberrypiFB weewx[935]: manager: Starting backfill of daily summaries
Sep  7 12:13:26 raspberrypiFB weewx[935]: restx: StationRegistry: Station will not be registered: no station_url specified.
Sep  7 12:13:26 raspberrypiFB weewx[935]: restx: Wunderground: Posting not enabled.
Sep  7 12:13:26 raspberrypiFB weewx[935]: restx: PWSweather: Posting not enabled.
Sep  7 12:13:26 raspberrypiFB weewx[935]: restx: CWOP: Data for station FW1491 will be posted
Sep  7 12:13:26 raspberrypiFB weewx[935]: restx: WOW: Posting not enabled.
Sep  7 12:13:26 raspberrypiFB weewx[935]: restx: AWEKAS: Posting not enabled.
Sep  7 12:13:26 raspberrypiFB weewx[935]: engine: Starting up weewx version 3.7.1
Sep  7 12:13:26 raspberrypiFB weewx[935]: engine: Starting main packet loop.
pi@raspberrypiFB:~ $ date
Thu  7 Sep 15:05:35 EDT 2017
pi@raspberrypiFB:~ $

mwall

unread,
Sep 10, 2017, 2:37:01 PM9/10/17
to weewx-user
On Thursday, September 7, 2017 at 3:12:15 PM UTC-4, Eddie Lent wrote:
ok, here is the output, the weewx restart did not get it listening again:

very strange.  i wonder if this is specific to the raspberry pi?

if running tcpdump reliably makes the sniffing work, you could add a single tcpdump invocation after you start weewx in the /etc/init.d/weewx script.  just invoke tcpdump for a few packets with the --count option.

its a hack, but it might give you a reliable system until you can figure out the root cause.

is there any way you could try running the interceptor on a non-pi machine?  i've been running the interceptor in listen mode for acurite packets on x86_64 and ppc hardware with no problems.  it will be at least a month before i could get a pi onto one of those networks to see if i can duplicate what you're seeing.

m

Oscar

unread,
Oct 11, 2017, 4:54:58 PM10/11/17
to weewx-user

Brian Harvell

unread,
Feb 24, 2018, 7:53:43 PM2/24/18
to weewx-user
I'm using a raspberry pi 3 and I noticed the interceptor was only able to sniff traffic while I was running tcpdump. If it stopped tcpdump then interceptor wouldn't see any more traffic. I noticed in the log it said promiscuous = 0 and once I added  promiscuous = 1 to my config and it seems to work fine now, even after a reboot.

Brian

Lorin Tremblay

unread,
Apr 29, 2018, 11:40:26 AM4/29/18
to weewx-user
Where do you add the "promiscuous=1" to? and what was the syntax for it?

Kurt Kochendarfer

unread,
Jun 2, 2020, 8:31:47 PM6/2/20
to weewx-user
Running weewx 4.1.1 on RasPi3 using weewx-interceptor current as of this post.  Weewx was installed using .deb instructions on Weewx install page (Python3 option).  I'm also running through a switch with port mirroring from WS-2000 (802.11) to RasPi (Ethernet).  When I installed weewx-interceptor, I used the command:

sudo pip3 install pypcap

tcpdump shows that HTTP GET requests are making it to the Pi:

sudo tcpdump -i eth0|grep HTTP
tcpdump
: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0
, link-type EN10MB (Ethernet), capture size 262144 bytes
18:19:17.350471 IP 192.168.1.179.4858 > ec2-52-35-193-72.us-west-2.compute.amazonaws.com.http: Flags [P.], seq 1:530, ack 1, win 5840, length 529: HTTP: GET /weatherstation/updateweatherstation.php?ID=XXXXXXXXXX&PASSWORD=XXXXXXXX&indoortempf=75.7&tempf=79.0&dewptf=41.2&windchillf=79.0&indoorhumidity=31&humidity=26&windspeedmph=2.5&windgustmph=6.9&winddir=353&absbaromin=23.459&baromin=23.459&rainin=0.000&dailyrainin=0.000&weeklyrainin=0.110&monthlyrainin=0.000&yearlyrainin=0.220&solarradiation=67.16&UV=0&dateutc=2020-06-03%2000:19:16&softwaretype=AMBWeatherV4.1.9&action=updateraw&realtime=1&rtfreq=5 HTTP/1.0
18:19:17.409177 IP ec2-52-35-193-72.us-west-2.compute.amazonaws.com.http > 192.168.1.179.4858: Flags [P.], seq 1:144, ack 530, win 27872, length 143: HTTP: HTTP/1.1 200 OK
18:19:33.446953 IP 192.168.1.179.22265 > ec2-52-35-193-72.us-west-2.compute.amazonaws.com.http: Flags [P.], seq 1:530, ack 1, win 5840, length 529: HTTP: GET /weatherstation/updateweatherstation.php?ID=XXXXXXXXXX&PASSWORD=XXXXXXXX&indoortempf=75.7&tempf=78.8&dewptf=40.1&windchillf=78.8&indoorhumidity=31&humidity=25&windspeedmph=1.3&windgustmph=5.8&winddir=353&absbaromin=23.459&baromin=23.459&rainin=0.000&dailyrainin=0.000&weeklyrainin=0.110&monthlyrainin=0.000&yearlyrainin=0.220&solarradiation=65.45&UV=0&dateutc=2020-06-03%2000:19:32&softwaretype=AMBWeatherV4.1.9&action=updateraw&realtime=1&rtfreq=5 HTTP/1.0
18:19:33.504446 IP ec2-52-35-193-72.us-west-2.compute.amazonaws.com.http > 192.168.1.179.22265: Flags [P.], seq 1:144, ack 530, win 27872, length 143: HTTP: HTTP/1.1 200 OK

My weewx.conf Interceptor config:

[Interceptor]
    driver
= user.interceptor
    device_type
= wu-client
    mode
= sniff
    iface
= eth0
    pcap_filter
= src 192.168.1.179 and dst port 80
    promiscuous
=True

Running tail -f /var/log/syslog I get the following:

tail -f /var/log/syslog
Jun  2 18:25:26 weatherpi weewx[2284] INFO weewx.restx: StationRegistry: Registration not requested.
Jun  2 18:25:26 weatherpi weewx[2284] INFO weewx.restx: Wunderground: Posting not enabled.
Jun  2 18:25:26 weatherpi weewx[2284] INFO weewx.restx: PWSweather: Posting not enabled.
Jun  2 18:25:26 weatherpi weewx[2284] INFO weewx.restx: CWOP: Posting not enabled.
Jun  2 18:25:26 weatherpi weewx[2284] INFO weewx.restx: WOW: Posting not enabled.
Jun  2 18:25:26 weatherpi weewx[2284] INFO weewx.restx: AWEKAS: Posting not enabled.
Jun  2 18:25:26 weatherpi weewx[2284] INFO __main__: Starting up weewx version 4.1.1
Jun  2 18:25:26 weatherpi weewx[2284] INFO weewx.engine: Using binding 'wx_binding' to database 'weewx.sdb'
Jun  2 18:25:26 weatherpi weewx[2284] INFO weewx.manager: Starting backfill of daily summaries
Jun  2 18:25:26 weatherpi weewx[2284] INFO weewx.engine: Starting main packet loop.

And then it just sits there...no packets are captured.  Same problem as documented above, but promiscuous mode doesn't seem to remedy the problem.  Any thoughts/suggestions?

Reply all
Reply to author
Forward
0 new messages