OpenWeatherMap-Alerts-Weather-Driver

Just installed this driver - Excellent work!

I have noticed that each time, the data automatically refreshes or I manually poll or refresh data, additional forecast fields are added.


If I refresh the browser page, the additional ones are removed..
Any clue why?
Cheers

I expect you are seeing an HE dashboard problem. I think it started when the variables with names +1, +2 were added.

I agree with @nh.schottfam. I started to see that when the "+1" and "+2" attributes were added. I may remove the "+" from those names in the next update and see if that resolves the issue.

1 Like

@Matthew, how about have the option in the settings on how you want it and have the default setting determined with this vote?

3 Likes

[UPDATED]
v0.3.6
10/27/2020

Changes:

  • There is now an option for the threedayfcstTile to show 'High/Low' or 'Low/High'. The default will remain the current 'Low/High' so no action is required if you want keep that. If you want to show 'High/Low' there is a new toggle in the Optional Attributes that you will need to turn 'On':
    image

  • All attributes that had the '+' symbol ( e.g. 'forecastDay+1') in them have had that symbol removed. It was causing multiple duplicate displays on the 'Current States' section of the driver (it appended new reading instead of replacing them). If you use any these attributes in rules, dashboards or WebCoRE you will want to update those for the new names
    image

  • Minor bug fixes

SPECIAL NOTE IF YOU ARE UPDATING FROM A VERSION PRIOR TO V0.3.2:
(not required if you have version V.0.3.2 or higher already installed or you are doing a first time install)

The suggested updated method with HPM is to do a new install with the new driver (without the 'NWS' in the filename. Once installed, go to your virtual device and update the driver to use the new driver. You can use HPM to delete the old driver as follows: Do an 'Uninstall. If there are two drivers listed with the same name, click on the first "OpenWeatherMap-Alerts Weather Driver". The app asked if I wanted to delete "OpenWeatherMap- NWS -Alerts Weather Driver". Should you pick the wrong one (the one WITHOUT 'NWS' in the name), cancel and retry with the other selection. (Thanks @arnb for those details).

If you do not use HPM then since the filename and the directory name has changed you will need to copy the code and paste it over your current driver. (You cannot use the ImportURL for this this one time because the name and location has changed). Once installed, go to your virtual device and check/update the driver to make sure it is using the new driver.

3 Likes

[UPDATED]
v0.3.7
10/27/2020

Changes:

Minor bug fixes:

  • Fixed an issue where alertDescr and alertSender were not cleared when weather alerts cleared.
  • Fixed and issue that was causing the 'Android app for wall mounted tablets app to display nighttime icons for forecast days during the evening. Future days will now always display daytime icons like the threedayfcstTile does. I also notified the developer that some attribute names changed in the last update and those need to be updated in that app's weather tile.

SPECIAL NOTE IF YOU ARE UPDATING FROM A VERSION PRIOR TO V0.3.2:
(not required if you have version V.0.3.2 or higher already installed or you are doing a first time install)

The suggested updated method with HPM is to do a new install with the new driver (without the 'NWS' in the filename. Once installed, go to your virtual device and update the driver to use the new driver. You can use HPM to delete the old driver as follows: Do an 'Uninstall. If there are two drivers listed with the same name, click on the first "OpenWeatherMap-Alerts Weather Driver". The app asked if I wanted to delete "OpenWeatherMap- NWS -Alerts Weather Driver". Should you pick the wrong one (the one WITHOUT 'NWS' in the name), cancel and retry with the other selection. (Thanks @arnb for those details).

If you do not use HPM then since the filename and the directory name has changed you will need to copy the code and paste it over your current driver. (You cannot use the ImportURL for this this one time because the name and location has changed). Once installed, go to your virtual device and check/update the driver to make sure it is using the new driver.

1 Like

Thanks - This has fixed this issue!!

@Matthew Im curious to know if you had seen this article that PoP is now included the API and was wondering if this can be added?

but I would assume if if was possible you would have it included already.
Anyway, thanks for the great driver!!

2 Likes

I had not. Thank you. I will bring that into the driver soon.

4 Likes

No worries.. look forward to the update

I noticed I was running an older version (2.4 I think) so I uninstalled and then installed the latest version via Hubitat Package Manager and just had a couple of quick questions:

  • I'm trying to play with the various options to figure out which one manages which attributes.. but, when un-checking an option it seems like the attribute doesn't get cleared. For example, I checked Three Day Forecast Tile and unchecked it but I'm still getting the threedayfcstTile attribute. Is there a way to clear all attributes so I can see which ones get enabled by each option?
  • I also noticed a couple of times when I checked an option nothing happened (no new attribute appeared). I hit Refresh in the device but still didn't see any changes. Does refresh always go through or will it ever delay for some reason?

side-note - I'm looking at the attributes as reported in MakerAPI.. not sure if that makes a difference or not but wanted to make note

thanks,
joe

Once an attribute is selected and populated, the only way to clear it from the 'Current States' list is to Delete the virtual driver and create a new virtual driver. Otherwise the 'unselected' attribute will remain on the 'Current States' list, but will not update. This is an issue with the Hubitat platform and not specific to this driver.

Once you select an attribute you will need to wait until the next poll is done for it to populate. 'Save Preferences' will clear schedules and establish new scheduled polling according to the intervals you selected. You can also click the 'Poll' command to force a polling.

Hope this helps.

thanks for the quick reply!

This is an issue with the Hubitat platform

I feel like I heard that before but keep forgetting..

Another quick question - is there an attribute for when the weather was last updated? I see it's in the weatherSummary but no where else. Just figured that'd be useful to some folks but maybe not..

   {
      "name": "weatherSummary",
      "currentValue": "Weather summary for Matthews updated at 11:59 AM on 10/28/2020. Mist with a high of  69°F and a low of  62°F. Humidity is 93% and the temperature is  67°F. The temperature feels like it is  72°F. Wind: Light air from the Southwest at   1 MPH, gusts: up to 1 MPH. There has been  no precipitation today. Visibility is around   4 miles.",
      "dataType": "STRING"
    },

last question.. more curious really.. I noticed all of the attribute names are returned no matter what options are checked (with 'null' as the values for the unchecked fields). Is there a performance reason for not just fetching and setting all of this optional data? Or is it more of a bandwidth reason? Not saying most people would even be able to use it all anyway -- but given the fact that the fields are already being returned (at least MakerAPI.. not sure if that's the same for native dashboard) just wondering why not just set it all

There is an optional attribute for that:
image

It will give you:
image
(Poll is when you requested the data; Observation is when the timestamp when it was recorded by OWM)

The reason for not publishing all the attributes is database performance. HE has gotten better and now allows you to limit the number of historical observations to retain, which greatly helps. But if you do not use attributes then those are needlessly stored in the database and updated often, which impacts hub performance. The driver is designed to minimize hub impact by minimizing the writing a large number of attributes to the database.

Hope that helps.

[UPDATED]
v0.3.8
10/28/2020

Changes:

  • Added Probability of Precipitation (PoP) from OWM (newly available). The optional attribute is 'percentPrecip'. Also added it to the threedayfcstTile and weatherSummary.
  • Bug fixes and code and string reductions (by @nh.schottfam).

SPECIAL NOTE IF YOU ARE UPDATING FROM A VERSION PRIOR TO V0.3.2:
(not required if you have version V.0.3.2 or higher already installed or you are doing a first time install)

The suggested updated method with HPM is to do a new install with the new driver (without the 'NWS' in the filename. Once installed, go to your virtual device and update the driver to use the new driver. You can use HPM to delete the old driver as follows: Do an 'Uninstall. If there are two drivers listed with the same name, click on the first "OpenWeatherMap-Alerts Weather Driver". The app asked if I wanted to delete "OpenWeatherMap- NWS -Alerts Weather Driver". Should you pick the wrong one (the one WITHOUT 'NWS' in the name), cancel and retry with the other selection. (Thanks @arnb for those details).

If you do not use HPM then since the filename and the directory name has changed you will need to copy the code and paste it over your current driver. (You cannot use the ImportURL for this this one time because the name and location has changed). Once installed, go to your virtual device and check/update the driver to make sure it is using the new driver.

1 Like

Something is wrong with the % and precip amounts. Prior to update precip for tomorrow was 1.something inches. (my tile is scrolled to save space)

image

image

image

It looks like I need to multiple the PoP by 100. My daily Poll shows 0 for all seven days so I was not sure it that the number representing a percentage (50) or and actual percentage (0.50). I will multiple it by 100. As far as the volume .... I didn't make any changes to that (at least I didn't intent to)? I'll take a look at it too.

Thanks for the feedback.

Seeing this error in the logs. Any ideas how to fix?

I too am seeing some irregularities with PoP.
In the 3 day forecast tile is shows PoP as .99% & 7mm, but in the 8day forecast & hourly graph from OWM site (yes, hourly is set to Friday) it show as 16.8mm & 100% chance.
I'm curious where the 3day forecast tile pulls data to say only 7mm.
3day

I would agree that your PoP needs to be multiplied by 100.
My .99% should be 99%

Edit -
It seems the forecast rain text matches that of OWM, but is not reflected the 3 day tile
owm

[UPDATED]
v0.3.9
10/28/2020

Changes:

  • Bug fixes for new Probability of Precipitation (PoP) from OWM (newly available). These were tested on two coordinate sets (Mobile, AL and St. Lous, MO) On both corrdinate sets the driver reported the PoP and precepitation volume as received in the JSON return from the poll. Also, in both cases the PoP reported was either the number zero or the number 1 (representing 0% and 100% respectively). This appears to be an issue with the API JSON return, as the driver is showing what it received.

SPECIAL NOTE IF YOU ARE UPDATING FROM A VERSION PRIOR TO V0.3.2:
(not required if you have version V.0.3.2 or higher already installed or you are doing a first time install)

The suggested updated method with HPM is to do a new install with the new driver (without the 'NWS' in the filename. Once installed, go to your virtual device and update the driver to use the new driver. You can use HPM to delete the old driver as follows: Do an 'Uninstall. If there are two drivers listed with the same name, click on the first "OpenWeatherMap-Alerts Weather Driver". The app asked if I wanted to delete "OpenWeatherMap- NWS -Alerts Weather Driver". Should you pick the wrong one (the one WITHOUT 'NWS' in the name), cancel and retry with the other selection. (Thanks @arnb for those details).

If you do not use HPM then since the filename and the directory name has changed you will need to copy the code and paste it over your current driver. (You cannot use the ImportURL for this this one time because the name and location has changed). Once installed, go to your virtual device and check/update the driver to make sure it is using the new driver.

Download the Hubitat app