Ambient Weather api stopped working

Thanks, mine is 915 as well. I was looking at my current weather station and it is Wifi enabled (WS-5000) and I wonder if it can be tapped in to. How are you accessing the ecowitt data locally?

So, it looks like it isn’t possible to link to the Ambient, ordered the ecowitt and downloaded the integration via HACS… should be fun.

1 Like

has anyone got Ambient Weather to work natively with Home Assistant? I too get the “invalid API Key” error. Bit of a bummer as I bought this $250 device specifically for Home Assistant!

Natively? Do you mean local-only?

sorry. i mean without using ecowitt

I have a WS-1550-IP reporting to Ambient and Weather Underground. I’m currently using a group of scrape sensors to retrieve data from the live web page served by the observer module. I’m using WU data feed to provide forecast data. I had previously used the Ambient integration with success.

Hello I’m facing this issue today on Home Assistant Core 2022.5.5:

Logger: homeassistant.config_entries
Source: components/ambient_station/__init__.py:191
First occurred: 4:49:06 PM (1 occurrences)
Last logged: 4:49:06 PM

Error setting up entry cc794733a3bc for ambient_station
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 335, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/ambient_station/__init__.py", line 76, in async_setup_entry
    await ambient.ws_connect()
  File "/usr/src/homeassistant/homeassistant/components/ambient_station/__init__.py", line 191, in ws_connect
    await self.websocket.connect()
  File "/usr/local/lib/python3.9/site-packages/aioambient/websocket.py", line 156, in connect
    await self._sio.connect(
  File "/usr/local/lib/python3.9/site-packages/socketio/asyncio_client.py", line 109, in connect
    await self.eio.connect(url, headers=headers,
  File "/usr/local/lib/python3.9/site-packages/engineio/asyncio_client.py", line 111, in connect
    return await getattr(self, '_connect_' + self.transports[0])(
  File "/usr/local/lib/python3.9/site-packages/engineio/asyncio_client.py", line 306, in _connect_websocket
    ws = await self.http.ws_connect(
  File "/usr/local/lib/python3.9/site-packages/aiohttp/client.py", line 776, in _ws_connect
    resp = await self.request(
  File "/usr/local/lib/python3.9/site-packages/aiohttp/client.py", line 634, in _request
    break
  File "/usr/local/lib/python3.9/site-packages/aiohttp/helpers.py", line 721, in __exit__
    raise asyncio.TimeoutError from None
asyncio.exceptions.TimeoutError

hello, problem solved in hass 2022.7.1

I know this is old, but the API is acting up again and I also have a station that uses the observer module. Any chance you could share your scrape YAML? I’d love to get all the data locally and would rather not reinvent the wheel… :slight_smile:

Sure. Find it here

1 Like

I use this to convert wind direction from degrees to compass points. I use a sensors.yaml file to store my sensor definitions.

- platform: template
  sensors:
    weather_wind_dir:  
      friendly_name: 'Wind Direction'
      value_template: >
        {% set direction = ['N','NNE','NE','ENE','E','ESE','SE','SSE','S','SSW','SW','WSW','W','WNW','NW','NNW','N'] %}
        {% set degree = states('sensor.wind_direction')|float %}
        {{ direction[((degree+11.25)/22.5)|int] }}

Here are the sensors I use:

- platform: pws_scrape
  name: pws_scrape
  resource: 'http://<*observer IP*>/livedata.htm'
  selectors:
    temp_indoor:
      name: Indoor Temperature
      select: "input:nth-child(1)"
      index: 4
      unit_of_measurement: '°F'
    humidity_indoor:
      name: Indoor Humidity
      select: "input:nth-child(1)"
      index: 5
      unit_of_measurement: '%'
    temp_outdoor:
      name: Outdoor Temperature
      select: "input:nth-child(1)"
      index: 8
      unit_of_measurement: '°F'
    humidity_outdoor:
      name: Outdoor Humidity
      select: "input:nth-child(1)"
      index: 9
      unit_of_measurement: '%'
    wind_direction:
      name: Wind Direction
      select: "input:nth-child(1)"
      index: 10
    wind_speed:
      name: Wind Speed
      select: "input:nth-child(1)"
      index: 11
      unit_of_measurement: 'mph'
    wind_gustspeed:
      name: Gust Wind Speed
      select: "input:nth-child(1)"
      index: 12
      unit_of_measurement: 'mph'
    wind_maxgustspeed:
      name: Max Gust Wind Speed
      select: "input:nth-child(1)"
      index: 13
      unit_of_measurement: 'mph'
    solar_radiation:
      name: Solar Radiation
      select: "input:nth-child(1)"
      index: 14
      unit_of_measurement: 'w/m2'
    rain_rate:
      name: Rain Rate
      select: "input:nth-child(1)"
      index: 18
      unit_of_measurement: 'in/h'
    rain_event:
      name: Precipitation Event
      select: "input:nth-child(1)"
      index: 19
      unit_of_measurement: 'in'
    daily_rain:
      name: Daily Rain
      select: "input:nth-child(1)"
      index: 20
    weekly_rain:
      name: Weekly Rain
      select: "input:nth-child(1)"
      index: 21
    monthly_rain:
      name: Monthly Rain
      select: "input:nth-child(1)"
      index: 22
      unit_of_measurement: 'in'
    yearly_rain:
      name: Annual Rain
      select: "input:nth-child(1)"
      index: 23
    pws_battery:
      name: PWS Battery
      select: "input:nth-child(2)"
      index: 1
#    climate_battery: ***Not currently used***
#      name: AV Closet Battery
#      select: "input:nth-child(2)"
#      index: 0

Thanks for sharing! A little effort switching over to this now will be worth it to avoid dealing with another unnecessary cloud service (not to mention it currently being down). Thanks again!