# My Observation API data for a device is different to my App display

**URL:** <https://community.tempest.earth/t/my-observation-api-data-for-a-device-is-different-to-my-app-display/14687>\
**Category:** Developers\
**Tags:** tempest\
**Created:** [August 21, 2021, 8:04pm UTC](https://community.tempest.earth/t/my-observation-api-data-for-a-device-is-different-to-my-app-display/14687 "2021-08-21T20:04:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![neil.harwood](https://avatars.discourse-cdn.com/v4/letter/n/b782af/32.png) [@neil.harwood](https://community.tempest.earth/u/neil.harwood)\
**Post date:** [August 21, 2021, 8:04pm UTC](https://community.tempest.earth/t/my-observation-api-data-for-a-device-is-different-to-my-app-display/14687/1 "2021-08-21T20:04:29Z")

</div>

I am using the [https://swd.weatherflow.com/swd/rest/observations/device/158921](https://swd.weatherflow.com/swd/rest/observations/device/158921) call in the api documentation after authenticating as my user account. The WindStats in the returned JSON are considerably different to my app data readings.

Any ideas??

Thanks Nick

---

<div class="post-metadata">

**Author:** ![iladyman](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tempest.earth/iladyman/32/2305_2.png) [@iladyman](https://community.tempest.earth/u/iladyman)\
**Post date:** [August 22, 2021, 12:40am UTC](https://community.tempest.earth/t/my-observation-api-data-for-a-device-is-different-to-my-app-display/14687/2 "2021-08-22T00:40:51Z")

</div>

Have you converted to your desired units of measure?  
More detail with numbers would help us to see your issue.  
Cheers Ian 🙂

---

<div class="post-metadata">

**Author:** ![neil.harwood](https://avatars.discourse-cdn.com/v4/letter/n/b782af/32.png) [@neil.harwood](https://community.tempest.earth/u/neil.harwood)\
**Post date:** [August 22, 2021, 7:44am UTC](https://community.tempest.earth/t/my-observation-api-data-for-a-device-is-different-to-my-app-display/14687/3 "2021-08-22T07:44:59Z")

</div>

Hi Ian,

Possible Not? I assumed the data would be in either kts or mph depending on our settings.

Here is the public station page  
[https://tempestwx.com/station/56977/](https://tempestwx.com/station/56977/)

Here is the response from the API call below.  
[https://swd.weatherflow.com/swd/rest/observations/device/158921](https://swd.weatherflow.com/swd/rest/observations/device/158921)

{  
“status”: {  
“status\_code”: 0,  
“status\_message”: “SUCCESS”  
},  
“device\_id”: 158921,  
“type”: “obs\_st”,  
“source”: “cache”,  
“summary”: {  
“pressure\_trend”: “steady”,  
“strike\_count\_1h”: 0,  
“strike\_count\_3h”: 0,  
“precip\_total\_1h”: 0,  
“precip\_accum\_local\_yesterday”: 3.419374,  
“precip\_analysis\_type\_yesterday”: 0,  
“feels\_like”: 17.4,  
“heat\_index”: 17.4,  
“wind\_chill”: 17.4  
},  
“obs”: [  
[  
1629583245,  
6.06,  
6.5,  
7.48,  
201,  
3,  
1013.7,  
17.4,  
96,  
0,  
0,  
0,  
0,  
0,  
0,  
0,  
2.72,  
1,  
1.070933,  
null,  
null,  
0  
]  
]  
}

Here is the feed from the station api  
[https://swd.weatherflow.com/swd/rest/observations/station/56977](https://swd.weatherflow.com/swd/rest/observations/station/56977)

{  
“status”: {  
“status\_code”: 0,  
“status\_message”: “SUCCESS”  
},  
“device\_id”: 158921,  
“type”: “obs\_st”,  
“source”: “cache”,  
“summary”: {  
“pressure\_trend”: “steady”,  
“strike\_count\_1h”: 0,  
“strike\_count\_3h”: 0,  
“precip\_total\_1h”: 0,  
“precip\_accum\_local\_yesterday”: 3.419374,  
“precip\_analysis\_type\_yesterday”: 0,  
“feels\_like”: 17.4,  
“heat\_index”: 17.4,  
“wind\_chill”: 17.4  
},  
“obs”: [  
[  
1629583245,  
6.06,  
6.5,  
7.48,  
201,  
3,  
1013.7,  
17.4,  
96,  
0,  
0,  
0,  
0,  
0,  
0,  
0,  
2.72,  
1,  
1.070933,  
null,  
null,  
0  
]  
]  
}

Basically the wind stats are reading much much lower in the feeds then in the app screen.  
[https://tempestwx.com/station/56977/](https://tempestwx.com/station/56977/)

Last night the wind was 15mph in the app but was only returning 5mph in the feeds?

It looks so simple, but I must be doing something wrong…

Cheers  
Nick

---

<div class="post-metadata">

**Author:** ![iladyman](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tempest.earth/iladyman/32/2305_2.png) [@iladyman](https://community.tempest.earth/u/iladyman)\
**Post date:** [August 22, 2021, 8:25am UTC](https://community.tempest.earth/t/my-observation-api-data-for-a-device-is-different-to-my-app-display/14687/4 "2021-08-22T08:25:05Z")

</div>

I use this function written in python to convert the meters per second from the API into knots which is my desired unit of measure:  
def convert\_mps\_to\_knots(self, mps):  
if mps is None:  
print(‘mps is none’)  
return 0.0  
else:  
return round(mps \* 1.943844, 1)

This is where you can see the units  
[https://weatherflow.github.io/Tempest/api/ws.html](https://weatherflow.github.io/Tempest/api/ws.html)  
cheers Ian 🙂

---

<div class="post-metadata">

**Author:** ![neil.harwood](https://avatars.discourse-cdn.com/v4/letter/n/b782af/32.png) [@neil.harwood](https://community.tempest.earth/u/neil.harwood)\
**Post date:** [August 22, 2021, 8:16pm UTC](https://community.tempest.earth/t/my-observation-api-data-for-a-device-is-different-to-my-app-display/14687/5 "2021-08-22T20:16:31Z")

</div>

Thanks Ian.

Really appreciated. I knew the api call was working properly… assumed the data would be the same as the settings, and not meters per second. Makes perfect sense now. Thanks so much for your support!!
