# Node-red-contrib-tcp-client how to stop communication

**URL:** <https://discourse.nodered.org/t/node-red-contrib-tcp-client-how-to-stop-communication/55015>\
**Category:** General\
**Created:** [10 December 2021 14:13 UTC](https://discourse.nodered.org/t/node-red-contrib-tcp-client-how-to-stop-communication/55015 "2021-12-10T14:13:49Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![henkkas](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/henkkas/32/39844_2.png) [@henkkas](https://discourse.nodered.org/u/henkkas)\
**Post date:** [10 December 2021 14:13 UTC](https://discourse.nodered.org/t/node-red-contrib-tcp-client-how-to-stop-communication/55015/1 "2021-12-10T14:13:49Z")

</div>

Hey guys, I have a tcp-client node working perfectly to receive messages from the smart meter.

Now I want to be able to stop the communication. I tried several ways, but didn't succeed.  
Tried msg.enabled, msg.action and msg.Action set at "Close", but nothing seem to work.

Anybody know a way to stop communication?

---

<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:** [10 December 2021 16:07 UTC](https://discourse.nodered.org/t/node-red-contrib-tcp-client-how-to-stop-communication/55015/2 "2021-12-10T16:07:35Z")

</div>

You could add a node-red-contrib-simple-gate after the tcp node, and open or close the gate to allow or block messages.

---

<div class="post-metadata">

**Author:** ![henkkas](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/henkkas/32/39844_2.png) [@henkkas](https://discourse.nodered.org/u/henkkas)\
**Post date:** [11 December 2021 09:41 UTC](https://discourse.nodered.org/t/node-red-contrib-tcp-client-how-to-stop-communication/55015/3 "2021-12-11T09:41:39Z")

</div>

@Colin , yes thought of that too in a function node that is, but I want the communication stopped all together if possible.

---

<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:** [11 December 2021 10:24 UTC](https://discourse.nodered.org/t/node-red-contrib-tcp-client-how-to-stop-communication/55015/4 "2021-12-11T10:24:06Z")

</div>

I don't see any way to do that. Why does it matter?

---

<div class="post-metadata">

**Author:** ![henkkas](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/henkkas/32/39844_2.png) [@henkkas](https://discourse.nodered.org/u/henkkas)\
**Post date:** [11 December 2021 10:42 UTC](https://discourse.nodered.org/t/node-red-contrib-tcp-client-how-to-stop-communication/55015/5 "2021-12-11T10:42:52Z")

</div>

@Colin , not really in fact, just think about performance of RPI by switching off alltogether.

---

<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:** [11 December 2021 10:50 UTC](https://discourse.nodered.org/t/node-red-contrib-tcp-client-how-to-stop-communication/55015/6 "2021-12-11T10:50:51Z")

</div>

What message rate is coming in and are they large? What sort of Pi is it?

---

<div class="post-metadata">

**Author:** ![henkkas](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/henkkas/32/39844_2.png) [@henkkas](https://discourse.nodered.org/u/henkkas)\
**Post date:** [11 December 2021 11:56 UTC](https://discourse.nodered.org/t/node-red-contrib-tcp-client-how-to-stop-communication/55015/7 "2021-12-11T11:56:56Z")

</div>

1 msg every sec. on RPI 3B+, it's telegram in this case of the smart meter. I intend to make that happen on all communications I have.

---

<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:** [11 December 2021 13:20 UTC](https://discourse.nodered.org/t/node-red-contrib-tcp-client-how-to-stop-communication/55015/8 "2021-12-11T13:20:52Z")

</div>

> [@henkkas](#):
>
> 1 msg every sec.

Don't worry about it then. If it were 1000 a second then it might be worth considering.

---

<div class="post-metadata">

**Author:** ![henkkas](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/henkkas/32/39844_2.png) [@henkkas](https://discourse.nodered.org/u/henkkas)\
**Post date:** [12 December 2021 10:30 UTC](https://discourse.nodered.org/t/node-red-contrib-tcp-client-how-to-stop-communication/55015/9 "2021-12-12T10:30:54Z")

</div>

@Colin .The simple-gate solution is a nice solution. I use it now even at other places also. Thanks! 😀

---

<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:** [26 December 2021 10:31 UTC](https://discourse.nodered.org/t/node-red-contrib-tcp-client-how-to-stop-communication/55015/10 "2021-12-26T10:31:43Z")

</div>

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