Have installed weeWX on MacOS 10.11.6 and I think my install is correct. I'm able to launch with Simulator configured, but I get the following error when I try to run configured with Interceptor for an Acurite bridge.
I also installed libcap as instructed.
From wee_debug
Using configuration file /Users/Shared/weewx/weewx.conf
Using database binding 'wx_binding', which is bound to database 'archive_sqlite'
System info
Platform: Darwin-15.6.0-x86_64-i386-64bit
Python Version: 2.7.10
Load Information
1 minute load average: 1.12
5 minute load average: 1.22
15 minute load average: 1.17
General Weewx info
Weewx version 3.8.0 detected.
Station info
Station type: Interceptor
Driver: user.interceptor
Driver info
[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 = en0
pcap_filter = src 192.168.0.125 and dst port 80
Currently installed extensions
Extension Name Version Description
Traceback (most recent call last):
File "/Users/Shared/weewx/bin/wee_debug", line 427, in <module>
main()
File "/Users/Shared/weewx/bin/wee_debug", line 160, in main
options.verbosity)
File "/Users/Shared/weewx/bin/wee_debug", line 227, in generateDebugInfo
ext.enumerate_extensions()
File "/Users/Shared/weewx/bin/weecfg/extension.py", line 81, in enumerate_extensions
info = self.get_extension_info(f)
File "/Users/Shared/weewx/bin/weecfg/extension.py", line 93, in get_extension_info
_, installer = weecfg.get_extension_installer(ext_cache_dir)
File "/Users/Shared/weewx/bin/weecfg/__init__.py", line 1296, in get_extension_installer
raise ExtensionError("Cannot find 'install' module in %s" % extension_installer_dir)
weecfg.ExtensionError: Cannot find 'install' module in /Users/Shared/weewx/bin/user/installer/.DS_Store
Not sure if this last error is typical on Mac OS when using wee_debug, but I don't get an error when I install the Interceptor driver.
Output from Mac OS console
5/24/18 1:12:59.654 AM weewx[677]: import of driver failed: 'module' object has no attribute 'pcapObject' (<type 'exceptions.AttributeError'>)
5/24/18 1:12:59.655 AM weewx[677]: engine: Unable to load driver: 'module' object has no attribute 'pcapObject'
5/24/18 1:12:59.655 AM weewx[677]: **** Exiting...
From my conf file
[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 = eth1 pcap_filter = src 192.168.0.125 and dst port 80
# 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 = eth1 pcap_filter = src 192.168.0.125 and dst port 80
Not sure where to go from here. I know nothing about python. Any guidance would be helpful and much appreciated.
Hi Matthew, is there an older version of the weewx-interceptor code before the pylibpcap binding change I might be able to try?
--
You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/0cdl5rIPFCM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
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+...@googlegroups.com.
[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 = eth1 pcap_filter = src 192.168.0.125 and dst port 80
# 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 = wlan0
pcap_filter = src 192.168.0.125 and dst port 80
For hardware such as the Acurite bridge or LW30x that support multiple remote
sensors, use the sensor_map to map the sensors to database fields. For
example:
[Interceptor]
driver = user.interceptor
device_type = acurite-bridge
...
[[sensor_map]]
inTemp = temperature.06022.* # sensor id 06022
outTemp = temperature.05961.* # sensor id 05961
When I try to use PYTHONPATH=bin python bin/user/interceptor.py --device=acurite-bridge --mode=sniff --iface=wlan0 --filter="src 192.168.0.125 and dst port 80",it results in "python: can't open file 'bin/user/interceptor.py': [Errno 2] No such file or directory". If I point to where I'm actually finding interceptor.py by using PYTHONPATH=bin python /usr/share/weewx/user/interceptor.py --device=acurite-bridge --mode=sniff --iface=wlan0 --filter="src 192.168.0.125 and dst port 80" then the response is "Traceback (most recent call last):
File "/usr/share/weewx/user/interceptor.py", line 203, in <module> import weewx.drivers ImportError: No module named weewx.drivers"
In the file /etc/apache2/conf.d/myacurite.conf: RewriteEngine on RewriteCond %{HTTP_POST} www.myacurite.com RewriteRule ^/weatherstation(.*)$ http://Y.Y.Y.Y/weatherstation$1
I really want this to work, but I'm quite lost at the moment as to what others have done to get this happening. What logs or other info could I provide that would help? I'm willing to keep plugging away at it with some guidance, since I'm not using a configuration that isn't out of the norm, so I must just have something misconfigured.
Just like you needed to provide an explicit path to interceptor.py you need to provide an explicit path for PYTHONPATH. Try replacing PYTHONPATH=bin with PYTHONPATH=/usr/share/weewx
Gary
sudo PYTHONPATH=/usr/share/weewx python /usr/share/weewx/user/interceptor.py --device=acurite-bridge --mode=sniff --iface=wlan0 --filter="src 192.168.0.125 and dst port 80"
I get no output after 30 minutes, so I must have something on my new router that's not allowing this between the wlan0 and eth0. It's a TP-Link Deco M5 that allows a parent the type of control we need, but is pretty limited in what can be customized, and doesn't provide a lot of info about what's going on or how devices are connecting. I'll have to setup a DD-WRT test router and see if it get results. Really appreciate your tip.
Gary
With RPi Zero W and the Acurite bridge now both on a DD-WRT router, I still get nothing with
sudo PYTHONPATH=/usr/share/weewx python /usr/share/weewx/user/interceptor.py --device=acurite-bridge --mode=sniff --iface=wlan0 --filter="src 192.168.0.125 and dst port 80"
I get nothing more than ARP requests when I run a tcp dump
00:51:33.916388 ARP, Request who-has DD-WRT (Broadcast) tell Acurite_Bridge, length 46
So I'm still lost in confusion.
With RPi Zero W and the Acurite bridge now both on a DD-WRT router, I still get nothing with
sudo PYTHONPATH=/usr/share/weewx python /usr/share/weewx/user/interceptor.py --device=acurite-bridge --mode=sniff --iface=wlan0 --filter="src 192.168.0.125 and dst port 80"
I get nothing more than ARP requests when I run a tcp dump
00:51:33.916388 ARP, Request who-has DD-WRT (Broadcast) tell Acurite_Bridge, length 46
So I'm still lost in confusion.