More than one Node-RED "set" of tabs?

I’m confused.

I’ve built three different Node-RED flows on three different tabs, each one for a specific light in my house.

But now I want to tinker with some other stuff, and it seems like all the tabs are linked somehow. If I try to use another BigTimer, for example, and it’s not wired up correctly, my other lights all switch state to OFF. When I delete my unfinished experiment and re-deploy everything, the other lights return to normal.

Am I missing something fundamental to using Node-RED? Am I supposed to use that “export” function and paste the output into an automation YAML file? Is that the idea?

None of the tabs are linked unless you link them.

No.

Exporting the flow exports it from node red in node red’s format. It has nothing to do with yaml or home assistant in any way.

Can you share more details about your flows?

Screenshots should work.

Sure. Here’s the most complicated one - a lamp that turns on twice a day.

And a simpler one, that turns on in the morning and off sometime past dawn.

Screenshot_20181110_200342

The third one is functionally identical to the second; it runs my porch light.

So all these should be independent, right? I was playing in #4 trying to make a countdown timer of sorts, and when I hit “deploy” all the green BigTimers toggled to off. I removed what I’d put in, pressed Deploy again, and everything went back to normal. That’s why I thought they were grouped.

When you deploy it recreates all the nodes you have on all the tabs and reruns them. That’s why it looks like they’re tied together. You can change deploy so it only reloads modified flows or nodes.

Below is another way to accomplish what you’re currently doing with fewer nodes.

and in the Big Timer nodes modify the ON and OFF Text as shown below. What this does is overwrites the service on the call-service node allowing you to have only one call-service node and change it to turn_on or turn_off based on the output of the Big Timer

Not entirely sure what the tie-in from the call-service node Lamp off to Lamp Morning is for. I believe you can remove that and it will function the same.

2 Likes

Thanks for clarifying the Deploy mechanism. That makes sense.

The switch node was because I thought I could only send ON or OFF. Misread the sidebar documentation. Thanks for the correction.