[Archived][APP][Pro] OpenWeatherMap

Indeed this is probably the reason it didn’t work as before

So I hope this can be implanted in the app. Otherwise i have to make it myself with http request, which i not prefer because off all the work

@anne mentioned that this is work in progress. Looking forward Anne!

since it is just 1 API call, it is quite easy to use the “HTTP Request flowcards” app as a (temporary) replacement.

For example to see if the weather state is “Rain” (light/moderate/heavy) tomorrow:

Download this app: https://homey.app/nl-nl/app/com.internet/HTTP-request-flowkaarten/
Create an API request based on this doc: https://openweathermap.org/api/one-call-api
Test your JSONPath expression here: https://jsonpath.com/

I have added a OnecallAPI ‘device’ for the current weather to the testapp, I’ll publish it as test soon. It includes a trigger for any of the possible weather conditions.

I have had contact with OpenWeather to add Dutch translations for some of them, they were missing altogether. There are also three different conditions which were all translated to ‘Mist’ in Dutch, I have changed these in the app (‘Smoke’ translates to ‘Rook’ and not ‘Mist’…). Some of the translations are still a bit ridiculous if you ask me (‘light intensity shower rain’ translates to ‘lichte stortregen’ ?!). Some of them are probably quite useless for flows, but others could be useful I guess.

The OnecallAPI offers some new possibilities. For instance, with a single device both current as well as forecast data can be used. For this some new flowtriggers need to be added with an option to select a time interval (something like ‘if the weather changes in x hours’ (or x days).

The OnecallAPI does not include the location details of the data which is not a huge problem, I will probably add a field for the user to manually add a location description upon pairing. It also served as a check that the API was returning data (for the correct location), I think I need to (finally) add a connectivity check upon pairing, and maybe I’ll have it check the different API’s. It seems that the older API keys can still be used for the hourly/daily forecast API’s.

Another note, the OnecallAPI includes UV data, however in UVI value in the ‘current’ data set is not actually a ‘current’ value… It changes in the middle of the night, and then remains fixed for the day. So it seems it is a forecast. It doesn’t seem very accurate, there’s little difference between a clouded and a sunny day, and the UVI ranges between 6 en 7 the past weeks.

3 Likes

Hi Anne,
thank you for your work and adaption to the API.
It sound as there are many changes. Does it mean, the existing attributes and triggers will change? Or will you only include some new? Please give us a hint if it’s neccessary to delete existing OWM devices and add them again because this will need adjustments in flows. It would be goog to know before updating the app. Thanks :+1:

Hi everyone,
It looks like this discussion became quiet 3 weeks ago. What is the current status? Is this “Testapp” available? I got a Homey 2 days ago and installed this app. Then I created a free API key and spent some time typing it into my tiny phone screen, and only now found this discussion, which seems to suggest that I currently can’t get any weather predictions from this app. Is that right?

Message from anne on slack:

The new OWM ‘OneAPI’ is free and has hourly and daily forecast data. I have a draft update for the OWM app using the new API I am working on, however I don’t seem to get around to spend any time on it lately.

So just be patient, or give anne a huge incentive :wink:

Not a real solution but a workaround for the time being. With the http request app you are able to import the needed data from the api itself. Works great but it takes some work.

I’ve a really stupid question. I’m new to homey, but can’t find a way to implement the open weather API.

Edit: sorry, I see the app is currently not working and I’ve to use http request.

So what exactly isn’t working right now? I just installed this app 2 days ago and added a ‘current weather’ device and it seems to be working just fine.
Is it only the 5-day and 16-day device that isn’t working?

Yes, the forecast need adjustments in Homey app because of changed OWM-API.

It would be great to use a flow with sunrise and sunset. (WHEN sunrise THEN turn on lamp).
Is there a way to make it happen?

Homey has this function integrated in the “Date & Time” category. So there is no need for an additional app.

1 Like

I know, but I need it from another location.
I have a paludarium with poison dartfrogs. It would be nice to simulate the weather from their country of origin.

Well this app is giving me the information, but I can not use it in a flow, at least I can not find it…

Shame on me, I completely misunderstood you. :man_facepalming:t3:
I tried to find a way to use the sunrise and sunset but without success, sorry.

I still fetch weatherdata from openweather, but I do this from their API

Can you tell me how to do that with sunrise and sunset in Homey?

I’m afraid you would have to look in the api yourself

But if this is what you need, this is a standard triggerin Homey time/date, why not use that?

Maybe this app is usefull.

This app is using the location from the Homey, so unfortunately not usefull for this.