# Weather app in perspective

**URL:** <https://forum.inductiveautomation.com/t/weather-app-in-perspective/65483>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [October 20, 2022, 7:30pm UTC](https://forum.inductiveautomation.com/t/weather-app-in-perspective/65483 "2022-10-20T19:30:44Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tim\_Hansson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tim_hansson/32/39365_2.png) [@Tim\_Hansson](https://forum.inductiveautomation.com/u/Tim_Hansson)\
**Post date:** [October 20, 2022, 7:30pm UTC](https://forum.inductiveautomation.com/t/weather-app-in-perspective/65483/1 "2022-10-20T19:30:44Z")

</div>

Hi!  
I've been trying to implement a weather app from exchange: [Ignition Exchange | Inductive Automation](https://inductiveautomation.com/exchange/2264/installation)

I have gotten the API keys and think I have done everything that it says I should do. But I can't even search for a location... I know it's hard to help basaed on this, but how do I share something to you so you can assist me?

I'm new to this but it said beginner and all the instructions says is basicly add the API keys

---

<div class="post-metadata">

**Author:** ![dcamp1](https://avatars.discourse-cdn.com/v4/letter/d/dc4da7/32.png) [@dcamp1](https://forum.inductiveautomation.com/u/dcamp1)\
**Post date:** [October 20, 2022, 7:40pm UTC](https://forum.inductiveautomation.com/t/weather-app-in-perspective/65483/2 "2022-10-20T19:40:02Z")

</div>

Let me tell you how I do it.

I use the Opto-22 Rio and Node Red.

By programming a Node Red flow, I run an Api call to openweathermap every 10 minutes to get weather data for a certain location by latitude & Longitude. I then publish the returned data to my Ignition server with Mqtt Sparkplug B. Works Great! I also run another Api on the same Flow but at different times to return Stock Market Data that help me show real time inventory values, This also works great.

I'm getting ready to add another Api to poll data from one of our 3rd party IIOT providers so I can create our own reports and dashboards.

This is just how I do it.

---

<div class="post-metadata">

**Author:** ![Arnaud\_Declerck](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/arnaud_declerck/32/44872_2.png) [@Arnaud\_Declerck](https://forum.inductiveautomation.com/u/Arnaud_Declerck)\
**Post date:** [October 20, 2022, 9:05pm UTC](https://forum.inductiveautomation.com/t/weather-app-in-perspective/65483/3 "2022-10-20T21:05:37Z")

</div>

I'm here to help 😉

what is not working ?

maybe send us some print screen. we can then help you better on what it's not working

for me it's seems a beginner level but that's subjectif to your level on api and web request . Anyway

---

<div class="post-metadata">

**Author:** ![Tim\_Hansson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tim_hansson/32/39365_2.png) [@Tim\_Hansson](https://forum.inductiveautomation.com/u/Tim_Hansson)\
**Post date:** [October 21, 2022, 3:34pm UTC](https://forum.inductiveautomation.com/t/weather-app-in-perspective/65483/4 "2022-10-21T15:34:01Z")

</div>

Thanks for the replies. I have openweather node in Node-red working, but since this was already done in the exchange it thought I tried it. Also to learn about Ignition.

When I search for a location, it turns grey and then white again. Nothing happens what I can see. I have tried different options but went for Paris, France in the example since it was that in the app to start with. However it doesn't update the weather either.

 ![Weatherapp](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/0/205da93aaec56768b5bd91be73980d18eab9e67f.png)

---

<div class="post-metadata">

**Author:** ![Arnaud\_Declerck](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/arnaud_declerck/32/44872_2.png) [@Arnaud\_Declerck](https://forum.inductiveautomation.com/u/Arnaud_Declerck)\
**Post date:** [October 21, 2022, 7:04pm UTC](https://forum.inductiveautomation.com/t/weather-app-in-perspective/65483/5 "2022-10-21T19:04:37Z")

</div>

Hi @Tim_Hansson,

I've found why is not working the data received for the api call is not copy to where the flex repeater is looking to create the location pile.

On this object (Search icon)

 ![Capture d’écran 2022-10-21 à 20.56.35](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/9/e93f37bca36305ede9591834a82268395bfa573e.png)

go to the event section, there I create the url and to the api call at the end I transfer the result inside customer property. there is the problem I don't transfer is to the correct custom property.

line 11 and 12 need to be changed with the two following line

```auto
self.parent.parent.parent.getChild("flxSearch").custom.key = res
self.parent.parent.parent.getChild("flxSearch").custom.locationData = system.util.jsonDecode(res)

```

i have made an export of the location view with the bug fix, so you just need to replace the one in your project with this one.  
[Weather\_App\_2022-10-21\_2101.zip](https://forum.inductiveautomation.com/uploads/short-url/yO2nxnAH17z3Nb8sEjA4BtdbVlE.zip) (11.4 KB)

Of course I bug fix will be uploaded on the exchange also

Thanks for the interest on my ressource and hoping you enjoy it

Regards  
Arnaud

---

<div class="post-metadata">

**Author:** ![Tim\_Hansson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tim_hansson/32/39365_2.png) [@Tim\_Hansson](https://forum.inductiveautomation.com/u/Tim_Hansson)\
**Post date:** [October 21, 2022, 7:16pm UTC](https://forum.inductiveautomation.com/t/weather-app-in-perspective/65483/6 "2022-10-21T19:16:57Z")

</div>

Thanks! I will try this 👍

---

<div class="post-metadata">

**Author:** ![Tim\_Hansson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tim_hansson/32/39365_2.png) [@Tim\_Hansson](https://forum.inductiveautomation.com/u/Tim_Hansson)\
**Post date:** [October 22, 2022, 10:35am UTC](https://forum.inductiveautomation.com/t/weather-app-in-perspective/65483/7 "2022-10-22T10:35:51Z")

</div>

It works, great! Thank you very mush!

---

<div class="post-metadata">

**Author:** ![Tim\_Hansson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tim_hansson/32/39365_2.png) [@Tim\_Hansson](https://forum.inductiveautomation.com/u/Tim_Hansson)\
**Post date:** [October 22, 2022, 10:53am UTC](https://forum.inductiveautomation.com/t/weather-app-in-perspective/65483/8 "2022-10-22T10:53:51Z")

</div>

Is it possible the edit the language? I guess it's taken directly from the API so maybe not possible?

---

<div class="post-metadata">

**Author:** ![Arnaud\_Declerck](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/arnaud_declerck/32/44872_2.png) [@Arnaud\_Declerck](https://forum.inductiveautomation.com/u/Arnaud_Declerck)\
**Post date:** [October 22, 2022, 6:50pm UTC](https://forum.inductiveautomation.com/t/weather-app-in-perspective/65483/9 "2022-10-22T18:50:03Z")

</div>

hi @Tim_Hansson,

some of the text are just ignition label and some are coming from the API.

at the API level the language can be asked when the call is made

 ![Capture d’écran 2022-10-22 à 20.46.58](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/5/65318bf5f713bd997289e135cfeaa6a314c83530.png)

> **[Current weather data - OpenWeatherMap](https://openweathermap.org/current)**
>
> Access current weather data for any location on Earth. We collect and process weather data from different sources such as global and local weather models, satellites, radars and vast network of weather stations. Data is available in JSON, XML, or...

for the text on a label just use the onboard language management.

i will add this in a future release

regards

---

<div class="post-metadata">

**Author:** ![Tim\_Hansson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tim_hansson/32/39365_2.png) [@Tim\_Hansson](https://forum.inductiveautomation.com/u/Tim_Hansson)\
**Post date:** [October 22, 2022, 8:13pm UTC](https://forum.inductiveautomation.com/t/weather-app-in-perspective/65483/10 "2022-10-22T20:13:55Z")

</div>

Thanks, I will try this! Where is the API called in the app?

---

<div class="post-metadata">

**Author:** ![Arnaud\_Declerck](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/arnaud_declerck/32/44872_2.png) [@Arnaud\_Declerck](https://forum.inductiveautomation.com/u/Arnaud_Declerck)\
**Post date:** [October 23, 2022, 6:36pm UTC](https://forum.inductiveautomation.com/t/weather-app-in-perspective/65483/11 "2022-10-23T18:36:42Z")

</div>

on the custom properties of the location view under the embedded view folder.

---

<div class="post-metadata">

**Author:** ![Tim\_Hansson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tim_hansson/32/39365_2.png) [@Tim\_Hansson](https://forum.inductiveautomation.com/u/Tim_Hansson)\
**Post date:** [October 23, 2022, 6:47pm UTC](https://forum.inductiveautomation.com/t/weather-app-in-perspective/65483/12 "2022-10-23T18:47:20Z")

</div>

Thanks, I'll try a little bit 🙂

---

<div class="post-metadata">

**Author:** ![jkelleyus](https://avatars.discourse-cdn.com/v4/letter/j/3bc359/32.png) [@jkelleyus](https://forum.inductiveautomation.com/u/jkelleyus)\
**Post date:** [June 23, 2023, 6:55pm UTC](https://forum.inductiveautomation.com/t/weather-app-in-perspective/65483/13 "2023-06-23T18:55:46Z")

</div>

Hi all,

I have the app in Vision and am now looking to implement in Perspective (which I'm rather new to!). If someone couple help me with a couple of questions:

1. What is the correct "units" for imperial (USA)
2. What belongs in the "Weather" custom property?
3. What belongs in the "Location" custom property?
4. What is the method for getting this into a container?

This is a great app, and I very much thank the author for putting it on the Exchange. Any and all help would be greatly appreciated!

---

<div class="post-metadata">

**Author:** ![Dennis\_Hays](https://avatars.discourse-cdn.com/v4/letter/d/a9a28c/32.png) [@Dennis\_Hays](https://forum.inductiveautomation.com/u/Dennis_Hays)\
**Post date:** [September 28, 2024, 1:36am UTC](https://forum.inductiveautomation.com/t/weather-app-in-perspective/65483/14 "2024-09-28T01:36:25Z")

</div>

Hey All,

I have had this app running for several months and it works great! I'm curious if there is a way (or something I missed) to get it to load to the 'detail' page using the previously selected location? Currently the default view on a page refresh is the location search page. I'm constantly closing the search and selecting the only location in my list. Thanks!
