# Sending temperature data values with SMS

**URL:** <https://forums.losant.com/t/sending-temperature-data-values-with-sms/116>\
**Category:** Help\
**Created:** [April 24, 2016, 8:45pm UTC](https://forums.losant.com/t/sending-temperature-data-values-with-sms/116 "2016-04-24T20:45:03Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jon\_Olivier](https://avatars.discourse-cdn.com/v4/letter/j/dec6dc/32.png) [@Jon\_Olivier](https://forums.losant.com/u/Jon_Olivier)\
**Post date:** [April 24, 2016, 8:45pm UTC](https://forums.losant.com/t/sending-temperature-data-values-with-sms/116/1 "2016-04-24T20:45:03Z")

</div>

I’ve started using my Builder Kit and I ran into a problem. I want to send the temperature as an SMS message. I can only send the button state as {{ data.button }}. No other data values will send. I’ve tried sending them this way: {{ tempF }} , {{ data.tempF }} , {{ degreesF }} and {{ data.degreesF }} but no data is sent. The temperature data works with the Dashboard application so I know the temperature data is being send to Losant. What do I need to do to get the temperature data into an SMS?

---

<div class="post-metadata">

**Author:** ![Brandon\_Cannaday](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/brandon_cannaday/32/14_2.png) [@Brandon\_Cannaday](https://forums.losant.com/u/Brandon_Cannaday)\
**Post date:** [April 24, 2016, 10:04pm UTC](https://forums.losant.com/t/sending-temperature-data-values-with-sms/116/2 "2016-04-24T22:04:37Z")

</div>

What is your workflow ID? I’ll jump in and take a look?

---

<div class="post-metadata">

**Author:** ![Jon\_Olivier](https://avatars.discourse-cdn.com/v4/letter/j/dec6dc/32.png) [@Jon\_Olivier](https://forums.losant.com/u/Jon_Olivier)\
**Post date:** [April 24, 2016, 10:08pm UTC](https://forums.losant.com/t/sending-temperature-data-values-with-sms/116/3 "2016-04-24T22:08:43Z")

</div>

Brandon,  
Thanks. I think this is what you’re looking for:

571ccf06cd56800100cffb8f

It is a workflow named Text Temperature.

---

<div class="post-metadata">

**Author:** ![Brandon\_Cannaday](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/brandon_cannaday/32/14_2.png) [@Brandon\_Cannaday](https://forums.losant.com/u/Brandon_Cannaday)\
**Post date:** [April 24, 2016, 10:30pm UTC](https://forums.losant.com/t/sending-temperature-data-values-with-sms/116/4 "2016-04-24T22:30:53Z")

</div>

The firmware running on the kit sends { button: true } whenever the button is pressed and separately sends the temperature every 15 seconds. The button and the temperature are never sent at the same time. The reason the workflow is not sending any temperature is because the conditional block is looking for the button state to be true. When the button state is true, there is simply no temperature data on the payload to send because the device never sends them in the same payload.

There are two solutions:

1. Use the [Store Value](https://docs.losant.com/workflows/data/store-value/) node to save the temperature value whenever it is received. You’ll have to use another conditional to check that the payload has tempF (just like the button conditional). Then, whenever the button is pressed (your current workflow), you can use the [Get Value](https://docs.losant.com/workflows/data/get-value/) node to read it back. Then your SMS can send the temperature retrieved from the get value node.

2. Modify the firmware to read the value of the temperature and send it whenever the button is pressed. This is probably the more correct solution. The easiest approach is to probably create a global variable and just store the same temperature that was last sent. Then when the button is pressed, send that number.

---

<div class="post-metadata">

**Author:** ![Brandon\_Cannaday](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/brandon_cannaday/32/14_2.png) [@Brandon\_Cannaday](https://forums.losant.com/u/Brandon_Cannaday)\
**Post date:** [April 24, 2016, 11:00pm UTC](https://forums.losant.com/t/sending-temperature-data-values-with-sms/116/5 "2016-04-24T23:00:53Z")

</div>

I’m going to modify the kit firmware this evening because I doubt you’ll be the first to want this behavior 🙂

---

<div class="post-metadata">

**Author:** ![Jon\_Olivier](https://avatars.discourse-cdn.com/v4/letter/j/dec6dc/32.png) [@Jon\_Olivier](https://forums.losant.com/u/Jon_Olivier)\
**Post date:** [April 24, 2016, 11:59pm UTC](https://forums.losant.com/t/sending-temperature-data-values-with-sms/116/6 "2016-04-24T23:59:51Z")

</div>

Brandon,  
What I am trying to accomplish is monitoring the temperature in the closet where my home server is located. I plan to experiment with conditions that will notify my cell phone when the temperature exceeds a threshold. For testing, I want to send the temperature when I press the physical button or when I press a virtual button on the screen.

Thanks for your explanation. Now I understand why I wasn’t seeing any data. I thought I was specifying the data field incorrectly.

---

<div class="post-metadata">

**Author:** ![yoursunny](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/yoursunny/32/145_2.png) [@yoursunny](https://forums.losant.com/u/yoursunny)\
**Post date:** [May 6, 2016, 5:39pm UTC](https://forums.losant.com/t/sending-temperature-data-values-with-sms/116/7 "2016-05-06T17:39:07Z")

</div>

My solution is to retrieve the last reported temperature.

1. To retrieve the last reported temperature reading, use a [Gauge Query](https://docs.losant.com/workflows/data/gauge-query/) node. Payload path for value should be set to `tempC`.
2. In SMS node, reference the temperature with `{{ tempC.value }}`.

---

<div class="post-metadata">

**Author:** ![Jon\_Olivier](https://avatars.discourse-cdn.com/v4/letter/j/dec6dc/32.png) [@Jon\_Olivier](https://forums.losant.com/u/Jon_Olivier)\
**Post date:** [May 8, 2016, 1:19pm UTC](https://forums.losant.com/t/sending-temperature-data-values-with-sms/116/8 "2016-05-08T13:19:09Z")

</div>

> [@yoursunny](#):
>
> {{ tempC.value }}

Thanks, yoursunny! That works.
