🌤 WUnderground data uploader

Description

A blueprint to upload Home Assistant sensor data to WUnderground.
The WUnderground data upload for weather stations is based on a GET request, so it is possible to achieve these results within an automation.
Yes, I know. WUnderground pulled a free service down, but I support the idea of a community based weather station.

This blueprint needs to execute a shell_command. This service needs to be enabled with, for example, the following YAML.

shell_command:
  curl_get: 'curl -X GET {{ url }}'

Disclaimer

The blueprint is created because the Netatmo to WUnderground upload isn’t working (it’s possible in the WUnderground ‘add station’ wizard, but fails). The sensor data is formatted based on the information in my available sensors and unit_of_measurement values, so there could be a bug in formatting.

Blueprint

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

Automation example


automation:
  - id: wunderground_data_upload
    alias: WUnderground data upload
    use_blueprint:
      path: wunderground_upload.yaml
      input:
      station_id: !secret wunderground_station_id
      station_key: !secret wunderground_station_key
      sensor_baro: 'sensor.outdoor_pressure'
      sensor_temp: 'sensor.outdoor_temperature'
      sensor_humidity: 'sensor.outdoor_humidity'
      sensor_rain: 'sensor.outdoor_rain'
      sensor_dailyrain: 'sensor.outdoor_rain_today'
      refresh_frequency: 300
      trigger_entities:
        - sensor.outdoor_temperature
        - sensor.outdoor_humidity
        - sensor.outdoor_rain
        - sensor.outdoor_rain_today
      curl_command_service: shell_command.curl_get

11 Likes

Thanks!!!

Works great here :smiley:

You’re welcome! During the rain today, I discovered the unit_of_measurement conversion for rain was incorrect.
I updated the blueprint and also added a roundoff of 2 decimals instead of 1 (for better mm to inch conversion).
For me it’s not clear how Home Assistant keeps track of blueprint updates, but please check if you have the latest version.

Update

The dewpoint temperature can be calculated based on the outdoor temperature and the outdoor humidity.
By default, it will be calculated. To disable this set calculate_dewpt to false.

Hello, I just came across the article and I’m not happy with the development of Wunderground either. I bought a weather station and registered it with Wunderground because of that and now it is no longer available in HA. could you help me to get this to work am a beginner and so this is a bit difficult.

There is a custom integration that retrieves data from WUnderground, the default WUnderground integration from Home Assistant doesn’t work.
See the Home-Assistant-wundergroundpws GitHub page for more info.

Thank you very much for your contribution! It was a great help!

Hi,
thanks for your contribution!
I just noticed that sensor_indoorhumidity should not have “temperature” as device class.

Thanks!

EDIT: actually there’s something more that is preventing this blueprint to work, I will investigate further. At the moment, after fixing that device class I mentioned, I get an error on curl_get shell command…

Thanks for the reply, I fixed it in the github file. Apparently, there is no warning for this if a sensor is added via YAML.

Dit you manage to add the curl_get to home-assistant? See the code below.

shell_command:
  curl_get: 'curl -X GET {{ url }}'

Howdy, HA noob here - I dont understand what I need to do with your shell command? eg do I put this in the configuration.yaml file or run it one time from the CLI?

Apologies in advance for the dumb question.

PS if I want the dew point calculated, do I need to manually create an entity for this data?

Btw, I tried putting these lines into configuration.yaml:

sensor:
  - platform: command_line
    command: SENSOR_COMMAND


shell_command:
  curl_get: 'curl -X GET {{ url }}'

But it doesnt seem to have any impact - Im still not seeing my Netatmo data appear in my Wunderground PWS. Im also not seeing any errors in HA logbook, so I’m a touch confused.

Screen Shot 2022-08-13 at 3.21.56 pm

NVM, Im an idiot - I was using the wrong key. I used the Access WU Data API key instead of the “Station Key”. :man_facepalming:

Love your work @dvandonkelaar it’s much appreciated. :sunglasses:

https://www.wunderground.com/dashboard/pws/IMELBO809

I know this thread is a bit old, but I just came across it to allow me to upload my non-networked Ambient weather data which I’m getting into HA via rtl433/MQTT. However, I had to do some work to get it working for some reason. It wouldn’t upload at all and kept giving an error:
Unable to determine action @ data[‘action’][0]. Got None

I initially gutted the action section to remove the check for the IDs since I knew they were set and I got it working, but I’ve since fixed it to work again. I also had some issues with some values not getting uploaded. This seemed to be a side effect of fixing the warning about the round() function and adding a default.

Finally, I added upload of Solar Radiation and UV Index.

My fork is here:

Hi, I am new to HA. I have troubles executing the blueprint. I got the following error:

Stopped because an error was encountered at September 23, 2022 at 9:14:25 AM (runtime: 0.02 seconds)
Template rendered invalid service: shell_command: curl_get: 'curl -X GET ’

probably i put the wrong text into CURL command service. what should I put there?

Post what you have for your Shell Command here and we can maybe see what’s wrong.
What you need (in your configuration.yaml file) is exactly as per the first post…so it should be

shell_command:
  curl_get: 'curl -X GET {{ url }}'

Thank you. I did like you suggested in the beginning and I am still getting the same error.
I have this entered:

That looks like a screen grab from Developer Tools within Home Assistant…the code posted needs to be in your config files (in configuration.yaml). Try that and you’ll be up and running.

(Developer Tools, where you are entering the command, is more for trying things out or running something once rather than a permanent thing.
Developer Tools - Home Assistant)

Thank you again. It seems Iike becouse I am a newbie I can set things up corerectly.
I have WUnderground upload in Blueprints, I create an automation and filled out all fields (a screen shot shows a portion of these filled out fields). Are saying that I need to update .yaml under Development Tool with the code?

I had the netatmo-wundeground integration working in node.js without any problems for 2 month until last week. Results were sent but where not shown on WU and that’s why I started to look for other ways and I came across HA. Unfortunatelly setting this up is above my possibilities.
Thanks anyway for your patience.

Hey…no worries…we all have to start from somewhere…still learning everyday myself on here :slight_smile:

Am with you now…the original screenshot was part of your automation (from the blueprint) so that makes sense…
The part you are missing (I think) is that you don’t have the Shell Command setup so that the Automation can call it…so you need to set this up.
To do that you’ll need to edit your configuration.yaml file and add the shell command…so outside of Home Assistant open your configuration.yaml file in whatever text/code editor you use (the file is in your Config directory - if you can’t access your config folder you might need to install for example the Samba addon to allow you browse to it) and add the code I quoted to the file…save it…reboot and with any luck you are good to go :+1:t2:

(let me know how you get on and we’ll get it sorted)

Thank you @dvandonkelaar ery much for your contribution! It was a great help!

I am trying to add the pm2.5 sensor to your blueprint, but unfortunately it doesn’t work :frowning:
I added some extra lines of code to your blueprint:

Do I have to add or change anything else?