OpenWeatherMap-Alerts-Weather-Driver

@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.

Yes I did that each time I’ve created the driver - I’ve tried multiple iterations of deleting and reinstalling it.

I am confused? Where are you seeing only 'HSM Status, Mode status, and Last Updated'?

You’ll get that with the attribute tile if the driver doesn’t / hasn’t exposed any attribute values. Do you have any Current State values showing above, if not have you clicked the Poll Data button?

@whimsicalimpulse The driver is not receiving a valid return from the API poll. If you look in the logs (with 'Extended Logging' turned on) you will probably see "Weather Driver - WARNING: 401:Unauthorized". This is not a issue with the driver. It is something you need to resolve with OWM. OWM is not recognizing your API Key as valid and is not returning data.

You may have an API key from OWM, but it is either not a 'One Call By Call' API key, or you did not put in payment information. In either of those cases, this driver will not work. Make sure you have a valid 'One Call By Call' API key. Go here to get a valid 'One Call By Call' API key.

2 Likes

Okay, that would be what the problem is. Sorry. How many calls per day does the app make? I’m trying to sort out how much it will cost per month.

You set the polling frequency in the driver preferences:

If you selected the lowest frequency in the driver pre-set options (every two minutes) you should stay under the 1,000 polls per day for free the API version 3.0 offers (30 polls per hour x 24 hours = 720 polls per day). The data in OWM's database probably does not update that frequently (varies by location) so polling every two minutes is not really necessary, or advisable. I am not certain, but I believe OWM may allow you to set the polling threshold on your account to limit exposure to charges on their platform.

1 Like

You can also set a limit of calls/day on your Open WeatherMap account. Since up to 1,000 is free for a One Call API account, I set my daily limit to 999. I don't think I got anywhere near that number yet.

1 Like

I'm so sorry I didn't understand how the API stuff worked. I finally have it all working. Thank you all for your help!!!

1 Like

Question, can you explain how weatherIcons relates to the icon in the driver? When I look up 50d on the openweather website

image

it can be used for any of the following

ID Main Description Icon
701 Mist mist 50d
711 Smoke Smoke 50d
721 Haze Haze 50d
731 Dust sand/ dust whirls 50d
741 Fog fog 50d
751 Sand sand 50d
761 Dust dust 50d
762 Ash volcanic ash 50d
771 Squall squalls 50d
781 Tornado tornado 50d

But the icon that is showing on the driver is for light rain which according to the openweather website, light rain should be d10
image

image

I'm asking because I would like to use the designation (d50, d10, etc...) for an alert I'm creating that would include the icon and weather summary.

UPDATE
I just realized I need to turn on Condition Icon/Text... I think.
image

Can we get the icon id added if possible?
image

The condition ID is not exposed in this driver. It is used extensively in the driver to set other attributes and the mapping on that condition_id can be found in the mapping table in the driver code at lines 1797-1854. You could expose the additional attribute of condition_id in your copy if the driver if it is important to you.

was customize the html - and noted the city shows 'Amity. US' instead of 'Amity, OR'. Is that pulled from the API? I city the myGetData('city') parse but dont see where the region comes from. Is there a way to modify?
image

The city displayed on the tiles is from what you have set in the preferences:


image

Is anyone still having polling issues? I added a RM to poll the device, but it isn't very effective, sometimes it works, sometimes it doesnt.

I am not aware of any polling issues. You set the polling frequency in the preferences. If you are not getting data turn on Extended Logging and look as the log for values there.

New to Hubitat and I'm trying to get this driver to work. I tried looking through this topic and I'm still a bit lost:

  1. Signed up for the Free Weather plan a few weeks ago. API key and everything works fine through the "built-in" "OpenWeatherMap" driver.

  2. Trying to use this driver with the same API key, I get this in the logs:

  1. Pasting the call directly into my browser I get this:

{"cod":401, "message": "Please note that using One Call 3.0 requires a separate subscription to the One Call by Call plan. Learn more here Pricing - OpenWeatherMap. If you have a valid subscription to the One Call by Call plan, but still receive this error, then please see Frequently Asked Questions - OpenWeatherMap for more info."}

Questions

  1. Are there multiple "free plan" types (I must have missed this)? Does it not subscribe to the One Call 3.0 service by default? Looking at the One Call 3.0 plan, I have to put in my information and credit card info? Is it not free?

  2. On the Hubitat Dashboard, what "template" are we supposed to choose for this driver? My current plan shows this:

Thanks for the help.

look back a few notes in this thread

2 Likes

Thank you @nh.schottfam, that resolved things.