OpenWeatherMap-Alerts-Weather-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.

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.