# Smarttings failure invalid topic

**URL:** <https://discourse.nodered.org/t/smarttings-failure-invalid-topic/89702>\
**Category:** General\
**Created:** [23 July 2024 13:34 UTC](https://discourse.nodered.org/t/smarttings-failure-invalid-topic/89702 "2024-07-23T13:34:55Z")\
**Posts on this page:** 6\
**Page:** 2

<div class="post-metadata">

**Author:** ![pgas37](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/pgas37/32/76217_2.png) [@pgas37](https://discourse.nodered.org/u/pgas37)\
**Post date:** [29 July 2024 13:31 UTC](https://discourse.nodered.org/t/smarttings-failure-invalid-topic/89702/21 "2024-07-29T13:31:04Z")

</div>

I understand that, but the inject-node is a pull  
 ![afbeelding](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/a/aa441cf25bb2d76f04629e896fef6864f87facf8.png)  
so it just gives me the status of the smartthings switch.

but,.....  
in the function-node i change msg.topic = 'device' to

 ![afbeelding](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/1/410b6821dbab04cf87ac8d867e01807675affde9.png)

and bingo

changing the switch in domoticz results in a changed switch in smartthings 😀  
So that part is finished.

Can you tell me how to configure the inject-node to get the same result?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [29 July 2024 16:05 UTC](https://discourse.nodered.org/t/smarttings-failure-invalid-topic/89702/22 "2024-07-29T16:05:07Z")

</div>

> [@pgas37](#):
>
> Can you tell me how to configure the inject-node to get the same result?

Are you asking how to configure the inject node to set the topic to `switch`?

Also, as I requested in an earlier post, when posting code from function nodes please copy/paste not screenshot.

---

<div class="post-metadata">

**Author:** ![pgas37](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/pgas37/32/76217_2.png) [@pgas37](https://discourse.nodered.org/u/pgas37)\
**Post date:** [29 July 2024 17:37 UTC](https://discourse.nodered.org/t/smarttings-failure-invalid-topic/89702/23 "2024-07-29T17:37:58Z")

</div>

Yes, and the msg.payload etc (sentence 2 of the function-node)  
I asked that because you asked me:

> [@Colin](#):
>
> Does the Inject node do what you want? If it does then compare the output of the Inject node with the output of the function node. If they are the same then it will work.

The Output of the injection-node was not the same as from the function-node. the change in the function node from device to switch was not based on knowledge, but a guess.  
Based on your question, it should be possible to configure the injection node in such a way that the output of the injection node and the function-node are the same.

You asked :

> [@Colin](#):
>
> when posting code from function nodes please copy/paste not screenshot.

Is that because you can then copy the text and you can't do that from a screenshot of an other reason?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [29 July 2024 19:35 UTC](https://discourse.nodered.org/t/smarttings-failure-invalid-topic/89702/24 "2024-07-29T19:35:41Z")

</div>

> [@pgas37](#):
>
> Yes, and the msg.payload etc (sentence 2 of the function-node)

I am confused, because you showed an image of the inject node setup

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/1/918b6ee161e48c90b879d7b89d63ab25074fbd0b.png)

which sets msg.topic to `pull`, but apparently you don't know how to make it send a topic `device`. To also set the payload line in the inject node to whatever value you want, you can add another line to the inject if necessary by clicking `add` at the bottom.

Did you read the Working with Messages page I linked to, and watch the full set of videos?

---

<div class="post-metadata">

**Author:** ![pgas37](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/pgas37/32/76217_2.png) [@pgas37](https://discourse.nodered.org/u/pgas37)\
**Post date:** [30 July 2024 10:06 UTC](https://discourse.nodered.org/t/smarttings-failure-invalid-topic/89702/25 "2024-07-30T10:06:46Z")

</div>

Dear Colin,

you are confused,  
you refer me to documentation and youtube.  
I sense a little irritation.

That's the difference between someone who has nodered in his pocket and someone who is at the beginning of the learning curve.  
I try to apply the documentation and film to my own situation, but that is often not very easy and then i ask a question that amazes the expert. Sorry about that.

The two flows, from smartthings to Domoticz and the flow from Domoticz to  
Smartthings, now work. If someone else is interested. let me know.

In any case, thanks for the answers, references and patience you provided.

---

<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:** [28 October 2024 10:07 UTC](https://discourse.nodered.org/t/smarttings-failure-invalid-topic/89702/26 "2024-10-28T10:07:25Z")

</div>

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

[Previous page](https://discourse.nodered.org/t/smarttings-failure-invalid-topic/89702.md?page=1)
