# Need help or example of Node-Red + SmartThings temperature flow

**URL:** https://discourse.nodered.org/t/need-help-or-example-of-node-red-smartthings-temperature-flow/61084
**Category:** General
**Created:** [10 April 2022 18:35 UTC](https://discourse.nodered.org/t/need-help-or-example-of-node-red-smartthings-temperature-flow/61084 "2022-04-10T18:35:55Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![real007](https://avatars.discourse-cdn.com/v4/letter/r/47e85d/32.png) [@real007](https://discourse.nodered.org/u/real007)
#### Post date: [10 April 2022 18:35 UTC](https://discourse.nodered.org/t/need-help-or-example-of-node-red-smartthings-temperature-flow/61084/1 "2022-04-10T18:35:55Z")

</div>

I am new to NR. I have setup a NR server along with Smartthings and was able to create a flow to turn on a Smartthings light switch. I am trying to set a temperature via NR and ST, but everything I try, nothing shows up in my debug flow. I am trying to use the inject and that doesn't work. I know my NR is communicating with my ST as I can use inject to turn on and off a light switch.

Anyone have an example or pointer to temperature with NR and ST?

I have tried a couple ways with no luck

 ![Capture](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/8/189befdb0ba9f28b8abecf3810089b31e9bfe2e3.png)  
 ![Capture2](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/c/fcc3873864577c1ac845d21d6e0689e979da65c6.png)

---

<div class="post-metadata">

### Author: ![ghayne](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ghayne/32/39_2.png) [@ghayne](https://discourse.nodered.org/u/ghayne)
#### Post date: [10 April 2022 19:22 UTC](https://discourse.nodered.org/t/need-help-or-example-of-node-red-smartthings-temperature-flow/61084/2 "2022-04-10T19:22:26Z")

</div>

Welcome to the forum!

You need to show us your whole flow, there is not enough information in your post!

---

<div class="post-metadata">

### Author: ![real007](https://avatars.discourse-cdn.com/v4/letter/r/47e85d/32.png) [@real007](https://discourse.nodered.org/u/real007)
#### Post date: [10 April 2022 21:02 UTC](https://discourse.nodered.org/t/need-help-or-example-of-node-red-smartthings-temperature-flow/61084/3 "2022-04-10T21:02:54Z")

</div>

is this the right code for the workflow?

```auto
[
    {
        "id": "e4cd8a9f84c30117",
        "type": "tab",
        "label": "SThub",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "5d2ee2a6623efcf2",
        "type": "smartthings-node-temperature",
        "z": "e4cd8a9f84c30117",
        "conf": "c330ed804e4310aa",
        "name": "TempBox1 (Temperature)",
        "device": "4de8ea0c-a128-424c-a96d-3ae8e91a225b",
        "x": 650,
        "y": 260,
        "wires": [
            [
                "a20ca53c381ff5b2"
            ]
        ]
    },
    {
        "id": "a67f018fbc5b2258",
        "type": "inject",
        "z": "e4cd8a9f84c30117",
        "name": "Light On",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "switch",
        "payload": "{\"value\":1}",
        "payloadType": "json",
        "x": 480,
        "y": 360,
        "wires": [
            [
                "6dc75aa23e0c8a07"
            ]
        ]
    },
    {
        "id": "6dc75aa23e0c8a07",
        "type": "smartthings-node-onoff",
        "z": "e4cd8a9f84c30117",
        "conf": "c330ed804e4310aa",
        "name": "Jeff's Office Main Light",
        "device": "e4dd054d-d6ff-44d6-bf80-58eb03c88135",
        "x": 760,
        "y": 460,
        "wires": [
            [
                "a20ca53c381ff5b2"
            ]
        ]
    },
    {
        "id": "c7f418f194932ae2",
        "type": "inject",
        "z": "e4cd8a9f84c30117",
        "name": "Light Off",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "switch",
        "payload": "{\"value\":0}",
        "payloadType": "json",
        "x": 480,
        "y": 420,
        "wires": [
            [
                "6dc75aa23e0c8a07"
            ]
        ]
    },
    {
        "id": "f9a6e165b0378769",
        "type": "inject",
        "z": "e4cd8a9f84c30117",
        "name": "Set Temp",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "temperature",
        "payload": "{\"value\":60}",
        "payloadType": "json",
        "x": 180,
        "y": 260,
        "wires": [
            [
                "5d2ee2a6623efcf2"
            ]
        ]
    },
    {
        "id": "a20ca53c381ff5b2",
        "type": "debug",
        "z": "e4cd8a9f84c30117",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 950,
        "y": 340,
        "wires": []
    },
    {
        "id": "c330ed804e4310aa",
        "type": "smartthings-config",
        "name": "BasicDevice",
        "token": "e086deb9-39b0-447b-a45e-bb861b702aa1"
    }
]

```

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [9 June 2022 21:03 UTC](https://discourse.nodered.org/t/need-help-or-example-of-node-red-smartthings-temperature-flow/61084/4 "2022-06-09T21:03:37Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
