Yet Another Weather Driver (but for Edge!)

Thanks. For OpenWeather, is the driver looking for API 2.5 or OneCall 3.0 URLs?

The 2.5 API.

Ah, I’d hoped/assumed 3.0 as that provides much more data, including 8-day forecasts, NWS alerts, etc, in their free (under 1,000 calls per day) plan, whereas 2.5 doesn’t provide any forecasts that I’m aware of without a professional subscription.

Weather Underground is the most reliable source for me, but I can’t justify the cost, so I guess the forecast URI will just have to remain blank.

1 Like

There is a forecast for version 2.5:

https://api.openweathermap.org/data/2.5/forecast?lat=xxx.xxx&lon=yyy.yyy&appid=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

If 3.0 is free and doesn’t require a credit card, I’m happy to look at adding it, but I thought last time I looked it required a CC, which I’m not willing to give. Alternatively, if you want to DM me examples of the 3.0 json data I can take a pass at the parsing code. It may take some back and forth to get everything working, but we can do it.

EDIT: I’m not going to add any additional fields right now to the driver, so the additional 3.0 data is kind of a moot point unless I create new devices with the additional fields.

I swear I read something about limited calls or forecasts or plans to deprecate 2.5 that made me move to 3.0, but I can’t remember what it was. Huh. :man_shrugging:t2:

It does require a credit card, so I’ll DM you a copy of the response data even if you’re not going to do anything with it right now. FWIW, weather and forecast are both provided with a single call to:

https://api.openweathermap.org/data/3.0/onecall?lat={lat}&lon={lon}&exclude={part}&appid={API key}

2 Likes

I finally have the updated driver, created a new device and deleted the old device but it is not updating.
I set the refresh to 5 mins to test.
I tested the URLs in a browser and they work.

Edit: using openweather

I have updated the driver and created a new device.
Both the new device and the old device is updating measurements.

The only problem is that the settings page almost always opens blank (just the heading Settings). The settings page has opened 2 times.
I think that this is general SmartThings App problem.

How the low and high temperatures are updated. Are they updated continuously or at some point in time?

Looking back at the OpenWeatherMap API 2.5, I very quickly remembered why I switched to Open Call 3.0.

While the API 2.5 forecast endpoint supposedly delivers a ā€œ5-day weather forecastā€, the forecast is provided in 3 hour increments, not days. There is no (for example) ā€œTuesdayā€ forecast that covers the full day, no High and Low Temperature for the day, etc. Thus, ā€œTomorrow’s Forecastā€ in Edge Weather only provides a forecast for a few hours, not the day.

Similarly, the Current Conditions data is somewhat misleading as well. ā€œMinā€ and ā€œMaxā€ are not today’s High and Low, as some might expect or prefer, but the min and max temperature for the area within the current three-hour window.

Open Call 3.0 provides a full array of current conditions, including UVI and dew point, precipitation, plus an 8-day forecast (today + 7 days) and more. There are several missing data points in the driver that could be populated with an OpenWeatherMap 3.0 option, which is why it is currently my preferred source.

None of this is intended as criticism, as I know Edge Weather is in beta and is intended to be a ā€œone size fits allā€ driver, but the reality is that with the current API 2.5 implementation, there’s just too much missing or inaccurate data for the driver to be useful to me.

Maybe there’s another way to get the necessary data from API 2.5, but if so, I’ve missed it, perhaps because 3.0 works so well. Of course, I know that accessing the data via WebRequester and Edgebridge is always an option.

Thank you for all your work on this!!

P.S. Frankly, I long for the days when the Weather Underground API was free or affordable.

Edit: Typo

I’m just now getting back to this. I have been trying to get the MyQ edge running (which it is but just wont create the new devices in smartthings??)

I see this is a Pi executable. I’m used to doing pulls and creating the docker container. Just curious if you can toss me a pointer on the proper way to handle to handle this and possibly save me a day of experimenting. Just a ā€œPro Tipā€ on where to go to educate myself would be great.

Did you ever get this working? Did you devices show up?

I think you’re referring to the Edgebridge piece. Here is the thread and the repository:

1 Like

I agree, this sounds like a mobile app or SmartThings platform issue

Those are gotten directly from the data received from the weather source, so you’d have to consult the applicable documentation. This is what the openweathermap site says about those fields:

main.temp_min Minimum temperature at the moment. This is minimal currently observed temperature (within large megalopolises and urban areas). Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheit.
main.temp_max Maximum temperature at the moment. This is maximal currently observed temperature (within large megalopolises and urban areas). Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheit.

Which is really not that helpful, as I would think that min and max would be determined over some period of time - current day, last number of x hours, etc. Not ā€˜at the moment’!

EDIT: Reading again the description it looks like that min and max is what is observed over a wide geographic area. So it is not time-based.

Not sure what you are asking - I don’t know anything about MyQ, so can’t help you there.

If you are referring to edgebridge, there is documentation available for installing in a docker container.

Thank you for the point in the proper direction.

Yes, you are right that you have to be careful to understand what the data really is.

FYI, the forecast data shown in the ā€˜Tomorrow’ section of the device Controls screen is the forecast for roughly noon the next day.

Are you still having problems?

Are you seeing the transactions logged by edgebridge?

Yes, still having problems. If I’m reading the bridge log file, it shows that the bridge is running but no other output.

I use openweather, and have filled in the api for the current weather.
However, I am not getting any data.
What should I enter for the proxy server, or what else could go wrong

Hello Ronald. This driver requires another piece of software to be running on an always-on computer on your LAN. It is called edgebridge and you can run it on a Windows, Linux, or Mac computer. Please see the first post on this topic for more information. Once you have that software running, you will select ā€˜Edge Bridge Server’ for the proxy type and provide the address for where that is running as your proxy server address.

Happy to help you get up and running if more guidance is needed.

TAustin, thanks for your help.
I have the latest SM hub, all data entered in ā€˜current weather URL’. And the proxy address (without port number) as it is in my router.
But I still don’t get the correct data.
Can I send you a PM with the details?