If a flow works in one case, it should work in the second case -shouldn't it?

As I have said before, I need to discuss the problem because until I do, I can't seem to move on.

Be it the best, worst, or what ever: I have a few nodes in a flow which work and do what they should do.

I have just got a new machine (yes, that one) and so I copied working parts of the existing/working flow to accommodate the new machine.

I edited the name part for the new machine and deployed it.

Thing is: it isn't doing the same for that machine as what is happening with other machines.

Basically all machines are pinged every 10 seconds.
If a Ping reply is received, the (each) node stores the status and an indication is given that it is online.
As Node-Red takes a bit of time, each machine publish their temperature.
This is received and if the machine is "online" and temperature received it is marked as FULLY online.
When the machine is turned off, the indicator shows the machine is Off-Line.

I can't work out why the nodes aren't doing the same for the new machine what they do with the other machines.

I have put in debug lines (node.warn() ) and am wading through the stuff, but it just doesn't make sense.

First thing which comes in my head, and it happen all the time when somebody copies something somewhere manually, the little bit of stuff has been just left out. By having seen the complexity of your wiring, the probability is fairly high.

1 Like

(Lucky you haven't seen the bigger picture..... Believe me: It is frightening!)

Thanks though.

I shall keep picking away at the problem.

Problem is, that you are maybe copied the nodes and wiring, this can be compared visually, but the leftout might have some node where you change or create some important property and to find it will be not so easy now. I even can't point the direction where to start. Lots and lots debugging.

1 Like

Yeah.

The flows (as complicated as they are now) were MORE complicated.

They are evolving as I don't always know the final picture. So things need to be added when "problems" are discovered.

Then, when the node (Function nodes usually) is finally working as best needed, I look for structure and rationalise the code.

I can see problems with the existing code/flow, but it isn't problematic. It just has redundant stuff which isn't needed, or is left over from previous stuff.

I need a BIG PIECE OF PAPER to map out what I am wanting to do so I can really get a good grip on what I want the node to do.

That's a good point. In industrial level that planning procedure is mandatory.

Why not simply use the projects feature? For complex and large flows that need to be cloned to other machines I would say that it is a must!

1 Like

Thanks.

I am really thinking of doing that. But I haven't quite got my head around how to do it.

On one of my machines, I have imported a "sub flow" (Project?) but it only has 1 input and 1 output.

Though I can live with 1 input (as that is pretty well the story with all nodes) I need multiple outputs.

And... depending on the scope of how much I can do that..... It would work.

Thanks very much for the suggestion.

Oops.
I was confused.

I have seen this "Sub Flow" thing, which is what I was talking about.

That seems like a good way. that way I insert a subflow, rather than a heap of nodes.

Even if your node-red installs are identical, any time you are reaching across a network you may see different behaviors caused by firewalls, routers, domain controllers, user permissions, etc, etc.

Before you spend too much time debugging node-red, you should probably ensure that your lower level hw/os layers are working properly (and identically!).

1 Like

This is a software "architecture" that has been described as a "big ball of mud". As someone who often looks at week-old code and asks "what the hell was I thinking?", I hesitate to preach, but having a structural idea at the start and working more top-down and less bottom-up has often saved me a lot of grief.

1 Like

Yeah.

I fully agree.

But sometimes I like to just "go with the flow" and see where an idea takes me. It is sometimes interesting and shows me a lot of problems with things, like how I thought I should do something as compared to how it REALLY needs to be done.

Alas a lot of the stuff I am doing it just that. Ah well. Thanks though.