Guide needed for local interface to Davis weatherstations

I have been trying unsuccessfully for over a year to pull weather readings (outdoor temperature is essential) from my Davis Vantage Vue weather station into Home Assistant so that I can take actions based on the current weather. The discussion started by PatchyCO in Aug. 2019 has grown to contain so many valuable but disparate pieces of information that I would like to ask somebody to filter and consolidate it into a general user guide for connecting Davis weather stations to HA.

I am trying to avoid any use of the cloud by communicating over my Ethernet LAN with a Davis WeatherLink IP module. I hope somebody out there can clear up at least the following:

  1. What hardware do I need? Is there an integration that will work on a LAN with my WeatherLink IP that is out of production or must I spend another $200 to use a new WeatherLink Live module?
  2. There are mentions of XML and JSON URLs for addressing the station while I get a “REST result could not be parsed as JSON” error so maybe I’m inadvertently using the XML URL. Where are both of these URLs given?
  3. There are mentions of multiple APIs but I have no idea where to specify the API in my configuration.yaml or elsewhere?
  4. The are discussion of inspecting JSON files but I haven’t been able to find such a file to inspect for whatever my weather station is returning.
  5. A complete configuration.yaml section for a Davis station and any other required code would really help.
1 Like

It’s unlikely somebody on this forum will compile a user guide for you, I’m afraid.
Which thread are you referring to?

1 Like

It’s just a wish. The thread I have followed is Davis WeatherLink Integration but I have not been able to read data from my Davis VantageVue with the various yaml edits suggested there. As I have posted elswhere, a major missing piece of HA – well not HA itself because HA is software but of home automation hardware systems – is a robust (wired) weatherproof outside temperature sensor. I have a full weather station but all I really need is a reliable temperature sensor, not a student demo project that will corrode in a few months.

From a quick Googling, I’m quite sure the thread you mention is about WeatherLink Live, not WeatherLink IP.

The good news is that it seems to be possible to read the data locally for the IP as well.
The bad news is that it involves connecting a low-level TCP/IP socket to the datalogger and parsing the frames.

In HA terms, that probably means creating a specific integration but you might get success with the TCP integration

See rainmachine-developer-resources/ at 8593f49eb0a47aae44fd4abaa675297f70bf44f5 · sprinkler/rainmachine-developer-resources · GitHub for an implementation of parsing the frames, hopefully functional.

If I get the code right, doing something like echo "LOOP 1" | nc <the_logger_ip> 22222 will make the logger spew data, that would have to be parsed.

If you use their cloud based API, it’s very much easier, ofc, but I understand you’d need a subscription to get full access to the data of the logger you paid for.
That’s the cost of going to the Market rather than DIY :wink:

OK, I’ll try to help, but I am also a beginner with all of this. This is based on a Vantage Vue with a “base station” but it is 100% local and doesn’t involve any subscriptions.

First off, do you know what the local IP address of your Davis base station is? Mine is (yours will be different), but if I type into a browser it returns the following text:

{"data":{"did":"001D0A7xxxx","ts":1623772738,"conditions":[{"lsid":352807,"data_structure_type":1,"txid":1,"temp": 75.9,"hum":59.3,"dew_point": 60.7,"wet_bulb": 64.6,"heat_index": 76.8,"wind_chill": 75.9,"thw_index": 76.8,"thsw_index":null,"wind_speed_last":2.43,"wind_dir_last":86,"wind_speed_avg_last_1_min":1.31,"wind_dir_scalar_avg_last_1_min":69,"wind_speed_avg_last_2_min":1.12,"wind_dir_scalar_avg_last_2_min":72,"wind_speed_hi_last_2_min":2.62,"wind_dir_at_hi_speed_last_2_min":80,"wind_speed_avg_last_10_min":1.37,"wind_dir_scalar_avg_last_10_min":66,"wind_speed_hi_last_10_min":3.43,"wind_dir_at_hi_speed_last_10_min":57,"rain_size":2,"rain_rate_last":0,"rain_rate_hi":0,"rainfall_last_15_min":0,"rain_rate_hi_last_15_min":0,"rainfall_last_60_min":0,"rainfall_last_24_hr":0,"rain_storm":0,"rain_storm_start_at":null,"solar_rad":null,"uv_index":null,"rx_state":0,"trans_battery_flag":0,"rainfall_daily":0,"rainfall_monthly":7,"rainfall_year":1520,"rain_storm_last":6,"rain_storm_last_start_at":1622789581,"rain_storm_last_end_at":1622934061},{"lsid":352806,"data_structure_type":4,"temp_in": 80.9,"hum_in":49.7,"dew_point_in": 60.4,"heat_index_in": 81.3},{"lsid":352805,"data_structure_type":3,"bar_sea_level":30.124,"bar_trend":-0.040,"bar_absolute":29.834}]},"error":null}

I think the “data_structure_type”:1 stuff is from the remote sensor, and the “data_structure_type”:4 stuff is from the base station.

Knowing that this data is available on my LAN, I then added the following to my config.yaml file; it’s not pretty or neat, and some of it is tailored to my preferences, but it might get you started?

  - name: Weather Station
    platform: rest
    resource: ''
      - data
    value_template: 'Vantage Pro'
  - platform: template
        friendly_name: 'Temperature'
        device_class: temperature
        unit_of_measurement: "°F"
        value_template: '{{ state_attr("sensor.weather_station", "data")["conditions"][0]["temp"] | round|int }}'
        friendly_name: 'Humidity'
        device_class: humidity
        unit_of_measurement: "%"
        value_template: '{{ state_attr("sensor.weather_station", "data")["conditions"][0]["hum"] | round|int }}'
        friendly_name: 'Dew Point'
        device_class: temperature
        unit_of_measurement: "°F"
        value_template: '{{ state_attr("sensor.weather_station", "data")["conditions"][0]["dew_point"] }}'
        friendly_name: 'Wet Bulb'
        device_class: temperature
        unit_of_measurement: "°F"
        value_template: '{{ state_attr("sensor.weather_station", "data")["conditions"][0]["wet_bulb"] }}'
        friendly_name: 'Heat Index'
        device_class: temperature
        unit_of_measurement: "°F"
        value_template: '{{ state_attr("sensor.weather_station", "data")["conditions"][0]["heat_index"] }}'
        friendly_name: 'Wind Chill'
        device_class: temperature
        unit_of_measurement: "°F"
        value_template: '{{ state_attr("sensor.weather_station", "data")["conditions"][0]["wind_chill"] | round|int }}'
        friendly_name: 'THW Index'
        device_class: temperature
        unit_of_measurement: "°F"
        value_template: '{{ state_attr("sensor.weather_station", "data")["conditions"][0]["thw_index"] }}'
        friendly_name: 'Wind Speed Last'
        device_class: temperature
        unit_of_measurement: "mph"
        value_template: '{{ state_attr("sensor.weather_station", "data")["conditions"][0]["wind_speed_last"] | round|int }}'
        friendly_name: 'Wind Direction Last'
#        device_class: temperature
        unit_of_measurement: "º"
        value_template: '{{ state_attr("sensor.weather_station", "data")["conditions"][0]["wind_dir_last"] }}'
        friendly_name: 'Wind Direction Last Compass'
#        device_class: temperature
#        unit_of_measurement: "º"
        value_template: >
          {% set direction = ['N','NNE','NE','ENE','E','ESE','SE','SSE','S','SSW','SW','WSW','W','WNW','NW','NNW','N'] %}
          {% set degree = state_attr("sensor.weather_station", "data")["conditions"][0]["wind_dir_last"]|float %}
          {{ direction[((degree+11.25)/22.5)|int] }}

        friendly_name: 'Rainfall Last 15 mins'
#        device_class: temperature
        unit_of_measurement: "mm"
        value_template: '{{ state_attr("sensor.weather_station", "data")["conditions"][0]["rainfall_last_15_min"] }}'
        friendly_name: 'Rainfall Last 60 mins'
#        device_class: temperature
        unit_of_measurement: "mm"
        value_template: '{{ state_attr("sensor.weather_station", "data")["conditions"][0]["rainfall_last_60_min"] }}'
        friendly_name: 'Rainfall Last 24 hours'
#        device_class: temperature
        unit_of_measurement: "mm"
        value_template: '{{ state_attr("sensor.weather_station", "data")["conditions"][0]["rainfall_last_24_hr"] }}'

Having written all of the above, I see that all of my Dashboard inputs are showing as Unavailable - but they have been working 24/7 for several weeks. So I need to try to dig up why. Oh The Joys of HA! :grinning:

Good Luck!

hottl, thanks so much for taking this on. I have a Vantage Vue with a basestation to which I added a WeatherLink IP ethernet module. Its IP address is When I type in a browser, instead of the report of current condtions that you get and that I would expect, I get an “Error 404” and a recommendation to go to just the IP address. That page is the “WeatherLinkIP Configuration” so at least I know I am communiating with the WeatherLink IP module but it looks like I must do something else to actually get the data stream that your are successfully getting. I did obtain an API token but I don’t know what to do with it or if it is even needed for local communication.

I’m curious about this as well.

When I put in the main IP Address of my WeatherLink IP ethernet module I get Sensor Data like below


When I go for /v1/current_conditions, I get a “not found” error so not sure if I’m missing pieces or not…

Figured out I had the wrong IP address, but now when I go to the /v1/current_conditions, I also get the 404 error…

I have the same problem and I can’t figure it out. Did you find any solution to this? Is my WeatherLink just too old?

As far as I can tell, there is no solution. I think our WeatherLinks are too old. I finally was able to measure outdoor temperature for about a year with a Maxim/Dallas 18b20 Onewire temperature sensor connect to an ESPHome microcontroller, then updating to ESPHome version 2022.3.1 broke that. Measuring outdoor temperature is a major failing of the hardware makers in the home automation world, but it ought to be trivial. After assembling a pretty elaborate HA system last year, I’m seeing it lose capabilities due to Home Assistant software updates. I also lost the use of my Leviton four-button Z-Wave controller in the “upgrade” to Z-Wave JS.

Hm. Ok. Thanks!
Then I’ll have to consider buying a newer and simpler weatherstation or outdoor sensor that will survive in -40C and is compatible with HA. Too bad. The Davis is really good even if it’s old.

Been struggling with this long time. Yesterday I found this what might help as indicator? Additional WeatherlinkIP topics - Davis Weather Stations Knowledgebase - 1

To those who may be interested:

It is possible to connect directly to the (now discontinued) Weatherlink IP but it will take some work. You connect by raw TCP (not HTML) and then the commands and responses are no different from a serial or USB connection.

Basic access for a quick test is to connect to port 22222 of the Weatherlink IP’s ip address and then send it the string “\nTEST\n”. If you get a “TEST\r\n” back then you have a connection. Just to verify it works I have done this using the PuTTY terminal app with a “RAW” connection type.

Note that this connection method will still work even if you are not on the same local LAN – as long as you set up your router to forward port 22222 to the WeatherlinkIP.

There is an SDK doc available on the Davis website at (SDK) Vantage Pro, Pro2, and Vue Communications Reference 2.6.1 Any OS - Davis Instruments Support, FAQs and Troubleshooting. That describes the technical details of the serial protocol and how to use it.

Koying’s post above suggesting the TCP integration is likely a good solution if you just need to grab one or two values and the script referenced there is a good example of how to use the protocol. Certainly the TCP integration will be useful at least to test and play with a direct connection.

Perhaps a bit more robust example Python script is the Vantage driver for the open-source WeeWx program. (See weewx/ at f31b9b616b08ccab79425555673a9f54e7eba58d · weewx/weewx · GitHub) That driver also has lots of useful comments about undocumented behavior etc.

I too am interested in connecting directly to the WeatherlinkIP and definitely not interested in buying a Weatherlink Live box or going through the cloud to do it. That may motivate me to work on this myself eventually but I just don’t have the time now.

However I bet there are some smart folks on this forum who could make this work fairly quickly. Go play!

Looking into getting a weather station. If I choose a Davis, I will create an integration for it. But it’s not looking like I can connect to it directly without a console, for which I have no use. Might go for a DYI serial solution, though I’ll first look into other weather stations.

Thanks for the tip of WeeWX!

Maybe you can have a look at PyVantagePro — PyVantagePro 0.3.3dev documentation. If you can try this Python script to get information out of your Vantage Vue and you succeed, maybe I can help you with an integration in HA. I already created an add-on called vantagepro2mqtt which uses this Python script and reads information from the serial port to get information from my Vantage Pro.

Thanks for the suggestion! If I’m not mistaking, the serial communication is still through a Davis console though?

I ended up ordering a Jung weather station, it’s got similar features and turned out much cheaper.

Maybe you can give this addon a try:

I myself own a Vantage Pro 2 and a WeatherLink Serial-port Data Logger. But the WeatherLink IP should work also.

Did you ever get this to work for you?