OpenWeatherMap-Alerts-Weather-Driver

You will need to need to turn on the On the optional attributes for those:
image
image

I have those two selected and they appear in the Device's Current States, however only forecast_text is available as an Attribute.


Please disregard the above. I haven't changed any settings for the Driver, however it's now exposing all States. :man_shrugging:t3:

2 Likes

Can you please replace the code that is generating these Logs:

with the Hubitat standard 'Enable descriptionText logging' Preference:

input "txtEnable", "bool", title: "Enable descriptionText logging", required: false, defaultValue: false

Doing so enables users to completely disable logging and adds your drivers to the txtEnable group in Preference Manager.

Thx

Update V0.6.2 released on August 23, 2022 moved those logs so they will only show if you have 'Extended Logging' enabled.

Okay, I updated, thanks.

Hello,

I have a question about the open weather map driver. I am trying to get this to work and am unable.

Here is the output from the logs:

It is saying 401:Unauthorized

However I have checked my API key and it works fine with this link:
http://api.openweathermap.org/data/2.5/weather?q=Berlin&APPID=XXXXX

I have played around with other links and can get all kinds of weather info I just cant get it to work with hubitat. I wonder if they changed their API call links? Is anyone else having this issue?

As an update I changed the URLs on lines 352 and 360 onecall -> weather and now my API key authenticates but then now there are some null pointer errors.

Not enough info to determine your issue, however is sounds like you are using the wrong version of the API. See this post. Hope that helps.

1 Like

Should maybe the driver default to 3.0 API keys for new users?

I just went through this myself - in the local driver, select 2.5 api. You don't get a 3.0 key unless you subscribe I think.

I have tried to set this up but I am not getting any data pulled through, I see the following in the logs

Definitely using the 2.5 API. Here is the error with the 2.5 API call.

I have also tried my key separately and by manually making calls through a browser and it works (though with a different link)

You can see it is polling the 2.5 version of the API

Any help would be hugely appreciated.

Thanks.

"Unauthorized". That mean OWM is not accepting your API key. That needs to be resolved before the driver will work.

What link? This driver uses the OWM 'OneCall' API and it will not work on any other API that OWM (or others?) may provide. Can you provide that so I can see what you are using?

If you are using the OneCall API, are you certain you have 2.5 API Key? Those are not issued any longer and you would have had to acquired it before they released the 3.0 API. An API 3.0 key will not work on the 2.5 API. I have also seen where someone acquired a 3.0 API key, but they never completed the payment info when they requested the key. Even though they had the API key, the 3.0 key they received did not work until valid payment information was input on their account.

1 Like

Oh so maybe I am missing a key piece of information here.

In order for this driver to work for new OWM members you have to pay for it and use the 3.0 version?

There is no longer a free way to make weather calls if you are new?

Just making sure I understand.

You need a valid API Key to use this driver. New OWM members can only obtain a 3.0 API Key, That does provide up to 1,000 API calls per day for free. However, if you exceed that limit OWM will charge you. OWM requires that you subscribe and provide a payment source, should you exceed the free allotment, to obtain a 3.0 API key.

In short, It could be 'free' if you remain under their thresholds. But they can (will?) charge your payment method if you exceeds those thresholds.

2 Likes

Yup, got it.

Reading and following directions.

So for any newbies struggling with this...
You HAVE to sign up for the 3.0 API and put a payment method in. It will be free under 1000 calls (hopefully stays that way....) and you have to select the 3.0 API on the hubitat device for OWM.

Thanks for everyone's patience.

It is possible to set a "do not exceed" a certain number of calls per day with OWN. Since 1,000 calls per day are allowed for free, I set my threshold at 999. Unless there's some massive error, I won't be getting anywhere near 1,000 daily calls anyway. I think I'm making about 50 calls per day.

Anyway, it's good to be able to set a do-not-exceed threshold to ensure you'll never have to pay anything.

Edit: Corrected typo - was 10,000 was intended to be 1,000. Now it's corrected.

Yup! My bad - good catch. I'll edit my post.

1 Like

Does anyone of you clever guys know how to get wind direction for tomorrow?


Probably just as accurate.

Seriously ... The One Call API does provide daily forecast of wind_deg , (direction), but this driver does not expose that. You could add it if you wanted to.

1 Like