This project provides a python script solution for ingesting weather data from a VEVOR 7-in-1 Wi-Fi Solar Self-Charging Weather Station (Model YT60234, or any station sending data in Weather Underground format) and forwarding it to Home Assistant via MQTT.
- Accepts Weather Underground (WU) station GET requests (as sent by the VEVOR weather station)
- Converts measurements to metric or imperial units based on the
UNITSenvironment variable - Publishes sensor data to Home Assistant via MQTT using the auto-discovery format
- All sensors appear under one device in Home Assistant
- Responds with
successso the weather station doesn’t retry
sudo apt-get update
sudo apt-get install git
sudo apt-get install python3-pytz
sudo apt-get install python3-flask
sudo apt-get install python3-requests
sudo apt-get install python3-paho-mqtt
sudo apt-get install python3-dnspython
sudo apt-get install dnsmasqSet static IP
nano sudo nano /etc/dhcpcd.confGo to the bottom file and add IP information up to your network.
interface eth0
metric 300
static ip_address=192.168.0.40/24
static routers=192.168.0.1
static domain_name_servers=192.168.0.1reboot!
Clone git-hub repo
git clone https://github.com/hash6iron/VevorWeatherbridge.git
cd weatherstation-ha-relayEdit the weatherstation.py file and set the following variables at the beginnig of the file.
MQTT_HOST: Hostname or IP of your MQTT brokerMQTT_PORT: Broker port (default1883)MQTT_USER/MQTT_PASSWORD: Credentials if requiredDEVICE_ID: Unique identifier for the weather station device (defaultweather_station)DEVICE_NAME: Display name for the device in Home Assistant (defaultWeather Station)DEVICE_MANUFACTURER: (optional) Manufacturer name shown in Home Assistant (defaultVEVOR)DEVICE_MODEL: (optional) Model name (default7-in-1 Weather Station)UNITS:metric(default) orimperialWU_FORWARD: Set totrueto also forward data to Weather Underground (defaultfalse)WU_USERNAME/WU_PASSWORD: Credentials for Weather Underground (optional)
Example:
TZ: Europe/Berlin
MQTT_HOST: 192.168.1.100
MQTT_PORT: 1883
MQTT_USER: youruser
MQTT_PASSWORD: yourpass
DEVICE_ID: weather_station
DEVICE_NAME: "Backyard Weather"
DEVICE_MANUFACTURER: VEVOR
DEVICE_MODEL: "7-in-1 Weather Station"
# optional: "metric" (default) or "imperial"
UNITS: metric
# forward data to Weather Underground
WU_FORWARD: "false"
# credentials if forwarding
WU_USERNAME: yourWUuser
WU_PASSWORD: yourWUpass
sudo nohup python weatherstation.py &The service now listens on port 80 for requests to /weatherstation/updateweatherstation.php.
You can redirect the weather station’s upload URL (rtupdate.wunderground.com) through aditional WiFi AP if your current WiFi AP or router doesn`t permit DNS redirection.
See this proposal below with Raspberry Pi and additional WiFi Access Point that works fine and not need Pi-hole.
In the image below.
- Our weather script server on RaspBerry Pi - 192.168.2.100
- WAN Router - 192.168.2.1
- Weather router - 192.168.2.2
Set the following file with DNS redirection.
sudo nano /etc/dnsmasq.d/wunderground-redirect.conf
And include this line Note: IP 192.168.2.100 is the RaspberryPI Static IP
address=/wunderground.com/192.168.2.100
Save and close.
Now restart DNSMASQ.
sudo systemctl restart dnsmasq
Ensure that, /etc/resolv.conf is like below (nothing about 192.168.2.100 - our weather script server)
..
nameserver 192.168.2.1
..
Ensure that, /etc/hosts is like below (nothing about 192.168.2.100 - our weather script server)
..
127.0.1.1 WEATHER
..
Then you can see that Vevor talk with your server instead of wu server. You are ready for vevor bridge execution! (then step the following section below "Another one ...")
The service listens for GET requests at:
/weatherstation/updateweatherstation.php
With query parameters matching the WU format, e.g.:
http://<your-server-ip>/weatherstation/updateweatherstation.php?ID=XXXXX&PASSWORD=XXXXX&dateutc=xxxx-x-xx+xx:xx:xx&baromin=x&tempf=x&humidity=x&dewptf=x&rainin=x&dailyrainin=x&winddir=x&windspeedmph=x&windgustmph=x&UV=x&solarRadiation=x
- The weather station uploads data to this endpoint.
- The service converts units to metric or keeps imperial values depending on
UNITS. - Each value is published to Home Assistant via MQTT, auto-discovered as a sensor, and grouped under the configured device.
- The endpoint returns
successto acknowledge the update.
The following sensors are created or updated and will appear under the device specified by DEVICE_NAME:
Units in parentheses assume UNITS=metric; values switch to imperial when UNITS=imperial.
sensor.weather_station_barometric_pressure(hPa)sensor.weather_station_temperature(°C)sensor.weather_station_humidity(%)sensor.weather_station_dew_point(°C)sensor.weather_station_rainfall(mm)sensor.weather_station_daily_rainfall(mm)sensor.weather_station_wind_direction(°)sensor.weather_station_wind_speed(km/h)sensor.weather_station_wind_gust_speed(km/h)sensor.weather_station_uv_index(index)sensor.weather_station_solar_radiation(W/m²)
You can use these entities directly in your Home Assistant dashboards or automations.
This project is licensed under the CC0 1.0 Universal.
- Original Weather Underground relay script inspiration by @vlovmx
- Python rewrite and containerization by C9H13NO3-dev