OpenWeatherMap-Alerts-Weather-Driver

Heck yeah, the morn/night thing is going to be nice. I found that was already in the WebCore stuff as well, but I love having it as an actual device that can be used in other automations.

Thanks!!

Thank-you, Thank-you, Thank-you. I had been using Darksky for sometime, and was not even aware there was an upcoming end date, till I few days ago. For me, this driver does everything I could want, especially now that I will receive Weather Alerts (I live in Canada).

Just made a rule for the LED's on my Inovelli switches to Pulse Red when there is a weather alert for my city. Awesome.

Thank you! This works really well. Just received a "Special Weather Statement", clicked on the link and it took me directly to the town page with the link button for the full alert text.

Please help me understand why the app is using a "tinyurl" on the link(s).

link went to wrong location. i am in londonderry nh, usa,, map showed london england

I use tinyurl,com in dashboard tiles if it will reduce the number of characters used in the tile. Tiles are limited to 1,024 characters and some of the hyperlink URLs can be quite long. Tinyurl.com allows me to save characters for other data/formatting in the tile.

That means the poll of OWM with your lon/lat did not return a city code. If no city code is returned it will attempt to use your browser's geolocation to find your location, if your browser does not support that, or you have not permitted it, it defaults to London, UK. At that time you can search for your city on that default page. If you find it and select it, it should create a cookie or cache that so it it will populate the correct location the next time.

As @arnb described, if you search the format is the city name then a comma then the two character COUNTRY code (Not state). So you would search for 'londonderry, US'

not very usefull should have option to use the older method.

Sorry you are dissatisfied. Feel free to revert to the old version.

Again, once you find your location the browser should remember that the next time you click the hyperlink (mine did and @arnb reported that his did too) . So in theory, that should be a one time search.

You may also want to open the virtual device and hit 'Save preferences' again. That is what triggers the city code poll. It could be that you just had a bad poll result on the first attempt. Perhaps a another poll attempt may be successful. At this point I have no idea how reliable that poll is. You are the only one (at least so far) that has reported any failure to return a city code.

Thanks.

thanks i did pull the older version off of my other hub,

[UPDATED]
v0.3.2
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

Does this mean the coming night, even though most of it is after midnight and therefore technically the next day?

I tried updating and no update found by HPM.
Tried a repair and I get this.
Error downloading file

The manifest file null no longer seems to be valid

I'm still on version 0.3.1

There seems to be an issue with the HPM manifest

app:25612020-10-23 00:00:01.115 errorBad manifest for OpenWeatherMap-Alerts Weather Driver. java.lang.NullPointerException: Cannot get property 'betaLocation' on null object Please notify the package developer.

app:25612020-10-23 00:00:01.111 errorError downloading https://raw.githubusercontent.com/Scottma61/Hubitat/master/docs/OWN-NWS_packageManifest.json: groovyx.net.http.HttpResponseException: Not Found

Also found this error in the log on Version 0.3.1

dev:14092020-10-23 08:06:00.419 errorjava.lang.NullPointerException: Cannot get property 'ver' on null object on line 1666 (updateCheckHandler)

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.

Let me know if this helps ... or made it worse???

Same
Executed the HPM "Update" function, but did not update the app. Errors remain.
app:25612020-10-23 11:16:28.965 errorBad manifest for OpenWeatherMap-Alerts Weather Driver. java.lang.NullPointerException: Cannot get property 'betaLocation' on null object Please notify the package developer.

app:25612020-10-23 11:16:28.959 errorError downloading https://raw.githubusercontent.com/Scottma61/Hubitat/master/docs/OWN-

Can you do a new 'Install' on the driver without the 'NWS' in the name?

Thanks.

That worked, no errors reported. However, I have a fair number of automations using the existing driver and have no desire to change things.

Go into your existing virtual device and update the driver to the newly installed driver. I believe everything in the existing automations should work then. If so, you should be able to removed the old driver (with the 'NWS' in the name).

1 Like

Ok did that, then did a poll data, followed by a refresh, with the following error

dev:14092020-10-23 11:36:34.558 errorjava.lang.IllegalArgumentException: The JSON input text should neither be null nor empty. on line 1362 (pollOWMHandler)

I have seen that error sporadically right after I update the code. It seems to only happen occasionally on the first poll after a code update ..... then never again. I have not been able to determine why it happens, but since it does not occur (for me) after the first time, I have not been able to track that down. Let me know if you continue to see it.