Dear all,
I came here to provide with a solution.
#################
### MY SETUP ###
#################
First, here is an overview of the relevant hardware and software I used
#--> A NAS Synology that can run Vrtual Machines. So... A Virtual Machine with debian without GUI
#--> A
PiHole device to control my DNS (
#--> A Meteo Station Ambient Weather WS-2902
I will assume that you PiHole is installed correctly and working, that you're able to install debian and that your meteo station is correctly set up to upload weather to wunderground and connected to your network.
#######################
### WEEWX INSTALL ###
#######################
Next, I assume debian is installed and functionnal. It should work with any linux device.
Install weewx. I managed to install with the APT, but here again, it should work with any solution provided by weewx
####################
### WEEWX.CONF ###
####################
Now, the fun part. At least, the one who took me hours to figure out.
You'll have to configure the driver.
Change the settings to:
[Interceptor]
driver = user.interceptor
device_type = observer
Change also all the settings related to your location, and the IDs for weather upload
##################
### HIJACK DNS ###
##################
If you take a look at your PiHole dashboard and especially at the WS-2902 traffic, you'll see that it connects very often to something like "rtp.wundeground.....".
This URL is the one your station contacts to upload weather.
So, we will tell PiHole to route this URL to your weewx interceptor
This part also took me quite some time...
Lets assume that my weewx VM has 10.10.10.20
We will modify the /etc/hosts file, in PiHole (I've done int via SSH)
Add the line:
10.10.10.20 rtp.wunderground...
Specify the correct url.
This will tell to PiHole:
When someone in my network tries to contact rtp.wunderground..., the correct IP is 10.10.10.20.
This way, the weewx driver will listens to the traffic going to weather wunderground, take it, and route it to wunderground so that your weather is still updated online
My next part is to dockerize this stuff, but.... Hard work.
Good luck mates