Hello Rainer,

I've used this instruction, as I can remember, to set up the RPi as an AP 
(repeater).

https://raspberrypi.stackexchange.com/questions/89803/access-point-as-wifi-router-repeater-optional-with-bridge/89804#89804

There are other instructions too, but none of the others was working for me.

As I used a RPi Zero W, I've set up the device as a repeater, but if you 
used a RPi 3 or something which has eth connector, it is another story, 
because you can create and AP with the Wifi, and pass all data packets to 
the ethernet. With the RPi Zero W, it is an AP/Client setup.

In my setup all the data what passes through the RPi is sniffed by the 
interceptor, and it is passed to WU without modification. So, what you want 
that would work. Otherwise, if you set up WeeWX and interceptor, just to 
intercept/receive, then you can configure WeeWX to send the collected data 
to WU too, or any other web-service what is listed in the config, please 
see the wiki for that, if you need it.


Interceptor in sniffer more:

>From the interceptor.py (
https://github.com/matthewwall/weewx-interceptor/blob/master/bin/user/interceptor.py
)

SniffServer vs TCPServer
The driver can obtain packets by sniffing network traffic using pcap, or by
listening for TCP/IP requests. The pcap approach requires the python pypcap
module, which in turn requires libpcap. This means a separate installation
on most platforms.
https://github.com/pynetwork/pypcap
To run a listener, specify an address and port. This is the default mode.
For example:
[Interceptor]
mode = listen
address = localhost
port = 9999
To run a sniffer, specify an interface and filter. For example:
[Interceptor]
mode = sniff
iface = eth0
pcap_filter = src host 192.168.1.5 && dst port 80
"""
  
My weewx config looks like this for interceptor:

[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, smarthub, or access
    #   observer - fine offset WH2600/HP1000/HP1003, ambient WS2902
    #   lw30x - oregon scientific LW301/LW302
    #   lacrosse-bridge - lacrosse GW1000U/C84612 internet bridge
    #   wu-client - any hardware that uses the weather underground protocol
    device_type = wu-client
    mode = sniff
    iface = ap0
    pcap_filter = src 192.168.6.5 and dst port 80

In my case ap0 is the name of the network interface, and the weather 
station's console is 192.168.6.5, defined in the dnsmasq as I remember.

There are two/three issues what I have seen with my setup.

Rain is not logged correctly by weewx, but I think is mostly due to the RPi 
Zero W's speed capabilities. But I tried to fix for myself the 
interceptor.py.
Due to my Wifi network, and equipment, I have Wifi dropouts, which causes 
some issues by the AP (repeater) setup, I have a script added to chron to 
restart the Wifi connection and the AP, if something goes wrong.
It has happened twice so far, that Interceptor stopped sniffing, probably 
due to the previous issue and Wifi and AP restart. I might add another 
chron job later to restart weewx every X days or something. But the good 
thing, if the interceptor is not sniffing the packets are still passed 
through and reaches WU. 

I hope this helps! Let me know if you need any other info.

Best Regards,

Gábor Szabados

PS.: There is a device which does a similar thing out of the box, and 
passes data to your Raspberry Pi or whatever machine you want, 
http://astrogenic.com/shop/product_info.php?currency=USD&products_id=64

2019. július 5., péntek 13:58:19 UTC+2 időpontban Moose Man a következőt 
írta:
>
> Dear Gábor,
>
> I own a Froggit WH3000 PWS connected to my Router sending weather data to 
> WU <https://www.wunderground.com/dashboard/pws/IHERZBER23#history>. 
> Now I would like to connect it to Raspberry Pi 3+ via wifi using weewx.
> You mentioned a method to create a wifi access point with the Raspberry Pi 
> and then pass data to the network.
> I will try to do the same but I fear I've not enough experience to get 
> this working, i.e. what does it mean to set up *interceptor in sniffer 
> mode*.  :-) 
>
> However, do you know if it is possible to use weewx on raspberry Pi and 
> still passing data to Weather underground at the same time?
>
> Would be nice to hear from you.
> Thanks in advance.
>
> Best regards,
>
> Rainer
>
> Am Donnerstag, 20. Juni 2019 00:47:41 UTC+2 schrieb Gábor Szabados:
>>
>> Hello, 
>>
>> I have one of the Froggit (Fine Offset) clones from Conrad. 
>>
>> I have used a similar setup as it was described before, but the only 
>> difference, that I have used a wifi AP a way to pass packet through it. 
>>
>> I've done my whole project with a Raspberry Pi Zero W. There is a way to 
>> create a wifi access point with the Raspberry Pi and pass all data to your 
>> normal network. Then you set up interceptor in sniffer mode. 
>>
>> It decodes all the packets what is sent from the weather station to WU. 
>>
>> If you use a Raspberry Pi 3 or 3+ you can do the same by combining the 
>> wifi and the ethernet port. Wifi as AP and ethernet to your normal network. 
>> But an AP and Client combination works too the same way as on the Rpi0w. 
>>
>> In my setup there was no need to define iptables in the router (and 
>> change firmware on the router). The Raspberry Pi does everything. It runs 
>> WeeWX too. 
>>
>> Best Regards, 
>>
>> Gábor Szabados
>
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/8e67933c-7c17-4392-a047-17a6f8377dfb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to