Ambient Weather api stopped working

Thanks, Gary! There were two Integrations for Ambient Weather, I deleted them both, restarted the server, and I now “I have weather!”

Thanks again.

I deleted the integration and when I try to reinstall it I get “Invalid API Key and/or Application Key”.
I confirmed they are correct in my Ambient Weather profile.

I may have spoken too soon. It worked great the first time I restarted the server. But when I had to restart the server again, it appears to hang on “Attempting WebSocket connection to wss://dash2.ambientweather.net/socket.io/?api=1&applicationKey=…”

Stopped working for me August 1 18:50 Eastern time, then started working again briefly (about 5 hours) yesterday, then stopped again. I tried generating new API and App keys in ambientweather’s UI but that didn’t affect anything. Thought maybe it was a problem with HA so pulled in the newest Docker image but same thing. Glad to see at least it’s not just me. I imagine the issue must be on Ambient’s side.

same here… was struggling with something else and thought I must have messed up ambient, but I am glad to see it is not me for once!

Same here - delete integration re-add it = works Restarted HA - broken again. Created new API and app jeys - cannot configure it anymore “Invalid API Key and/or Application Key”
Added manually on configuration yaml file - shows that it needs to be Configured
Nothing works anymore

I found that you must close out of the Ambient site before you try using HA or it will give you the invalid keys error.

I asked on Twitter and they confirmed their API is down and they’re working on it:

Looks like there is some sort of fix coming in 0.113.4, https://github.com/home-assistant/core/issues/38512. Can’t get here soon enough. :partying_face:

Seems to be back up (for now…)
After a reboot (to update HACS) sensors started showing up again.
13:03 US Central Time

Did you recreate an API key or use your original one? Just restarted HA clean (because we had some power blips here thanks to the storms) and Ambient isn’t reporting.

I’ve got all sensors reporting after a restart earlier today using my original integration.

UPDATE: A subsequent restart broke the integration again. Just waiting for the HA update now.

Same here, it works again after a restart. (homeassistant==0.113.1 & aioambient==1.1.1)

I upgraded to 0.113.3 at about midnight last night. HA did not discover Ambient Weather. So I added api_key and app_key into configuration.yaml and restarted. All Ambient Weather sensors were found and it ran nicely until about 8 this morning. The log shows watchdogs every 2 minutes

2020-08-04 07:14:37 INFO (MainThread) [aioambient.websocket] Watchdog triggered – sleeping for 900 seconds

With this response every 1 to 14 minutes

2020-08-04 07:28:47 INFO (MainThread) [engineio.client] Received packet MESSAGE data 2[“shares created”,{“__v”:0,“url”:"https: …

At 7:56 AM

2020-08-04 07:57:06 INFO (MainThread) [homeassistant.components.ambient_station] Disconnected from websocket
2020-08-04 07:57:07 INFO (MainThread) [engineio.client] Attempting WebSocket connection to wss://dash2.ambientweather.net/socket.io/?api=1&applicationKey=…
2020-08-04 08:11:37 INFO (MainThread) [aioambient.websocket] Watchdog expired – calling reconnect
2020-08-04 08:11:38 INFO (MainThread) [engineio.client] Attempting WebSocket connection to wss://dash2.ambientweather.net/socket.io/?api=1&applicationKey=…

Then nothing ever again. I restarted the server with the ambient_station section of configuration.yaml commented out. No discovery, just a hung attempt to connect websocket. I uncommented the ambient_station section, and still just hangs at the websocket.

It looks like the ambient_station is truly broken and I’ll have to find a different home automation software to access my still-functioning-fine weather station.

Take a look up a couple of posts, there is hopefully a fix in 113.4. I went over to GitHub and looked at the changes made to the api URL in the integration and edited the two files manually myself. My station has been working ever since.

I have HA 110.3 and it’s working again as of 8/4.

I bounced the HA server and Ambient Weather data is coming in now:

I have been having intermittent issues since it started working on Monday (ish). It self recovers but it will be out for a few hours at a time randomly. Not a helpful comment, but just noting it’s intermittent.

Same experience here.

I was tried but was unable to correctly configure a scrape sensor to pull data directly from the local ObserverIP HTML file for current observations (Live Data page). Has anyone else had any success?

It’s randomly sporadic. In testing with the RESTful API I found that there were sometimes SSL errors. I contacted Ambient Weather support about that. They appear to be on api.ambientweather.net only and not on dash2.ambientweather.net, so may or may not be related to our problem. If they are related to our problem, than it’s possible ambient_station is responding well to the errors. If, on the other hand, it’s not caused by server-side errors, than we have more work to do.

When ambient-station hangs, the last messages from ambient-station is a websocket connection attempt. I put some diagnostic messages in two places. What I’ve learned so far is that the connection completed with no errors, and something else dropped the ball after that.

The messages I added are:

“begin/end instantiating ambient weather socket” to bracket the instantiation of the Websocket object in aioambient::Client

“begin ambient websocket connect” and “ambient websocket connect completed with no errors” to bracket the call to connect() in ambient_station::__init__py method _attempt_connect()

Log output for an unsuccessful start:

2020-08-06 00:27:26 INFO (MainThread) [homeassistant.setup] Setting up ambient_station
2020-08-06 00:27:26 INFO (MainThread) [homeassistant.setup] Setup of domain ambient_station took 0.1 seconds
2020-08-06 00:27:27 INFO (MainThread) [aioambient.client] begin instantiating ambient weather socket
2020-08-06 00:27:27 INFO (MainThread) [aioambient.client] end instantiating ambient weather socket
2020-08-06 00:27:27 INFO (MainThread) [custom_components.ambient_station] start attempting ambient websocket
2020-08-06 00:27:27 INFO (MainThread) [engineio.client] Attempting WebSocket connection to wss://rt.ambientweather.net/socket.io/?api=1&applicationKey=358fd207157941af90c4f46e00abedda2ffa6e0f6c8349ca85414eaa6ac559ee&transport=websocket&EIO=3
2020-08-06 00:27:28 INFO (MainThread) [custom_components.ambient_station] done attempting ambient websocket

Then nothing after that forever (or until next server restart).

Here’s what a successful start looks like:

2020-08-06 00:29:15 INFO (MainThread) [homeassistant.setup] Setting up ambient_station
2020-08-06 00:29:15 INFO (MainThread) [homeassistant.setup] Setup of domain ambient_station took 0.2 seconds
2020-08-06 00:29:16 INFO (MainThread) [aioambient.client] start ambient weather socket
2020-08-06 00:29:16 INFO (MainThread) [aioambient.client] end ambient weather socket
2020-08-06 00:29:16 INFO (MainThread) [custom_components.ambient_station] begin ambient websocket connect
2020-08-06 00:29:16 INFO (MainThread) [engineio.client] Attempting WebSocket connection to wss://rt.ambientweather.net/socket.io/?api=1&applicationKey=358fd207157941af90c4f46e00abedda2ffa6e0f6c8349ca85414eaa6ac559ee&transport=websocket&EIO=3
2020-08-06 00:29:16 INFO (MainThread) [custom_components.ambient_station] ambient websocket connect completed with no errors
2020-08-06 00:29:16 INFO (MainThread) [aioambient.websocket] Watchdog triggered – sleeping for 900 seconds
2020-08-06 00:29:16 INFO (MainThread) [custom_components.ambient_station] Connected to websocket
2020-08-06 00:29:16 INFO (MainThread) [aioambient.websocket] Watchdog triggered – sleeping for 900 seconds
2020-08-06 00:29:16 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up binary_sensor.ambient_station
2020-08-06 00:29:17 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.ambient_station
2020-08-06 00:29:41 INFO (MainThread) [aioambient.websocket] Watchdog triggered – sleeping for 900 seconds