[RELEASE] Weather-Display With OWM-Alerts Forecast Driver

Matthew: When you need something to do.

Found an OWM api that returns the city code. Perhaps run it when the user saves preferences, then store the id in an @field or whatever, using it as part of the link when it's available. Will need some error logic when nothing is found or it fails.

Setting cnt to 1, Returned following data where id is the city code
{"message":"accurate","cod":"200","count":1,"list":[{"id":5100924,"name":"Martinsville","coord":{"lat":40.6,"lon":-74.56},"main":{"temp":292.26,"feels_like":293.21,"temp_min":290.37,"temp_max":295.37,"pressure":1025,"humidity":93},"dt":1603300395,"wind":{"speed":2.6,"deg":170},"sys":{"country":"US"},"rain":null,"snow":null,"clouds":{"all":90},"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04d"}]}]}

Another good find. I'll put it on the list to test out. Thanks.

1 Like

[UPDATED]
v0.2.5
10/21/2020

Changes:

  • Updated URLs in the dashboard tile hyperlinks to take you to a OWM location specific page for details, including any weather alerts. This update attempts to use the specific city code found by the latitude/longitude coordinates. If no city code is found (or returned) then it will use the generic site URL which will use your geolocation (if available in your browser), or , you can input your city to search. (Thanks @arnb)
  • Various code optimizations and bug fixes (Thanks @nh.schottfam)
1 Like

[UPDATED]
v0.2.6
10/22/2020

Changes:

  • Removed 'NWS' from driver name since it no longer polls that source.
  • Minor bug fixes.

NOTE:
EDIT 10-23-2020: 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

Well ...that didn't go well. I am not an expert on HPM. I did make some changes to the manifest and I do not get any error on it loading. I put back in the in the old driver names and pointed them to the new driver package files. I am thinking it may work best to uninstall the old driver (with 'NWS' in the name) and then install the new driver. I dont have HPM install my own drivers because I work on a development version inbetween releases, so I am not sure how this may work.

From my experiences in the Non-PWS version of the driver, If you use HPM, it is recommended you do a new Install of the driver (select the one without 'NWS' in the name'), then open you virtual device and change the driver from the old to the new. Once you are no longer using the old driver, you can delete that.

I updated the instruction on the latest update above on how to do the update with either HPM or without. Hope that helps.

[UPDATED]
v0.2.7
10/23/2020

Changes:

SPECIAL NOTE IF YOU ARE UPDATING FROM A VERSION PRIOR TO V0.2.6:
(not required if you have version V.0.2.6 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 " Weather-Display-With-OWM-NWS-Alerts-Forecast-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.

UPDATED]
v0.2.8
10/24/2020

Changes:

  • Added an indicator of multiple weather alerts on the dashboard tiles. Only the first alert will be displayed, but if there are additional alerts there will be a "+1" (or +2 up to +9). You can click on the alert displayed to go to the OWM page for your location and see additional details on the alerts. See this post if you have issues with the OWM location page,
  • additional optimizations and minor bug fixes (by @nh.schottfam).

SPECIAL NOTE IF YOU ARE UPDATING FROM A VERSION PRIOR TO V0.2.6:
(not required if you have version V.0.2.6 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.

Matthew,
Seeing this error.

Summary

[UPDATED]
v0.2.9
10/25/2020

Changes:

  • Bug fix for null JSON returns.

SPECIAL NOTE IF YOU ARE UPDATING FROM A VERSION PRIOR TO V0.2.6:
(not required if you have version V.0.2.6 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.

Still have an error after update:

Detailed log:

Try updating the code again. I apparently didn't copy the latest code when I published the latest update, but did so later. In the current code line 1153 is a blank line, so I think you may be on the previous version. If you are using HPM, do a 'Repair'. Otherwise, recopy the code (or 'Import') to get the latest version. Let me know if you still see an error.

Thanks.

[UPDATE] (sort of ...)

I appearently didn't copy the latest code to Github when I posted V0.2.9. Anyone who updated prior to me correcting that actually just updated to V0.2.8. I highly recommend that anyone who has already updated to V0.2.9 re-update. If you use HPM do a 'Repair'. I you don't use HPM, open the code and do an 'Import', than save. This will ensure you are on the latest code.

Still an error.

  • Copyright : Ⓒ 2020 Matthew (scottma61)
  • Status : Current Version: 0.2.9
  • OWM :
  • InternalName : Weather-Display With OWM-Alerts Forecast Driver
  • UpdateInfo : 10/25/2020

Error:

Summary

[UPDATED]
v0.3.0
10/26/2020

Changes:

  • More bug fixes on the Weather-Display JSON returns for nulls.

SPECIAL NOTE IF YOU ARE UPDATING FROM A VERSION PRIOR TO V0.2.6:
(not required if you have version V.0.2.6 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.

Matt,

Deleted everything and are still getting the java.math error when I refresh.

There is a request to reverse the order from 'Low/High' to 'High/Low' on the threedayfcstTile. Easy change, but it changes for everyone, so I'd like to know what everyone thinks:

  • Keep it as 'Low/High'
  • Change it to 'High/Low'
  • I really don't care

0 voters

image

[UPDATED]
v0.3.1
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.2.6:
(not required if you have version V.0.2.6 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

[UPDATED]
v0.3.2
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.2.6:
(not required if you have version V.0.2.6 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.