[PROJECT] Driver for Ambient API/Local and Ecowitt

I was more concerned that it was something local on my end.

That is what makes me wonder if it would be better to flag it somehow, so people know. Maybe have an event like AmbientStatus... with OK or not, but it would only be related to what the API sends back. It could be a more verbose message "Ambient Servers Unreachable".

That being said, I have an email off to Ambient to see if they have a status page that could be easily checked. That way if the driver hits an error I could query their page and provide whatever answer they are currently telling people. Instead of having to check Facebook (like I just did) and seeing what boils down to "we are having problems with our host, they are not responding, it could take a few days".

I’m still not getting a connection to their api. Is it working for anyone else of are they still having an issue. I didn’t see where they posted any updates to the issue on their API FB page ( which is just a weird thing to exist in the first place).

1 Like

Just tried a refresh on mine and it was successful. I'm only refreshing every 30 minutes. Really wish we could adjust the number of events retained though, I'm at 20k for this device. Looks like it's been working for the last few hours. I am using a different, modified, driver though. Similar calls, but I really didn't want the number of values that was provided and made each selectable.

1 Like

I check my account. Maybe something is wrong there. Looked like mine refreshed, but the values were wrong. Wasn’t showing the correct wind gust speeds, so I knew it was a problem somewhere. Thanks for confirming the problem is on my end.

Success! They said their TLS changes on March 30 would only affect Meteobridge users (which I don't have). I wonder if it screwed up the Application Key though. I have three, but only the first one they issued to me (before it was possible to do it yourself) was still working. The second one they created for me and the third I created on my own have stopped working.

Wish there was a way to delete the Application Keys like you're able to delete the API Keys :man_shrugging:

It's working, and I'm happy. Thanks again for the great driver @snell !

1 Like

@SmartHomePrimer: Glad to hear it is working for you. Odd that the Key broke. Wonder what they did on their end.

@Boredom: Yes... this is a problem for these that I am really not sure how to solve. There is so much variability in what each person could have for theirs (both just incoming data and what they want from it) that I have not been able to figure something out to solve this. The closest I can come up with is a batch of preferences to let people select what they want, but that would have to have ones for almost everything or be a very long multi-select list (or series of them).

I don't know that there's an easy solve. Everyone will want something different, which is why I didn't request a modification of your driver. Gave me an excuse to work a bit more within groovy.

If you think of something, let me know. As I hope this thread has shown, I try my best to make useful changes to the driver (or any of my drivers).

I have been debating whether there would be a way to make an app to handle some of this by making a separate driver that is just a giant configuration option that the app would then configure to the user's needs. But I do not know whether that is even a thing (I think it is based on the couple apps I have used) and I have done nothing with apps yet myself. So it would be a whole new learning experience.

Been getting the following error for several hours and can't find the source of the problem:

2020-04-16 07:00:22.179 am errorCountry Ln PWS - Error connecting to AmbientWeather: 408

Ambient Weather website is updating correctly and when I do my own API request, it comes back with a good, current response. Any suggestions?

I just gave it a try on mine without issue. Is it still happening? The 408 error is a general timeout, meaning the API did not respond before the Hubitat "gave up" on receiving the HTTP response.

Mine has cleared as well - now working fine. Must have been a network issue. Thanks.

No worries, better to check just to be sure.

Gotten these messages 3 times over past 24 hours. Not causing a problem, but thought I'd pass them along.

dev:3532020-04-18 05:16:24.925 am errorjava.lang.NullPointerException: Cannot invoke method size() on null object on line 435 (GetWeather)

dev:3532020-04-17 09:46:24.841 pm errorjava.lang.NullPointerException: Cannot invoke method size() on null object on line 435 (GetWeather)

dev:3532020-04-17 04:16:24.992 pm errorjava.lang.NullPointerException: Cannot invoke method size() on null object on line 435 (GetWeather)

I have noticed that lately at points. It appears the driver can connect to the API and get SOMETHING but not actually real results. I have a version coming that should fix it (trying to hit it more myself) but since it appears to be an API-side problem it is difficult to test.

I am hoping to have the updated driver this weekend, if I can get one of these problems to appear again so I can check. All I am going to be able to do is give a better error though, since the data is not being received.

UPDATED:
Version 0.98 is now posted and should handle these scenarios, plus some other minor cleanup.

The "java.lang.NullPointerException: Cannot invoke method size() on null object on line 435 (GetWeather)" increased in frequency and number over last 24 hours. Just updated to your Version 98 and will let you know how it goes. Thanks again for your hard work and responsiveness!

Let me know how it goes. I just checked my logs and did not have any hits at all last night. But that just means Ambient was working properly.

Not that the new version will make it get data. It will display an error that no data was received from Ambient.

I received one error around 8:46 AM since I installed the new driver (.98) around 6 AM EST:

dev:3532020-04-20 08:46:25.022 am errorCountry Ln PWS - No data returned by Ambient

dev:3532020-04-20 05:46:24.963 am errorjava.lang.NullPointerException: Cannot invoke method size() on null object on line 435 (GetWeather)

dev:3532020-04-20 01:16:24.911 am errorjava.lang.NullPointerException: Cannot invoke method size() on null object on line 435 (GetWeather)

dev:3532020-04-19 11:16:24.931 pm errorjava.lang.NullPointerException: Cannot invoke method size() on null object on line 435 (GetWeather)

dev:3532020-04-19 05:16:24.919 pm errorjava.lang.NullPointerException: Cannot invoke method size() on null object on line 435 (GetWeather)

dev:3532020-04-19 03:46:24.945 pm errorjava.lang.NullPointerException: Cannot invoke method size() on null object on line 435 (GetWeather)

dev:3532020-04-19 02:46:24.967 pm errorjava.lang.NullPointerException: Cannot invoke method size() on null object on line 435 (GetWeather)

dev:3532020-04-19 01:46:24.907 pm errorjava.lang.NullPointerException: Cannot invoke method size() on null object on line 435 (GetWeather)

dev:3532020-04-19 12:46:25.177 pm errorjava.lang.NullPointerException: Cannot invoke method size() on null object on line 435 (GetWeather)

Like the new description - unfortunately, the Ambient Weather API server has had a lot of issues the past couple of weeks.

Well, at least it is catching it now. You are getting a lot more of those than I was, but even from your log there it does not look like there is much consistency to it. Not like their server is having a fault for X hours, or some sort of repeating error.