# Converting units of measure

**URL:** <https://community.tempest.earth/t/converting-units-of-measure/16760>\
**Category:** Developers\
**Created:** [February 23, 2022, 2:14am UTC](https://community.tempest.earth/t/converting-units-of-measure/16760 "2022-02-23T02:14:24Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomparish](https://avatars.discourse-cdn.com/v4/letter/t/2acd7d/32.png) [@tomparish](https://community.tempest.earth/u/tomparish)\
**Post date:** [February 23, 2022, 2:14am UTC](https://community.tempest.earth/t/converting-units-of-measure/16760/1 "2022-02-23T02:14:24Z")

</div>

I have the REST API going. My question is related to “the station\_units values represent the units of the Station’s owner, _not the units of the observation values in the API response_ as taken from the manual.

If I’m pulling (GET) the observation values I have to convert them on my end of the web app. Is there a way for the device to do the conversation or is that possible?

---

<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:** [February 23, 2022, 3:10am UTC](https://community.tempest.earth/t/converting-units-of-measure/16760/2 "2022-02-23T03:10:17Z")

</div>

Did you see this: [REST API - station units](https://community.tempest.earth/t/rest-api-station-units/2016)  
I am not sure which ‘device’ you are meaning.

---

<div class="post-metadata">

**Author:** ![tomparish](https://avatars.discourse-cdn.com/v4/letter/t/2acd7d/32.png) [@tomparish](https://community.tempest.earth/u/tomparish)\
**Post date:** [February 23, 2022, 4:11am UTC](https://community.tempest.earth/t/converting-units-of-measure/16760/3 "2022-02-23T04:11:12Z")

</div>

Yes thank you I did see station units. I have a TempestWX weather station. I’m a bit new at this so I’m thinking I’m not communicating this well.

The station API shows all the units as English based. inches of mercury, Fahrenheit etc … but the re turned values when request the API to bring current vales back from the device, they come back in metric.

I’m sure I’m missing something easy here. let me know plese.  
Tom

---

<div class="post-metadata">

**Author:** ![gizmoev](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tempest.earth/gizmoev/32/941_2.png) [@gizmoev](https://community.tempest.earth/u/gizmoev)\
**Post date:** [February 23, 2022, 5:57am UTC](https://community.tempest.earth/t/converting-units-of-measure/16760/4 "2022-02-23T05:57:50Z")

</div>

If you want something other than SI units to display at your end, you need to do the conversion. That is the appropriate place to convert, not server side.

---

<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:** [February 23, 2022, 9:06am UTC](https://community.tempest.earth/t/converting-units-of-measure/16760/5 "2022-02-23T09:06:48Z")

</div>

Hi Tom,  
This is the way I think of the data flow and unit conversion. It may not be entirely accurate but it is the way I picture it in my mind.  
The Tempest sends data to the hub.  
The hub sends data to the Weatherflow servers.  
When you view your Tempest display on your mobile or computer the Weatherflow servers are creating the display to send to your mobile or your computer in the units that you would like to read.  
When you get data using the API you are getting the standard units which Weatherflow store the data in directly from the Weatherflow server.  
I hope this helps  
cheers Ian 🙂

---

<div class="post-metadata">

**Author:** ![tomparish](https://avatars.discourse-cdn.com/v4/letter/t/2acd7d/32.png) [@tomparish](https://community.tempest.earth/u/tomparish)\
**Post date:** [February 23, 2022, 2:38pm UTC](https://community.tempest.earth/t/converting-units-of-measure/16760/6 "2022-02-23T14:38:06Z")

</div>

Ok thank you Ian, so follow me here on this. What you’re saying his if I’m integrating some of the data from the TempestWX station what’s technically happening ing:

1. Data that I use from the Tempestwx API is originating from the Weatherflow Hub which stores the data in standard units.
2. This means when I use the data in my web app I will need to do some unit conversion myself. Correct?  
I can’t get the data back into my web app as units that are converted to English for example.

Tom

---

<div class="post-metadata">

**Author:** ![peter](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tempest.earth/peter/32/1365_2.png) [@peter](https://community.tempest.earth/u/peter)\
**Post date:** [February 23, 2022, 2:48pm UTC](https://community.tempest.earth/t/converting-units-of-measure/16760/7 "2022-02-23T14:48:24Z")

</div>

That’s pretty much it.

All data requested from the Tempest API (REST, Websocket or UDP) will be delivered in standard metric SI units. You can see the units in the API documentation:

REST API: [WeatherFlow Tempest API REST Reference](https://weatherflow.github.io/Tempest/api/swagger/) - click ‘Expand Operations’ in the top right  
Websocket: [WeatherFlow Tempest API Websocket Reference](https://weatherflow.github.io/Tempest/api/ws.html)  
UDP: [WeatherFlow Tempest UDP Reference - v171](https://weatherflow.github.io/Tempest/api/udp/v171/)

Any conversions that you want to make for display (e.g. Celsius to Fahrenheit) have to be implemented by yourself in your web app. You cannot request converted data from the API.

---

<div class="post-metadata">

**Author:** ![tomparish](https://avatars.discourse-cdn.com/v4/letter/t/2acd7d/32.png) [@tomparish](https://community.tempest.earth/u/tomparish)\
**Post date:** [February 23, 2022, 3:43pm UTC](https://community.tempest.earth/t/converting-units-of-measure/16760/8 "2022-02-23T15:43:11Z")

</div>

That’s what I needed. Perfect thank you.
