# Status node: additional properties?

**URL:** <https://discourse.nodered.org/t/status-node-additional-properties/89358>\
**Category:** General\
**Created:** [8 July 2024 16:51 UTC](https://discourse.nodered.org/t/status-node-additional-properties/89358 "2024-07-08T16:51:15Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![nlecaude](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nlecaude/32/25_2.png) [@nlecaude](https://discourse.nodered.org/u/nlecaude)\
**Post date:** [8 July 2024 16:51 UTC](https://discourse.nodered.org/t/status-node-additional-properties/89358/1 "2024-07-08T16:51:15Z")

</div>

While upgrading from Node-RED 3.x to Node-RED 4.x we've stumbled upon an annoying issue:  
We were using a status node to track the connection state of a TCP request node but the status.text changed in Node-RED 4 and our comparison started failing.  
We fixed it for now by checking if the `fill` property is green but that seems a bit hackish. Would it make sense to allow node.status to pass additional properties that would be independent from the text displayed in the editor ? That would seem more reliable to check things like connections etc.

---

<div class="post-metadata">

**Author:** ![GogoVega](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gogovega/32/71313_2.png) [@GogoVega](https://discourse.nodered.org/u/GogoVega)\
**Post date:** [8 July 2024 19:52 UTC](https://discourse.nodered.org/t/status-node-additional-properties/89358/2 "2024-07-08T19:52:01Z")

</div>

Do you have the text of your v3.x?

I have the following text for v4: `"node-red:common.status.connecting"` for connecting state.

---

<div class="post-metadata">

**Author:** ![nlecaude](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nlecaude/32/25_2.png) [@nlecaude](https://discourse.nodered.org/u/nlecaude)\
**Post date:** [8 July 2024 20:33 UTC](https://discourse.nodered.org/t/status-node-additional-properties/89358/3 "2024-07-08T20:33:42Z")

</div>

So the field in Node-RED 4 is `tcpin.status.connections` and the content of the string is `n connections` where `n` is the number of connections.  
We could check that but it seems a bit dangerous as the format could change and it's also not the same string depending on localization.

---

<div class="post-metadata">

**Author:** ![GogoVega](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gogovega/32/71313_2.png) [@GogoVega](https://discourse.nodered.org/u/GogoVega)\
**Post date:** [8 July 2024 20:51 UTC](https://discourse.nodered.org/t/status-node-additional-properties/89358/4 "2024-07-08T20:51:47Z")

</div>

Ok I see, this message is translated in the runtime and therefore depends on the runtime language. I don't think it's an error that the runtime language might be different from the editor language. But this implies that all these messages intended for the editor will have the language of the runtime. Quid?

Regarding your question here, I don't know what could have changed between the two versions.

---

<div class="post-metadata">

**Author:** ![nlecaude](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nlecaude/32/25_2.png) [@nlecaude](https://discourse.nodered.org/u/nlecaude)\
**Post date:** [8 July 2024 21:05 UTC](https://discourse.nodered.org/t/status-node-additional-properties/89358/5 "2024-07-08T21:05:13Z")

</div>

This is what changed:

> <https://github.com/node-red/node-red/commit/f49f692ffa38e74628258c3ebf62b59644cf49d2#diff-d5ce5ba72d6b26d99c4d5378faa1ca64da3c4596efd9007633a59e632f8ab030L630>
>
> now handles reply out node,
> and can specify which connection to reset.

That's fine, I think it's legit for the status text to change between versions, what I'm wondering is if it would make sense to allow passing additional variables to node.status that could be parsed more easily than text.

---

<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:** [8 July 2024 21:41 UTC](https://discourse.nodered.org/t/status-node-additional-properties/89358/6 "2024-07-08T21:41:13Z")

</div>

The message only gets translated for display, so should remain constant across languages on the runtime side, but yes that message did change across versions in order to improve the feedback to the user (hopefully) 🙂

I’m not sure adding another property would help much as we may need to change that also for some reason to match or add functionality if we modify the status reported.

---

<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:** [6 October 2024 21:41 UTC](https://discourse.nodered.org/t/status-node-additional-properties/89358/7 "2024-10-06T21:41:41Z")

</div>

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