Wunderground making the API call to plain http, getting unauthorized

Hi there, I am trying to get my own PWS data to show.

Now I configured https://github.com/home-assistant/core/tree/dev/homeassistant/components/wunderground
But in the log I see:

2020-04-27 08:37:00 ERROR (MainThread) [homeassistant.components.wunderground.sensor] Error fetching WUnderground data: ContentTypeError(“0, message=‘Attempt to decode JSON with unexpected mimetype: text/plain; charset=utf-8’, url='h**p://api.wunderground.com/api/<<MY_API>>/alerts/conditions/forecast/lang:EN/q/pws:<<MY_STATION>>.json”)

If I open it in the browser it gives back unauthorized. It’s plain HTTP, that might be why?

If in the browser I open the HTTPS URI it gets back:

{
  "response": {
  "version":"0.1",
  "termsofService":"h**p://w*w.wunderground.com/weather/api/d/terms.html",
  "features": {
  }
		,
	"error": {
		"type": "keynotfound"
		,"description": "this key does not exist"
	}
	}
}

To have it working the URI is different:
h**ps://api.weather.com/v2/pws/observations/current?stationId=<<MY_PWS_ID>>&format=json&units=e&apiKey=<<MY_API>>

Any idea here?

Thanks
David

Am I the only one not being able to get my own weather displayed?

Didn’t they shut down their API like a year ago?
I remember having a weather station on wunderground but then we had to switch to a home made setup last year.

No, if you have a station that reports you can use API.

Hi,
Did anyone ever get this to work?

I have a valid API key and I’m trying it again, but it’s still giving the same error:

Error fetching WUnderground data: ContentTypeError(“0, message=‘Attempt to decode JSON with unexpected mimetype: text/plain; charset=utf-8’, url='http://api.wunderground.com/api/4gjz4ghs/alerts/conditions/lang:EN/q/54.53909860965224,-1.5859901905059817.json”)

If there was even a way to simply retrieve Wunderground data from a station at a certain Lat Long without an API key, that would do.

Better yet, anyone know if Ecowitt custom server support has been added?

I just use the weather services that comes pre-installed on HA. Not too much time I want to loose here…
Sad, but for now I live with it…

I had a thought about this. although haven’t looked into it yet - even if it works it will be a long way round to do something that’s evidently supposed to be simple.

My thinking is this:

IFTTT interfaces with Sonoff devices / eWelink: Currently I can, even without Hassio, trigger lights to flash and heating to come on in response to Wunderground events.

I defined the Lat / Long to be same as my weather station and ITFFF certainly APPEARS to trigger based on events affecting MY weather station. This COULD be a fluke but it seems incredibly coincidental that when I artificially trigger wind speed or rain on my weather station, the set actions occur via IFTTT.

Assuming I really am causing these triggers from my station, it seems likely that Temp, Humidity, UV index, Solar Radiation, etc. are also available in the same way.

My questions, having only just thought of this but not yet having tested it, are:

  1. Can I poll IFTTT for this Temp, wind speed, gust, humidity, etc. data?
  2. Can I subsequently display these imported values in Hassio?
  3. Can I use these data to trigger other events?

I’ve been using Hassio for literally two days now - in fact I’m entering my 52nd hour if server up-time since 1st installing it. As such I have no idea what I’m doing, what’s possible and what is utterly pointless / futile / dimwitted.

Any ideas anyone? I will give it a try myself tomorrow after some sleep, but in the mean time if anyone can advise or has their own experience trying this I’d be fascinated to know.

If anyone has advice on pulling data from a database into Hassio and pulling data via SQL from a database, to use as an event trigger, that would be useful to - I’m discovered that some genius has devised a way to get Ecowitt’s ‘custom server’ option to write to a local database, so if I could poll that data every 10 seconds or something, to create a graph / trigger / whatever, that would be prefect.

Sorry for hijacking this thread with irrelevant questions. I’ll find the correct place to post them tomorrow.

Thanks in advance for assistance or thoughts anyone may have on this - if anyone knows of any decent forums for brainstorming that would help too. Apologies again - it’s all very new to me.