Acurite Access + RaspberryPi --> WU DNS hijacking (DD-WRT) - howto

77 views
Skip to first unread message

Xant

unread,
Jul 25, 2019, 2:19:58 AM7/25/19
to weewx-user

The following is a note response by Matthew in GitHub blog regarding Acurite Access:


weewx does work with the access, but the access must send data in wu format. configure the access to send wu data. ideally you would configure it to send to the computer running weewx (use dns hijacking for this). then configure interceptor to listen (not sniff), and it will simply receive the wu data.

if you prefer to send to wu, then you must configure the interceptor to sniff the traffic (not listen).

please post on the weewx user group for further help on this.

i am sorry there is not yet a guide specifically for intercepter and access




1) WU DNS forwarding by DD-WRT router


Setup>Forced DNS Redirection [On]

Services>ServicesTab>DNSmasq>Additional DNSmasq Options
address=/rtupdate.wunderground.com/Y.Y.Y.Y (where Y.Y.Y.Y is RaspberryPi IP)



2) Directly test Interceptor (should receive packages)


# PYTHONPATH=/usr/share/weewx python /usr/share/weewx/user/interceptor.py --device=wu-client --mode=listen --port=80



3) WeeWX Config


[Interceptor]
    # This section is for the network traffic interceptor driver.
    driver = user.interceptor
    device_type = wu-client
    mode = listen
    port = 80


If all works, html file generated at /var/www/html/weewx/index.html


PS: repost, with minor tweek

Xant

unread,
Jul 25, 2019, 1:28:39 PM7/25/19
to weewx-user

UPDATE

1) WU DNS forwarding by DD-WRT router

Although DNSmasq strategy "partially" works, but ALL updates or attempt connections to 'rtupdate.wunderground.com' are redirected in local loop. That is, able to read from Acurite Access, but WeeWX not able to update to WU.

BETTER Strategy (pls, ignore the DNSmasq):

Apply some firewall rules:


  • From within the dd-wrt web interface go to the Administration menu > Commands sub menu. Enter the following into the box and click Save Firewall (editing IPs to match your setup):

iptables -t nat -A PREROUTING -s X.X.X.X -p tcp --dport 80 -j DNAT --to-destination Y.Y.Y.Y:80
iptables -t nat -A POSTROUTING -j MASQUERADE



  • Where X.X.X.X with is the IP of your Acurite Access, and Y.Y.Y.Y:80 the IP of your RaspberryPi/WeeWX.

  • Reboot DD-WRT router.

Reply all
Reply to author
Forward
0 new messages