I have just added the virtual device for the OpenWeatherMap driver. I have had an API key for awhile (don't recall but probably several years). I have the key set to 2.5 and I am getting data into the device. In looking through the logs I do not see any errors in the return data messages. So I believe the interface to OpenWeahterMap and the key are working correctly.
However, the data being returned is not the correct data for my location. In looking through the logs I see that it appears the longitude and latitude being returned in the message are not correct for my location. I am not sure why the coordinates appear to be incorrect.
I see the option to override the Hubitats Long and Lat, but I did not see how to define these once turned on. In addition, I am not sure why my Long and Lat would be wrong for my Hubitat.
Does anybody have any ideas on how to correct this issue?
I run 2.5 and mine is working perfectly and has for ... months?! I always read the OWM posts - and lots of troubles seem to be around the 2.5 vs 3.0 api at the OWM server side. Not saying this is related...
I do not 'override' hub. but there was a time when the hub location wasn't really correct. Take the values from your hub info long /lat and plug em into a webpage to see where you're truly pulling from. Initially, my hub long lat was wrong and I had a few refreshes till it got correct. that was a bout a year ago.
I just looked at my Long and Lat in my Hubitat and indeed they are wrong. I don't recall as I have had this hub for a couple of years, do you enter those manually when setting up the hub? In any case I can override those values and that should correct my problem.
Update: I went into Hubitat settings and corrected the Long and Lat with the correct values. However those changes did not get updated for the OpenWeatherMap device. I may need to delete and recreate the device for those changes to work. However, I did turn on "Override Hub's Location Coordinates" in the device and once saved it added the fields to override the Lat and Long. I then entered the correct coordinates and all is working. Thanks jshimota for the info in putting me on the right direction.
After about 4 hours, a lot of reading, and pure determination, based on the fact I dont like being beaten by IT, I finally managed to get it working, but it was a hard hard slog!!!
It wasn't clear to me that I needed to make a payment of zero to OpenWeather to get the API working.
It wasn't clear if I needed to use the API with the OpenWeather http, long and lat in the virtual device preferences API key field or just the actual API code.
It wasn't obvious that nothing would show in the virtual device tile if there was nothing in the virtual device current states section.
Nor was it obvious that I needed to put the URL field in the dashboard tile background image link,
I am sure this is all obvious to people who are old hats with Hubitat but for newbies like me, this stuff really needs to be put into a written set of clear easy to follow instructions.
Its a great add-on once its working but compared to Home Assistants weather API which is child's play by comparison, this was hard work.
@user4935 might you have time to put in a document the steps that you took please? I am currently in the shoes you were in attempting to figure out how to implement this as a Hubitat noob.
Greatly appreciate any assistance
Choose One Call API 3.0 and sign up for the service. You will need to input a payment card such as a credit or debit card however you will not pay anything for 1000 API calls per day or under.
Click your account name in the top menu bar then select My API Keys. You should have at least one API key. This will be required later on.
Go to habitat devices and create a new virtual weather device. Click "Add Device" then "Virtual". Give it a name such as VirtualWeatherMapDevice then for type, open the list and select and click OpenWeatherMap-Alerts- Weather Driver. then click save device.
Now you need to configure the device. In the very first preferences box titled "Type OpenWeatherMap.Org API Key Here * you need to paste the API key that you have in Members that you saw in step 3.
The second box slider in the virtual device preferences page needs to be to the right so that 3.0 is on. Put in your Town or City in the third box. In box 4 & 5 I chose a setting of 1 hour. In box 7 it should be set to 1. In box 8 change the display unit to your preferred setting, C or F.
Change box 12 to your preferred date format. In Box 17 Alternative Icon Location paste https://tinyurl.com/icnqz/ then click the Save Preferences button.
If you scroll back to the top, under Current States you should see weather information including some graphics under the section where it says threedayfcstTile: If not something isnt working so double check what you have done and make sure your OpenWeatherMap status says says Active. Try a new API key just in case there is an issue with the original.
When your virtual driver is showing weather data you can create a dashboard tile. The tile will need to be quite large to display the three day forecast. When creating your tile for Pick A Device choose Open Weather Map Virtual Device and for Pick A Template choose Attribute. Under Options in the Pick An Attribute list choose threedayfcstTile.
This what the tile looks like in my master dashboard:-
You are much better off using Hubitat Package Manager to install. That way, the update doesn't have to be done manually when there is a new version. Just search for " OpenWeatherMap-Alerts Weather Driver" within Hubitat Package Manager
for some reason it isn't working for me
I created account, I pasted my key on hubitat on this driver, tried with both api version toggle etc
is not getting any data, the virtual device remains blank
i really can't imagine what i could be doing wrong, seems pretty straight forward to me
it seems the driver completely ignores the API version and unit system, so i changed in the driver to always ask for 2.5 API and metric system, in the logs the response from weather seems correct now but looking at the virtual device is not fetching this data correctly
dev:16362023-04-28 10:06:50.631errorjava.lang.NullPointerException: Cannot invoke method getAt() on null object on line 543 (method pollOWMHandler)
so does this mean i can't use it because they don't use onecall anymore?
the example link from the website always uses weather in link instead of onecall and version 2.5
or maybe the driver can be updated to support the latest type of link?
is it possible to get the onecall key without adding any card or something or is only paid ?
I don't see how to get it
they say is free for limited requests but I don't see how can I generate it