# Serial && status node on boot / start

**URL:** <https://discourse.nodered.org/t/serial-status-node-on-boot-start/5419>\
**Category:** General\
**Created:** [2 December 2018 20:14 UTC](https://discourse.nodered.org/t/serial-status-node-on-boot-start/5419 "2018-12-02T20:14:06Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![RogierQ](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rogierq/32/3211_2.png) [@RogierQ](https://discourse.nodered.org/u/RogierQ)\
**Post date:** [2 December 2018 20:14 UTC](https://discourse.nodered.org/t/serial-status-node-on-boot-start/5419/1 "2018-12-02T20:14:06Z")

</div>

On boot of my raspberry and node red i want to know if my serial port is connected to my arduino.  
So i connected the status node to the serial port and to mqtt, but no output  
Then i connected the debug to the status node to see if i get feedback on boot but also no result.  
If i pull later my usb from the board i get an output.  
So it works but not on boot ☹  
Is there a way to get the node status on boot?

Thanks  
Rogier

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [2 December 2018 20:41 UTC](https://discourse.nodered.org/t/serial-status-node-on-boot-start/5419/2 "2018-12-02T20:41:45Z")

</div>

You will only get output if whatever the serial port is connected to actually sends you something.

If Node-RED cannot connect to a serial port on startup, it will give an error in the log.

If you are on a LINUX based machine, you can check the status of a serial port using `dmesg` - I think there should also be something on one of the `/proc` pseudo folders but you'd have to look that up I'm afraid. On Windows there should also be a command - probably part of wmic - but it escapes me off the top of my head.

---

<div class="post-metadata">

**Author:** ![RogierQ](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rogierq/32/3211_2.png) [@RogierQ](https://discourse.nodered.org/u/RogierQ)\
**Post date:** [2 December 2018 20:54 UTC](https://discourse.nodered.org/t/serial-status-node-on-boot-start/5419/3 "2018-12-02T20:54:52Z")

</div>

Its on a linux machine, i will try to fix it with that thanks.  
But the node has a status on boot like connected if the arduino is connected  
Was hoping that i could use that message

---

<div class="post-metadata">

**Author:** ![shrickus](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/shrickus/32/517_2.png) [@shrickus](https://discourse.nodered.org/u/shrickus)\
**Post date:** [2 December 2018 21:00 UTC](https://discourse.nodered.org/t/serial-status-node-on-boot-start/5419/4 "2018-12-02T21:00:43Z")

</div>

If your serial node is showing the status message "connected", you can simple use a `status` node to look for that message, and trigger another flow whenever it changes... is this what you are looking for?

---

<div class="post-metadata">

**Author:** ![RogierQ](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rogierq/32/3211_2.png) [@RogierQ](https://discourse.nodered.org/u/RogierQ)\
**Post date:** [2 December 2018 22:07 UTC](https://discourse.nodered.org/t/serial-status-node-on-boot-start/5419/5 "2018-12-02T22:07:43Z")

</div>

Exactly that is what i did. But that only works after starting NR  
So if NR is running and the status changes it works.  
But when it starts the first status is not transmitted

---

<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:** [2 December 2018 23:15 UTC](https://discourse.nodered.org/t/serial-status-node-on-boot-start/5419/6 "2018-12-02T23:15:04Z")

</div>

Well ... it is transmitted... but at start time - as node.js is asynchronous - the actual start order and timing of all the nodes is not 100% deterministic (although tab one generally gets started before tab 2 etc) - so the message has probably been and gone before the status node is ready.

---

<div class="post-metadata">

**Author:** ![RogierQ](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rogierq/32/3211_2.png) [@RogierQ](https://discourse.nodered.org/u/RogierQ)\
**Post date:** [3 December 2018 17:08 UTC](https://discourse.nodered.org/t/serial-status-node-on-boot-start/5419/7 "2018-12-03T17:08:06Z")

</div>

ok clear, should it be possible to save it to a flow variable?  
or is there any other solution to get the status?
