# Openweathermap one call api

**URL:** <https://discourse.nodered.org/t/openweathermap-one-call-api/26647>\
**Category:** General\
**Created:** [14 May 2020 10:38 UTC](https://discourse.nodered.org/t/openweathermap-one-call-api/26647 "2020-05-14T10:38:15Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![cinhcet](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cinhcet/32/438_2.png) [@cinhcet](https://discourse.nodered.org/u/cinhcet)\
**Post date:** [14 May 2020 10:38 UTC](https://discourse.nodered.org/t/openweathermap-one-call-api/26647/1 "2020-05-14T10:38:15Z")

</div>

Openweathermap has a "new" (don't know actually how new that is) API that provides data more similar to dark sky.

[https://openweathermap.org/api/one-call-api](https://openweathermap.org/api/one-call-api)

- Current weather
- Minute forecast for 1 hour (did not work for me in Europe)
- Hourly forecast for 48 hours
- Daily forecast for 7 days

I think the output of the daily forecast is more useable than the 5\*8 output of the old forceast API.

Maybe node-red-node-openweathermap could be updated to also use this API, but doing a http request is easy enough.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [14 May 2020 12:32 UTC](https://discourse.nodered.org/t/openweathermap-one-call-api/26647/2 "2020-05-14T12:32:50Z")

</div>

Pull requests are welcome... but obviously the output format should remain the same as the old to be compatible. - or we accept a major version bump. Don't mind

---

<div class="post-metadata">

**Author:** ![cinhcet](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cinhcet/32/438_2.png) [@cinhcet](https://discourse.nodered.org/u/cinhcet)\
**Post date:** [14 May 2020 12:56 UTC](https://discourse.nodered.org/t/openweathermap-one-call-api/26647/3 "2020-05-14T12:56:21Z")

</div>

or just a new option in addition to the already available options?  
The only thing that is a bit annoying is that this new API apparently does not support city names, only lat and long.

---

<div class="post-metadata">

**Author:** ![cinhcet](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cinhcet/32/438_2.png) [@cinhcet](https://discourse.nodered.org/u/cinhcet)\
**Post date:** [14 May 2020 15:27 UTC](https://discourse.nodered.org/t/openweathermap-one-call-api/26647/4 "2020-05-14T15:27:28Z")

</div>

made a PR

---

<div class="post-metadata">

**Author:** ![grumpazoid](https://avatars.discourse-cdn.com/v4/letter/g/4da419/32.png) [@grumpazoid](https://discourse.nodered.org/u/grumpazoid)\
**Post date:** [17 June 2020 19:36 UTC](https://discourse.nodered.org/t/openweathermap-one-call-api/26647/5 "2020-06-17T19:36:27Z")

</div>

@cinhcet Thanks for mentioning the new API.  
I have just started checking out openweathermap after realising the demise of Dark Sky. First thought was to see if a Node existed for it. I too noticed the one call API - it appears that this may offer more detailed information? I think this is my next project.

---

<div class="post-metadata">

**Author:** ![cinhcet](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cinhcet/32/438_2.png) [@cinhcet](https://discourse.nodered.org/u/cinhcet)\
**Post date:** [17 June 2020 19:43 UTC](https://discourse.nodered.org/t/openweathermap-one-call-api/26647/6 "2020-06-17T19:43:35Z")

</div>

I am using this one-call API for a while now and I have to say that sometimes the predictions are a bit weird, for example the hourly predictions never say rain for a particular day, but the daily prediction does predict rain on a that day.

But still, I think it is quite usable.

If you want to try it, install from here [https://github.com/cinhcet/node-red-web-nodes](https://github.com/cinhcet/node-red-web-nodes), since the only commits that are different to the master branch are the additions to the openweathermap node.  
The Node-RED chiefs seem busy with 1.1, so no idea when this PR will be reviewed.  
I think I should also change https to http in the api call before that can be merged.

---

<div class="post-metadata">

**Author:** ![grumpazoid](https://avatars.discourse-cdn.com/v4/letter/g/4da419/32.png) [@grumpazoid](https://discourse.nodered.org/u/grumpazoid)\
**Post date:** [17 June 2020 20:00 UTC](https://discourse.nodered.org/t/openweathermap-one-call-api/26647/7 "2020-06-17T20:00:32Z")

</div>

Ah thanks for that info. I was hoping that I could get notified when it was about to start raining but maybe that is a big ask.  
Good work on updating the code. I will challenge myself and see if I can install your version tomorrow.

---

<div class="post-metadata">

**Author:** ![cinhcet](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cinhcet/32/438_2.png) [@cinhcet](https://discourse.nodered.org/u/cinhcet)\
**Post date:** [17 June 2020 21:22 UTC](https://discourse.nodered.org/t/openweathermap-one-call-api/26647/8 "2020-06-17T21:22:59Z")

</div>

I am not saying that the hourly predictions do never predict rain, they actually do and are more accurate than the daily ones. I just saw that there sometimes are inconsistencies between the hourly and daily predictions, which is kind of weird 🙂

If you have trouble installing, let me know

---

<div class="post-metadata">

**Author:** ![grumpazoid](https://avatars.discourse-cdn.com/v4/letter/g/4da419/32.png) [@grumpazoid](https://discourse.nodered.org/u/grumpazoid)\
**Post date:** [18 June 2020 09:45 UTC](https://discourse.nodered.org/t/openweathermap-one-call-api/26647/9 "2020-06-18T09:45:36Z")

</div>

Not sure if I have messed up?

I created ~/.node-red/node\_modules/openweathermap (raspberry pi)  
I copied in the openweathermap files from github  
I ran npm install

Output was  
npm WARN deprecated request@2.88.2: request has been deprecated, see [https://github.com/request/request/issues/3142](https://github.com/request/request/issues/3142)  
npm notice created a lockfile as package-lock.json. You should commit this file.  
added 47 packages from 58 contributors and audited 47 packages in 12.172s

1 package is looking for funding  
run `npm fund` for details

found 0 vulnerabilities

What 47 packages have I installed ? I don't have openweathermap listed in node red pallet manager.

Edit: Ok I can see it has created /home/pi/.node-red/node\_modules/openweathermap/node\_modules and there are a load of packages in there. Oddly there is no openweathermap?

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [18 June 2020 09:53 UTC](https://discourse.nodered.org/t/openweathermap-one-call-api/26647/10 "2020-06-18T09:53:51Z")

</div>

I have merged your PR... so should be in flows now.  
(as you said it got missed in the general 1.1 beta noise)

---

<div class="post-metadata">

**Author:** ![cinhcet](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cinhcet/32/438_2.png) [@cinhcet](https://discourse.nodered.org/u/cinhcet)\
**Post date:** [18 June 2020 09:55 UTC](https://discourse.nodered.org/t/openweathermap-one-call-api/26647/11 "2020-06-18T09:55:07Z")

</div>

Thanks 🙂

Have you seen my comment about httpS vs http?  
I am uncertain whether the onecall api should also use http as the others, not that this might cause some certificate issues?

---

<div class="post-metadata">

**Author:** ![cinhcet](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cinhcet/32/438_2.png) [@cinhcet](https://discourse.nodered.org/u/cinhcet)\
**Post date:** [18 June 2020 10:04 UTC](https://discourse.nodered.org/t/openweathermap-one-call-api/26647/12 "2020-06-18T10:04:07Z")

</div>

since it is now on npm you can install via `npm install node-red-node-openweathermap`

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [18 June 2020 12:38 UTC](https://discourse.nodered.org/t/openweathermap-one-call-api/26647/13 "2020-06-18T12:38:35Z")

</div>

missed that - guess we'll find out soon enough 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [17 August 2020 12:38 UTC](https://discourse.nodered.org/t/openweathermap-one-call-api/26647/14 "2020-08-17T12:38:40Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
