# How do I configure a flow to give me a prompt, whenever the Serial port is disconnected?

**URL:** <https://discourse.nodered.org/t/how-do-i-configure-a-flow-to-give-me-a-prompt-whenever-the-serial-port-is-disconnected/87726>\
**Category:** General\
**Tags:** node-red-node-serialport\
**Created:** [5 May 2024 16:20 UTC](https://discourse.nodered.org/t/how-do-i-configure-a-flow-to-give-me-a-prompt-whenever-the-serial-port-is-disconnected/87726 "2024-05-05T16:20:59Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![samyak5](https://avatars.discourse-cdn.com/v4/letter/s/67e7ee/32.png) [@samyak5](https://discourse.nodered.org/u/samyak5)\
**Post date:** [5 May 2024 16:20 UTC](https://discourse.nodered.org/t/how-do-i-configure-a-flow-to-give-me-a-prompt-whenever-the-serial-port-is-disconnected/87726/1 "2024-05-05T16:20:59Z")

</div>

I'm trying to make a flow that reads data from an arduino's COM port, and then log it to a file and display it on my dashboard. I also want a notification to popup when the device is disconnected, or a serial-related error occurs.

Basically, I want to somehow capture these lines in red:  
 ![Screenshot 2024-05-05 220128](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/0/e071bbf26f604ef4bb72d74959df891f6c7ad941.png)

the rest I can figure out.

How can I do this? I'm new.

My flow:

> Blockquote  
> [{"id":"a62e855fac0e53bd","type":"serial in","z":"772da7125e44b0f6","name":"Arduino @COM13","serial":"e59092b57cca75f9","x":290,"y":320,"wires":[["86394560435ea468","2b080c1193a521e6"]]},{"id":"e59092b57cca75f9","type":"serial-port","name":"COM13","serialport":"COM13","serialbaud":"9600","databits":"8","parity":"none","stopbits":"1","waitfor":"","dtr":"none","rts":"none","cts":"none","dsr":"none","newline":"\n","bin":"false","out":"char","addchar":"","responsetimeout":"10000"}]

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [5 May 2024 17:33 UTC](https://discourse.nodered.org/t/how-do-i-configure-a-flow-to-give-me-a-prompt-whenever-the-serial-port-is-disconnected/87726/2 "2024-05-05T17:33:08Z")

</div>

It looks like [an issue was raised about this](https://github.com/node-red/node-red-nodes/issues/888) back in 2022 but there has been no response from the node's maintainers.

---

<div class="post-metadata">

**Author:** ![samyak5](https://avatars.discourse-cdn.com/v4/letter/s/67e7ee/32.png) [@samyak5](https://discourse.nodered.org/u/samyak5)\
**Post date:** [5 May 2024 18:13 UTC](https://discourse.nodered.org/t/how-do-i-configure-a-flow-to-give-me-a-prompt-whenever-the-serial-port-is-disconnected/87726/3 "2024-05-05T18:13:53Z")

</div>

Okay. Thanks!

---

<div class="post-metadata">

**Author:** ![UnborN](https://avatars.discourse-cdn.com/v4/letter/u/4491bb/32.png) [@UnborN](https://discourse.nodered.org/u/UnborN)\
**Post date:** [5 May 2024 18:28 UTC](https://discourse.nodered.org/t/how-do-i-configure-a-flow-to-give-me-a-prompt-whenever-the-serial-port-is-disconnected/87726/4 "2024-05-05T18:28:51Z")

</div>

The Catch node doesnt seem to catch those errors ..  
is it because its thrown by the serial-port's Config node and not the actual serial-in node itself ?  
( with no ability to link a Catch node to a Config node )

---

<div class="post-metadata">

**Author:** ![samyak5](https://avatars.discourse-cdn.com/v4/letter/s/67e7ee/32.png) [@samyak5](https://discourse.nodered.org/u/samyak5)\
**Post date:** [5 May 2024 18:44 UTC](https://discourse.nodered.org/t/how-do-i-configure-a-flow-to-give-me-a-prompt-whenever-the-serial-port-is-disconnected/87726/5 "2024-05-05T18:44:40Z")

</div>

> [@UnborN](#):
>
> is it because its thrown by the serial-port's Config node and not the actual serial-in node itself ?  
> ( with no ability to link a Catch node to a Config node )

Yeah, might be. In that case, is there a solution?

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [5 May 2024 19:10 UTC](https://discourse.nodered.org/t/how-do-i-configure-a-flow-to-give-me-a-prompt-whenever-the-serial-port-is-disconnected/87726/6 "2024-05-05T19:10:59Z")

</div>

Does the status node report it ?

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [5 May 2024 19:13 UTC](https://discourse.nodered.org/t/how-do-i-configure-a-flow-to-give-me-a-prompt-whenever-the-serial-port-is-disconnected/87726/7 "2024-05-05T19:13:34Z")

</div>

It didn't when I tried it  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/c/5cd34f6b5cd5996682558f3e9196ca1c2a09a30b.png)

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/0/3082289fab3c89e834d107f8bf208fe9574955bb.png)

---

<div class="post-metadata">

**Author:** ![UnborN](https://avatars.discourse-cdn.com/v4/letter/u/4491bb/32.png) [@UnborN](https://discourse.nodered.org/u/UnborN)\
**Post date:** [5 May 2024 19:41 UTC](https://discourse.nodered.org/t/how-do-i-configure-a-flow-to-give-me-a-prompt-whenever-the-serial-port-is-disconnected/87726/8 "2024-05-05T19:41:58Z")

</div>

I think the Status node will pick up a change in status if it goes from "connected" to "not connected" and vice versa but if its "not connected" from the start it wont detect it ? and you may miss a notification

---

<div class="post-metadata">

**Author:** ![samyak5](https://avatars.discourse-cdn.com/v4/letter/s/67e7ee/32.png) [@samyak5](https://discourse.nodered.org/u/samyak5)\
**Post date:** [5 May 2024 19:55 UTC](https://discourse.nodered.org/t/how-do-i-configure-a-flow-to-give-me-a-prompt-whenever-the-serial-port-is-disconnected/87726/9 "2024-05-05T19:55:41Z")

</div>

I found out how to do it I guess

 ![Screenshot 2024-05-06 012035](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/1/719f68fd4698a71a8eee3343c7eb928ada3168f3.png)

![Screenshot 2024-05-06 012102](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/6/266b9911d0c95c246fb4c4c8c7fb1a3ca454c146.png)

![Screenshot 2024-05-06 012449](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/5/f5a29d52d7c023a7723e3d8f69bf3405948cac0f.png)

I just pulled out the cable, and it shows disconnected.

---

<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:** [19 May 2024 19:56 UTC](https://discourse.nodered.org/t/how-do-i-configure-a-flow-to-give-me-a-prompt-whenever-the-serial-port-is-disconnected/87726/10 "2024-05-19T19:56:31Z")

</div>

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