OpenWeatherMap-Alerts-Weather-Driver

Hi there, I'm a newbie and struggling with this this (and the in built driver). I've set up my OpenWeatherMap account and my API seems to be active, but I'm stuck with the following error in the logs, any advice? (As its my first community post, I can't embed links or add attachments, so I've had to add spaces in the below).

2021-06-08 08:43:13.220 [warn](http:// 192.168.1.112/device/edit/40)OpenWeatherMap. org Weather Driver - WARNING: 401:Unauthorized

(http ://XXXX/logs#pastdev40)2021-06-08 08:43:13.217 [warn](http ://XXXX/device/edit/40)OpenWeatherMap .org Weather Driver - WARNING: Calling http s://api.openweathermap.org/data/2.5/onecall?lat=XXXXX4&lon=XXXXX&exclude=minutely,hourly&mode=json&units=imperial&appid=api.openweathermap .org/data/2.5/weather?q=XXXXX&appid=XXXXX

Your API key is not valid or is not activated yet. verify you have the correct API Key and that it is activate, then try again.

Or ... Maybe this ....

2 Likes

Thanks for replying to me. I thought it would be the API, but I've given it a few days to be sure. I've visited the api address in a browser and it seems to work fine...

Open the virtual device and verify the API is correct then hit 'Save Preferences'. If that does not correct it I would uninstall the virtual device and the driver, then start over with a fresh install.

No luck I'm afraid.

The built in weather has a similar issue. Which makes me think there is something wrong with the API.

dev:432021-06-08 16:01:50.117 warnOpenWeatherMap - getWeather() execption groovyx.net.http.HttpResponseException: Unauthorized

Is the below format correct?

api.openweathermap.org/data/2.5/weather?q=London&appid=xxxxxxx

That is not from this driver? This driver API call is structured as:
https://api.openweathermap.org/data/2.5/onecall?lat=' + (String)altLat + '&lon=' + (String)altLon + '&exclude=minutely,hourly&mode=json&units=imperial&appid=' + (String)apiKey

1 Like

I worked it out...I was doing what OpenWeather were telling me to in their FAQ'S.

I was entering the whole api address in the driver and not just the api. Doh.

Thanks for your help.

1 Like

Hello! I'm hoping someone knows the answer to this.

I've set my alerts to Weather.gov:

image

When I look at the device in Hubitat, it displays the correct Alerts:

image

But, when I pull the alert from webCoRE with $weather, or look in the storage (Dump weather structure), it has the wrong alert (or just named wrong):

image

It seems like one is using Weather.gov, and the other (Dump weather structure) is using OWM.

The correct alert here is: Beach Hazards Statement

Does anyone know how to fix this?

Thank you.

Edit: Additional information: With the $weather and the Dump Weather Structure, I've also noticed that it has skipped some Severe Thunderstorm Watch alerts, and instead showed a Marine Watch.

I'm still new to Hubitat so I'm still struggling with things. Right now I would like to find a simple basic install instructions for adding OWM to my system?
Thanks.

So, I've been using this app for a little while now and I have to say, I love it. It's awesome.

I had a question about how weather alerts are displayed. I created an alerts tile on one of my dashboards. I have noticed that when there is more than one alert issued for my area, it will only display the first alert, then followed by a number indicating how many more alerts are active. Here is a screen shot of what I mean:

owm-alerts

Is there any way to make this display all of the alerts on the tile?

No. It will only list the first alert provided by the service. However, you can click on the red alert text and that is a hyperlink that will take you to the services' detailed alert page. That should have information on all alerts for the area.

1 Like

@Matthew: My weather tile was not showing any data. That is until I discovered this little gem of information. I had taken the OpenWeatherMap template above and not scrolled down to the User area as described above.
Thank you so much for posting this as now my Weather tile is working fine.

1 Like

Can't seem to get Three day forecast tile to work. Can you point me to a good install process?
Thanks.

See this post.

You Rock man!! Worked perfectly. Really enjoy your app.

Where in the app code would you insert this. Very new to the code so still working on understanding.
Thanks.

That code goes in the CSS tab for the dashboard that you are adding the Weather Tile to.

Just loaded this driver and setup a test dashboard with just the MyTile. It all looks pretty good with 3 exceptions:

  1. Between the Temperature and the Feels Like there is the word Null -- Where can I get rid of that?
  2. CAn I remove the location at the top of the tile
  3. Can I remove the name of the device from the bottom?

Thanks!

  1. That is the icon for the current conditions. If it says Null then it cannot find the icon it is looking for in the location you are point it to. Make sure your icons are available at the location you specified here:
    image
    or use the default location to pull them from GitHub.
  2. You can put as space in this field:
    image
    But them the other areas where that is used will also be blank (Weather Summary, Alert tile). It was not intended to be omittable.
  3. You can do that with any dashboard tile (not specific to this driver). Look here: The Noob's (in)complete guide to CSS for Hubitat

Thanks Matthew.

I have the url for the icons as default. If I browse to that url I go to: https://raw.githubusercontent.com/HubitatCommunity/WeatherIcons/master/
So I think that is correct

I get 400 invalid request