devRoemer / node-red-contrib-time-switch

A node that switches on and off depending on the current time
MIT License
3 stars 1 forks source link

Node status not updating #11

Closed jerbzz closed 3 years ago

jerbzz commented 3 years ago

Describe the bug The time-switch node is not displaying any status information.

To Reproduce I have 4 nodes. Initally, I started with 2. They displayed their status OK. I then modified my flow further and added 2 more time-switch nodes. I have a fairly large set of flows with some other contrib nodes. Now, none of the time-switch nodes display any status. I have restarted the flows and restarted node-red.

Expected behavior I expected all 4 time-switch nodes to display their status.

Screenshots image

Environment (please complete the following information):

jerbzz commented 3 years ago

The node only updates status when it receives a message. Perhaps it could update itself on flow restart or on a schedule?

ghost commented 3 years ago

@jerbzz I can confirm this. The nodes never display the current status but instead show the status they had during the last execution of the node. That's how all node-red nodes behave, even the system nodes. I am not even sure if i could bypass this behavior.

You could add the "Inject" node shipped with node red at the beginning of the flow. It allows to define a schedule or trigger the flow by clicking on it. Note that it will start your flow so that it is not applicable in every case and only works if your last action can be executed multiple times.