Sending temperature data values with SMS


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?


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


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


It is a workflow named Text Temperature.


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 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 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.


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


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.


My solution is to retrieve the last reported temperature.

  1. To retrieve the last reported temperature reading, use a Gauge Query node. Payload path for value should be set to tempC.
  2. In SMS node, reference the temperature with {{ tempC.value }}.

Thanks, yoursunny! That works.