Davis WeatherLink Integration

To follow up, I can retrieve local data directly from the WLL logger now, using the setup given in the first post of this thread, with

resource: 'http://192.168.1.199/v1/current_conditions'

where 192.168.1.199 is the local IP address of the WLL. That provides the basic data, and there isn’t any need to use the v2 internet API. I’ve tried that in Python, and it works, but it’s much more complicated as it needs fresh hash functions and signatures to be calculated programatically before every call to the API - which would probably need a Python integration. With my fairly simple setup there’s no advantage in doing that.

What is this:
“ts”: 1567218910

Got this working well thank you but a few issues with some sensors if anyone can help please.

Pressure sensor not working, think its due to it being read from Weatherlink LIve logger rather than the Vue??

      vantage_pressure:
        friendly_name: 'Vantage Pressure'
        device_class: pressure
        value_template: '{{ state_attr("sensor.davis_vantage_vue_curr", "data")["conditions"][0]["bar_absolute"] }}'
{"lsid":420384,"data_structure_type":3,"bar_sea_level":29.997,"bar_trend":null,"bar_absolute":29.983}]},"error":null}

Rain sensor is giving readings of like 50, 5 when it should be in mm so more like 5.0 and 0.5.

      vantage_rain_rate_last:
        friendly_name: 'Vantage Rain Rate'
        unit_of_measurement: "mm"
        value_template: '{{ state_attr("sensor.davis_vantage_vue_curr", "data")["conditions"][0]["rain_rate_last"] }}'

Also just found this which works with Weatherlink Live modules:

2 Likes

" Additionally, each weather observation data record in the data array will contain a ts field in addition to the weather observation data fields. The ts field is the Unix timestamp of the data record"

For anybody wanting to get data from a Weatherlink Live (WLL) unit, siku2/hass-weatherlink works really well for me:

3 Likes

Mutley,

I can’t get my HA reading from the Weatherlink API. I have copied your code (as below). (I have substituted username, password and APItoken for my real values.)

  • do I enclode them in quotes as shown - or no quotes? (couldn’t get either to work)
  • is there really a zero in there - as in “…0$pass=…” ?

I have to resort to using the weatherlink API method as it seems my old Weatherlink IP data logger doesn’t allow me to use the direct, local method.

Ian

# Davis weather station - read from weatherlink API
  - platform: rest
    resource: https://api.weatherlink.com/v1/NoaaExt.json?user="username"0&pass="password"&apiToken="APItoken"
#   resource: https://api.weatherlink.com/v1/NoaaExt.json?user=<REDACTED>0&pass=<REDACTED>&apiToken=<REDACTED>
    scan_interval: 600
    name: weatherlink
    json_attributes:
    - temp_c
    - davis_current_observation
    value_template: '{{ value_json.weatherlink }}'
    ```

I have made some progress - but nowhere near enough!

I investigated the Davis API documentation and realised I had to use my DeviceID, and not my Weatherlink username in the string. If I enter the full string into a browser now, I get the reply with all the weather data. However, I still can’t see any entities in the Developer Tools.

If I have just the 8 lines as above, should I see sensor.weatherlink in Developer Tools? (I’m guessing so because that is referred to in the “platform: templte” lines that follow

Ian

More work based on mutley’s configuration:

  • following mutley’s config, as seen in Developer Tools, I now have:
    • sensor.weatherlink with no value (importantly - no error message, so I’m assuming this is all good)
    • sensor.inside_temp is “unavailable” - why would this be ?
    • sensor.outside_temp is “unknown” - why would this be ?

Hello, What do I put as HOST? I upload my data to WeatherLink.com WeatherHA

Is it working only in LAN?

I solved my problem using the Weatherlink API v1 as demonstrated by Muttley was above. I had the same trouble as Ben - I was using the xml version of the call - not the JSON version.

did you manage to work out what goes in the host?

Could someone solve this topic with the rain sensor ?

I also implemented my weatherlink with the “rest” API. Temperatures and humidity work fine, but the value for the rain I just have to divide by 5 - but how to do that easily ?

Is that possible directly in the code:

      rainfall_monthly:
        friendly_name: 'Regen Monat'
        unit_of_measurement: "mm"
        value_template: '{{ state_attr("sensor.davis_vantage_Weatherlink", "data")["conditions"][0]["rainfall_monthly"] }}'

Thank you for your reply !

Greets Karl

I moved onto using this integration now : GitHub - siku2/hass-weatherlink: Home Assistant integration for Davis Instruments' WeatherLink and AirLink

Have worked with the developer to test and incorporate bits and am happy with how it runs.

Sorry I cant assist any further.

I found the solution now.

I created an extra sensor, taking the counted value dividing it by the right value (in my case 5).

      rainfall_24h:
        friendly_name: 'Regen 24h'
        unit_of_measurement: "counts"
        value_template: '{{ state_attr("sensor.davis_vantage_Weatherlink", "data")["conditions"][0]["rainfall_last_24_hr"] }}'
      rainfall_24h_mm:
        friendly_name: 'Regen 24h'
        unit_of_measurement: "mm"
        value_template: "{{ states('sensor.rainfall_24h') | float / 5 }}"

Hi! I too am trying to connect a Davis VantagePro 2 into home assistant. Im still a newbie so please be patient with me. How were you able to connect using lan? My Davis instrument has no lan cable…

How does it connect to the internet? If it just connect to the console with no upload to the web i dont believe it will work.

Mine uses the newer Weatherlink Live device to upload.

Good evening
I have recently purchased a Davis Vantage pro 2 station and I wanted to know if someone can please ask me how to read it from Home Assistant?
I saw that some of you have created a fantastic list with all the values in Lovelace and it would be great to have it and do some automation with that data.
I also have Weatherlink live.

I await your rebate.

Greetings and Thanks

I would recommend trying this as a starting point, much easier than custom sensors. I do also have some customs sensors which I can share but try the link first.

1 Like