addon-node-red icon indicating copy to clipboard operation
addon-node-red copied to clipboard

Nodes get the state "DISABLED" and dont work anymore

Open W-e-e-Z-e-l opened this issue 1 year ago • 6 comments

Problem/Motivation

Since the update to version 18.0, i have trouble with some nodes. It seems this happens only to newly created or recently edited nodes. These nodes dont work anymore and show the state "DISABLED" under itself in the editor.

Expected behavior

The nodes should work without "DISABLED" state.

Actual behavior

Some nodes dont work anymore.

Steps to reproduce

I suspect this happens only to newly created or recently altered nodes since the update to v18.0. So create a "events: state" node and configure e.g. a temperature sensor against it.

Proposed changes

I dont know what to write here...but ive found someone in the nodered forum with the same problem and the people there suspect the HA integration as the root cause: https://discourse.nodered.org/t/home-assistant-node-status-disabled/88858

W-e-e-Z-e-l avatar Jun 23 '24 07:06 W-e-e-Z-e-l

I just opened an issue which is the same problem I think - if you make use of "expose as" on nodes such as events-state to create a switch in HA that can be used to enable/disable the node, then when you edit a new node, it is now defaulting to the first switch in the list rather than "none".

https://github.com/hassio-addons/addon-node-red/issues/1900#issue-2368554934

dpgh947 avatar Jun 23 '24 13:06 dpgh947

Oh, good hint! You are right! I didnt notice the "expose as" feature on the nodes...they were set to an entity i have in my environment, but after switching the "expose as" back to "none" the nodes works as expected. Great workaround at least for me :)

W-e-e-Z-e-l avatar Jun 23 '24 13:06 W-e-e-Z-e-l

Hmm, there is weird stuff happening around the "expose as" feature...even after manually switching back to "none" the feature set itself again to the first entity in the list after a while.

W-e-e-Z-e-l avatar Jun 23 '24 16:06 W-e-e-Z-e-l

It seems to need setting back to none every time you edit the node. What I think is happening is in the previous version of node red, the "none" was at the top of the pull down list, so if you hadn't set it explicitly, it picked none every time you edited. Now, none appears at the end of the list. So if you haven't explicitly set it, every time you edit the node, it is picking up the first entry, which is no longer "none". I am not seeing it changing by itself, but if I edit an existing node that used to be "none", it is picking the first entry every time. If you are going to save the node, you have to set it back to none every time. If you go back in to edit on a node you previously set to "none", it will display wrong, but if you don't save it, it's ok.

dpgh947 avatar Jun 23 '24 16:06 dpgh947

Yep, seems like this. To get rid of the trouble of changing the "expose as" repeatedly, i created a virtual switch and named it "A". The "expose as" list is in alphabetical order. This should do the trick until the problem is permanently fixed.

W-e-e-Z-e-l avatar Jun 23 '24 16:06 W-e-e-Z-e-l

Neat work around. "none" is being explicitly put at the end of that list, wherever it is coming from - I created a switch called zzzz but "none" still came after it, so it is being added there deliberately somewhere. I am 90% sure it used to be at the top. I think that's what is breaking it.

dpgh947 avatar Jun 23 '24 16:06 dpgh947

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!

github-actions[bot] avatar Jul 24 '24 08:07 github-actions[bot]