OpenWeatherMap-Alerts-Weather-Driver

[UPDATED]
v0.2.0
09/21/2020

Changes:
Added forecast High/Low temp attributes for tomorrow (forecastHigh+1/forecastLow+1) and day-after-tomorrow (forecastHigh+2/forecastLow+2)

image

2 Likes

Wow that's what I call responsive development :smiley: Thank you, I will try it out tomorrow and give feedback.

Yep, working fine with my app, thank you very much :slight_smile:

1 Like

What is the process to update this driver?

Do I just Import the latest code using the link at the top of the comments and Save over the top of the existing driver? Do I then need to delete and recreate my 'Weather' virtual device?

Thx

Copy the latest code over the old code (replace it), and save the driver. It may not be necessary, but I always open the virtual driver and click 'Save', then 'Save preferences' just to make sure the new code is being used and the settings/schedules are reset to you preferences. There is no need to delete the old virtual driver and replace it unless you want reduce the number of de-selected optional attributes reported in Current States. From the driver notes ....

ATTRIBUTES CAUTION
The way the 'optional' attributes work:

  • Initially, only the optional attributes selected will show under 'Current States' and will be available in dashboards.
  • Once an attribute has been selected it too will show under 'Current States' and be available in dashboard. <*** HOWEVER ***> If you ever de-select the optional attribute, it will still show under 'Current States' and will still show as an attribute for dashboards BUT IT'S DATA WILL NO LONGER BE REFRESHED WITH DATA POLLS. This means what is shown on the 'Current States' and dashboard tiles for de-selected attributes may not be current valid data.
  • To my knowledge, the only way to remove the de-selected attribute from 'Current States' and not show it as available in the dashboard is to delete the virtual device and create a new one AND DO NOT SELECT the attribute you do not want to show.

Hi - I was just looking at this for my Android dashboard and was wondering if you could also break out the icon URL's as well? I see them in the threedayfcstTile but not anywhere else. My hope was to display something like this in a tile.. the forecastHigh+X values are perfect - just was hoping to get the icons too if possible.
image

Already there .... it is an Optional Attribute, just turn it on.
image

I noticed that - but was looking for a condition_icon_url+1 and condition_icon_url+2 if that makes sense.. to match the forecastHigh+1/forecastLow+1 fields that were added. Unless I'm missing it all I see is:

"condition_icon_url" : "https://tinyurl.com/y6xrbhpf/32.png"

Ahhhh. Those are not there. I'll add them in the next release.

1 Like

sorry, 1 more question (an easy one!) -- which of the optional attributes results in adding the weather state?

I'm using that weather attribute in my app to detect the built-in Hubitat weather device.. so I don't have to look for the device name = "weather" or something like that. I can look for another unique attribute but I know I saw 'weather' in there when I checked a whole bunch of optional attributes.. now, I can't figure out which one added it :slight_smile:

(update: here's what I'm talking about.. I use the MakerAPI to get back attributes for a given device. The weather one below isn't sent by default so I'm assuming it's one of the optional settings.

...
        "temperature" : "70",
        "weather" : "Clear sky",
        "humidity" : "48",

Also, FWIW - when I uncheck all optional attributes the Hub still displays all of the ones that it had before. I think that's expected (reading above posts) -- but, is there a way to clear them all out?

I did delete and re-add the device once.. if that's the only way to start over I can do it but wondering if another way existed

There is a 'weather' attribute/tile that is built into Hubitat.
image
It will work with my driver, but it is not part if my driver. If you want to use this turn on the optional attribute:
image

My driver has several pre-built tiles for dashboards:

myTile:
image

threedayfcstTile:
image

alertTile:
image

weatherSummary:
image

These tiles also have optional attributes that will need to be turned.

Hope that helps.

yep, that's what I was looking for -- the "Hubitat and OpenWeatherMap" one!

EDIT: Actually, it's the "Dash - SmartTiles" option that returns weather for me
image


The threedayfcstTile data is what I'm ultimately looking for - but I'm working on a native Android app and want to make all of the tiles native UI widgets (not using the default Hubitat dashboard - so I can't use the css/html code).

thanks!

[UPDATED]
v0.2.1
09/22/2020

Changes:
Added forecast icon url attributes for tomorrow (condition_icon_url1) and day-after-tomorrow (condition_icon_url2).

1 Like

awesome! that's going to make my weather widget look great

thanks,
joe

1 Like

How do I use the file? It's offering me Unified or Split rather than the usual Raw and something else. I am afraid I'm not very skilled with Github.

?? Who are you addressing this to? What 'file' are you referencing? Some context of your question would be helpful.

Sorry, the updated driver on Github. It looked different from how it did last couple of times I downloaded it in raw format. It had all pink and green bits comparing new and old. It's ok it's gone back to normal now

I use HPM.
Makes things much easier.

Glad you got it working.

[UPDATED]
v0.2.2
09/23/2020

Changes:
Removed 'urgency' restriction from weather.gov alert API poll. It was preventing some alerts from being shown.