# Event Handler for Node Connection

**URL:** <https://discourse.nodered.org/t/event-handler-for-node-connection/46546>\
**Category:** Developing Nodes\
**Created:** [1 June 2021 11:34 UTC](https://discourse.nodered.org/t/event-handler-for-node-connection/46546 "2021-06-01T11:34:15Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![hkayan](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hkayan/32/42713_2.png) [@hkayan](https://discourse.nodered.org/u/hkayan)\
**Post date:** [1 June 2021 11:34 UTC](https://discourse.nodered.org/t/event-handler-for-node-connection/46546/1 "2021-06-01T11:34:16Z")

</div>

I want to make my node status different when it is not connected to any other node (not a bluetooth connection, just connecting to a node on the flow). However the only event handler I found is 'close'. Is there any event handler that checks, if the node is connected to the another node?

For example in the image, I want to change the status to something else because debug node is not connected.  
 ![ss_node_status](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/2/523395c331fff0601c30569304de294ae2512e68.png)

Also the Font Awesome icon fa-bluetooth is not working on node-redm that I run on Raspberry Pi. What might be the reason?

---

<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:** [1 June 2021 12:08 UTC](https://discourse.nodered.org/t/event-handler-for-node-connection/46546/2 "2021-06-01T12:08:47Z")

</div>

> [@hkayan](#):
>
> Is there any event handler that checks, if the node is connected to the another node?

No. Nothing that will help you there. However, the proposed flow linting feature may get a check for unconnected nodes.

---

<div class="post-metadata">

**Author:** ![hkayan](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hkayan/32/42713_2.png) [@hkayan](https://discourse.nodered.org/u/hkayan)\
**Post date:** [1 June 2021 12:36 UTC](https://discourse.nodered.org/t/event-handler-for-node-connection/46546/3 "2021-06-01T12:36:08Z")

</div>

Alright. I need to change the way I design then. Do you have any idea regarding fa-bluetooth icon does not show up?

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [1 June 2021 12:39 UTC](https://discourse.nodered.org/t/event-handler-for-node-connection/46546/4 "2021-06-01T12:39:22Z")

</div>

Hi @hkayan

It may be possible for your node to examine it's `wires` property to determine if it is wired to anything - but it isn't a pattern of usage we'd generally recommend.

As for the icon, how exactly have you configured the nodes icon property?

---

<div class="post-metadata">

**Author:** ![hkayan](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hkayan/32/42713_2.png) [@hkayan](https://discourse.nodered.org/u/hkayan)\
**Post date:** [1 June 2021 12:48 UTC](https://discourse.nodered.org/t/event-handler-for-node-connection/46546/5 "2021-06-01T12:48:21Z")

</div>

Hi @knolleary,

I am pretty sure there is a solid reason why it is not recommended. I will just change the way I design.

Here is the SS of related HTML part.  
 ![fa-bluetooth](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/0/c074e7b57accbd63ac300f4c1fab8f1de121210c.png)

If I try **fa-child** icon it works. Some works, some does not, I couldn't figure why. Node version is **12.22.1** , Node-red version is **v1.3.4**.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [1 June 2021 13:08 UTC](https://discourse.nodered.org/t/event-handler-for-node-connection/46546/6 "2021-06-01T13:08:58Z")

</div>

The Bluetooth icon is part of the Brand Icon set of font-awesome. We don't make those available due to trademark/copyright concerns.

[https://fontawesome.com/v4.7/icons/](https://fontawesome.com/v4.7/icons/)

---

<div class="post-metadata">

**Author:** ![hkayan](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hkayan/32/42713_2.png) [@hkayan](https://discourse.nodered.org/u/hkayan)\
**Post date:** [1 June 2021 13:13 UTC](https://discourse.nodered.org/t/event-handler-for-node-connection/46546/7 "2021-06-01T13:13:38Z")

</div>

Is there any list of all available icons or other than **Brand** icons everything else is fine?

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [1 June 2021 13:22 UTC](https://discourse.nodered.org/t/event-handler-for-node-connection/46546/8 "2021-06-01T13:22:08Z")

</div>

Everything but those listed under Brand icons should be fine.

---

<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:** [15 June 2021 13:22 UTC](https://discourse.nodered.org/t/event-handler-for-node-connection/46546/9 "2021-06-15T13:22:10Z")

</div>

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