OpenWeatherMap-Alerts-Weather-Driver

If you are a new OWM user you need to make sure you have subscribed to OWM's One Call By Call API 3.0 That is the API this driver uses. Once you have subscribed and put you API Key into the driver make sure you select the API Key Version 3.0 (On).

OWM does offer other services and those API's use different API Keys. Only the One Call By Call API Key works with this driver.

2 Likes

Thank you so much for taking the time to respond. I'll go give that a try.

Hi, I'm a little late to the party but have just spent the last 10 days off work setting up my entire Hubitat. Love the driver and all the features and data. I am however stuck on no icons on my tile and cannot seem to find where to update or point to. Tile is prefect and finally working after API issues, any help would be appreciated.

Something is preventing your system from finding the icons. Could be a new or changed firewall, virus software, Pi-Hole, browser filter, etc..., You may need to whitelist the location of the icons so your system can get to them. Icons are located here: https://tinyurl.com/icnqz/ which translates to here: https://raw.githubusercontent.com/HubitatCommunity/WeatherIcons/master/ . Make sure both are available and not blocked.

1 Like

Ok, another pitfall !

I registered to OpenWeatherMap to get temperature data. Open API 3.0 Free account to get an APP key which I got.

Configure OpenWeatherMap Driver with the appropriate information and since it is an Open API 3.0, I configured it to 3.0 rather than 2.5.

Wait 6 hours and i get the infamous 401 until it is ready to provide information....

then I got suspicious.

I tried the following HTTP in my browser :

https://api.openweathermap.org/data/2.5/weather?q=laval&appid=fb34cf1c92d72e5f85e2129d6fa61axx (not the real APPID),

and i got some information ( note it is 2.5 not 3.0). In fact I received :

{"coord":{"lon":-73.692,"lat":45.57},"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04n"}],"base":"stations","main":{"temp":272.7,"feels_like":269.03,"temp_min":272.02,"temp_max":273.72,"pressure":1009,"humidity":92},"visibility":10000,"wind":{"speed":3.09,"deg":300},"clouds":{"all":100},"dt":1668643803,"sys":{"type":2,"id":2013133,"country":"CA","sunrise":1668599730,"sunset":1668633831},"timezone":-18000,"id":6050610,"name":"Laval","cod":200}

Which looks valid ( in fact if I change one digit in my appid, nothings returns)

So I decided to switch to 2.5 in the driver, but I think the syntax for the HTTP request is not valid since it looks like this when generated by the driver :
https://api.openweathermap.org/data/2.5/onecall?lat=45.557300&lon=-73.772500&exclude=minutely,hourly&mode=json&units=imperial&appid=fb34cf1c92d72e5f85e2129d6fa61axx

Which obviously returns : OpenWeatherMap.org Weather Driver - WARNING: 401:Unauthorized

Any Idea ? Where should I start ?

Thanks

1 Like

onecall is a different key vs. not onecall.

If you sign up for a new key and don't give payment info, you won't get onecall key.

You won't be charged if you do give payment information so long as you stay under the api limits.

3 Likes

As @nh.schottfam said. If you do not have a valid One Call By Call API key. This driver will not work. Follow this to get your One Call By Call API key. Members

Understood - Hubitat is a powerfull ecosystem, but ... there is a lot of details to master. Did register and waiting a couple of hours to get the APP key activated... My understanding is that I have to regenerate another APP ID (at least that is what I did)...

Thanks

All good now. Thanks for making me someone more knowledgeable tonite

Cheers

J

1 Like

Matthew thank you, in the status in HE in drivers, I have a full data stream and I have icons and pictures clearly from your repository in the data. For the heck of it I changed the URL to github and it updated on my PC in chrome just like with tinyurl the icon appear inside drivers. I cannot get the tile to populate icons/art in Hubitat dashboard by Joe or in the HE stock dashboard. This is on a Fire HD 10 and my chrome browser. I feel so dumb for bothering you with this but my dashboard is incomplete =) Could I have missed something on the config page like "display icons" I am a bit overwhelmed by the toggles and choices. Maybe is missed something. So, update...I messed around in settings, pulled the driver from MakerAPI, added it back and I have graphics. Thank you for your help.

The driver uses a 'tinyurl' because dashboard tiles are limited to 1,024 characters, including all the HTML that is used to format those tiles. You are free to put the icons anywhere you like and the driver allows for that. Be aware the character length of the URL you do use may impact the presentation of the tiles. For example the default 'TinyURL' is 27 characters long. The full Github URL that it points to is 72 characters long, or 45 characters longer than the TinyURL. If the tile exceeds 1,024 characters it will not display at all. This driver will attempt to remove icons to shorten the overall length to make it presentable. There can be up to eight icons, depending on the tile, and the URL length you use must be repeated for each one of those. It does add up quickly.

To add this driver's dashboard tiles, see this post.

This driver does not directly feed any other driver's dashboard tiles? If by 'Hubitat dashboard by Joe' you are referring to this, then that is not a Hubitat platform dashboard, it is an Android app. That android app does present the same icons used in this driver (I have it on my android phone and the icons do appear). You would have to get with it's author to try to figure out why they do not show on your Android device.

I'm not sure what you mean by 'HE stock dashboard'? You would have to get the author of the 'HE stock dashboard' if you want them to make changes to that.

Hope that helps.

Matthew, I got it working, it was a setting in the driver. I looked at it 100 times and it just eluded me until I walked away for a while. Thank you for this driver and this config, you have created an amazing tool and a very nice addition to my smart home.

1 Like

DO I get right, that I need to have a subscription to get it working... Right now I see that there are onecall API calls that are unauthorized with 401 error, which means that my level of subscription is not good. Other manually created API calls like http://api.openweathermap.org/data/2.5/weather?id=5333689&appid=XXXXXXXXXXXXXXXXXXXXX work just fine

Correct. New users require a One Call By Call 3.0 subscription. The other 'manual' in NOT A One Call By Call API and will not work with this driver.

I have followed all of the instructions, I believe to a T. I have my virtual driver set up... I have gone through all the preferences per the wiki. I am unable to get any attribute options to show up on my tile screen for the dashboard despite having all of them enabled as options. What have I missed?

Turn on 'Extended Logging' and see what clues you may find in the logs.

I'm getting 404:Not Found and 401:Unauthorized. I generated an API as instructed and pasted it where it goes, I'm not sure what's going on.

Actually, I fixed that. I had it on 3.0 instead of 2.5 API... back on 2.5, it is not giving those errors now. But I'm still not able to select any attributes on the dashboard window. Only options I get are HSM Status, Mode status, and Last Updated... but now the 401 errors are starting again. Maybe I selected a too frequent polling option?

@Matthew I got a successful pull of info from weather.gov and then it defaulted back to using the API for openweather. Even so I still have no option to change the attribute to something other than the standard 3 options it gives me.

None of those are attributes exposed by this driver. I'm guessing you have setup the integrated OWM driver and are referecing that driver instead of this one. If you have installed this driver, when you created the virtual device and select a driver for it you need to open the driver drop down box and scroll to the bottom, past the system drivers, to the User driver section, then select this driver.