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

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

the rest I can figure out.

How can I do this? I'm new.

My flow:

[{"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.

It looks like an issue was raised about this back in 2022 but there has been no response from the node's maintainers.

1 Like

Okay. Thanks!

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 )

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

Does the status node report it ?

It didn't when I tried it


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

1 Like

I found out how to do it I guess

Screenshot 2024-05-06 012102

Screenshot 2024-05-06 012449

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

1 Like

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