Troubleshooting
Why S7 nodes disappear from the Node-RED palette
Short answer
Installing an S7 package such as node-red-contrib-s7 can break another package's startup registration, which empties its node types out of the Node-RED palette; the flows and the S7-1200 are untouched. Compare the installed-package list and startup log against your baseline, reinstall the missing package through the deployment's supported method, restart and hard-refresh, then set the S7-1200's PUT/GET permission, rack and slot, and a non-optimized test block.
On this page
When installing an S7 package such as node-red-contrib-s7 makes other nodes vanish from the Node-RED palette, the new install removed or broke another package's startup registration, and the palette only shows node types the runtime loaded successfully. The fault sits in the package layer on the gateway PC, not in the PLC; the S7-1200 keeps running throughout. The fix is to compare the installed-package list and the startup log against a saved baseline, reinstall the missing package through your deployment's supported method, restart the runtime and hard-refresh the editor, and only then configure the S7-1200: its PUT/GET access permission, the rack and slot fields, and a non-optimized test data block.
What a missing palette node actually means #
Node-RED loads every package found in the active runtime's user directory at startup, each package registers its node types, and the editor palette mirrors what registered. Installing a new package can change a shared dependency that an already-installed package was built against; that older package then fails to register on the next start, and every node type it provided drops off the palette. The flow file still carries those node definitions, which is why the affected flows show unknown nodes instead of empty space.
That gives you two layers to separate and one decision rule: the dependency list shows what is installed, the startup log shows what loaded. Check installation first — if the package is gone from the list, nothing about loading matters until it is back. If it is listed but its nodes are absent, the registration error in the log is the root cause, and reinstalling alone will not fix it.
Capture the baseline before touching packages #
The baseline is what makes the loss measurable instead of anecdotal. Before you add or change any package, record:
- The Node-RED runtime version and the Node.js version it runs on.
- The path of the active user directory, so package changes land on the runtime your editor connects to, not on a second installation on the same PC.
- The installed-package list with versions, copied from the palette manager and saved as text.
- A flow export plus the runtime's own configuration and credential backup through the deployment's supported method; a flow export alone does not carry everything an authenticated connection needs to come back.
- Evidence the current flows work: node status plus one real value delivered end to end.
If the browser shows a healthy palette while the log you are reading reports load errors, you are almost certainly looking at two different instances. Confirm the editor points at the instance whose log you inspect before you change anything.
Reinstall through the supported method #
Install only the exact package name the baseline expects. node-red-contrib-s7 is the S7 package published on the flows library, and some forks publish under scoped names such as @oriolrius/node-red-contrib-s7, so a near-match is still a mismatch. Use the deployment's supported route: Manage palette → Install in the editor, or the package's documented npm install command run inside the active user directory.
On a plant PC with no internet access, install vendor-pinned Node-RED nodes offline on an IPC rather than improvising a folder copy. When the install itself fails on the network, fixing npm E502 when installing Node-RED nodes behind a proxy covers the common corporate-proxy case.
After the install completes, restart Node-RED, then hard-refresh the editor with Ctrl+Shift+R; if an entry still looks stale, clear the browser cache. Read the startup log down to the first error: an installer success message proves the files landed, not that the package registered. Decision: change no flow and no PLC setting until both the old packages and the new S7 nodes appear after a clean restart.
Diagnostic ladder for a shrinking palette #
Work the ladder top down and stop at the first row that matches your symptom:
- Package absent from the installed list — the dependency set changed during the S7 install. Reinstall the missing package by its exact name, then identify what altered the dependency set so it does not happen again.
- Package listed, nodes absent — read the startup log for that package's registration error and resolve it before editing any flow. Reinstalling a package that fails to load changes nothing.
- Palette entry present but disabled — enable the node set in the palette's configuration and restart the runtime.
- Nodes missing in one browser only — that is editor cache, not the runtime. Hard-refresh with Ctrl+Shift+R before reinstalling anything.
- Flows show unknown node types — the implementation is not loaded; restore the package rather than deleting or redrawing the flow objects.
- Palette whole, but no data arrives — the fault has moved past packages into communication; go to the S7-1200 checks below.
- Nodes vanish after a restore or rebuild — the deployment reproduced only its declared dependencies. Declare the package in the deployment's persistence mechanism instead of reinstalling it by hand after every rebuild.
Example: a gateway that shows 54 of its baseline 61 nodes #
The counts here are illustrative; take your own from the baseline you saved. Suppose the baseline holds 9 packages registering 61 palette node types, and the Schneider communication package accounts for 7 of them. After the S7 install, node-red-contrib-s7 appears in the dependency list, but the palette shows 54 node types.
61 − 54 = 7 node types missing — exactly the count that package registered, and no other package's. One package failed to load; this is not a cascade. The startup log confirms it: the Schneider package's registration error follows the shared dependency version the S7 install replaced. Restore that package at its baseline version, restart, and the palette returns to its 61 types plus the new S7 node types.
The decision rule this example gives: when the missing-node count equals one package's registered count, restore that single package and move on. When the count exceeds any single package's registered total, several packages share the broken dependency — rebuild the dependency set from the baseline list in one pass instead of reinstalling packages one by one and hoping.
Then connect the S7-1200 #
Only after the palette is whole again. Read the controller's Ethernet address from its configured interface and check reachability from the Node-RED host itself, not just from the engineering workstation. Reachability is the first gate, not proof of communication: a reachable CPU can still refuse the connection outright.
In the CPU project's protection settings, enable the PUT/GET access permission, download the approved change, and leave the rest of the plant's access policy untouched. This permission lets remote partners read and write the CPU without per-connection authorization, so scope it to the network segment the gateway actually sits on.
Next, match the rack and slot fields in the node's connection configuration to the controller's configuration, and wait for the node to report an established connection before mapping any variable. For the test data, create a non-optimized data block — optimized blocks do not expose the stable absolute addresses the package reads — and note the block number, byte offset and data type from the PLC project. Acceptance is one known value: change it in that block and watch the same value arrive in a debug node on the gateway. Network reach, established connection and variable readability are three separate gates, and each can fail alone.
Keep the palette stable after the fix #
- Declare both packages in the deployment's dependency mechanism — container image, restore job or backup set — so the next rebuild reproduces them instead of relying on a hand install.
- Re-run the baseline diff after any Node-RED upgrade or new package. The palette node count is the cheap tripwire: a count that comes back one package short is found in minutes, not at the next commissioning.
- Before the gateway returns to service, confirm that both node sets survive a restart and that the original flow still delivers real values, not just palette entries.
Questions asked
Do I need node-red-contrib-s7 to read an S7-1200?
For classic S7 communication with an S7-1200 you need a package that speaks S7, such as node-red-contrib-s7; the Schneider nodes serve Schneider controllers and cannot replace it. node-red-contrib-s7-plus is a separate implementation with its own node type names. Record in the baseline which package the flows expect, because restoring a near-matching package leaves the flows showing unknown nodes.
Are the flows damaged when nodes disappear?
No. The flow file keeps each node's definition even when the runtime cannot load it; the editor marks those nodes as unknown instead of deleting them. Leave them in place. Reinstall the missing package, restart the runtime, and the same flow objects pick up their configuration again. Keep the pre-change flow export so you can confirm nothing else in the flow shifted during the repair.
Why do nodes vanish after a backup restore or container rebuild?
Because a restored image or rebuilt runtime reproduces only the dependencies its deployment declares. A package installed by hand into the user directory and never declared in the container image, restore script or backup set comes back missing, and every node type it registered disappears with it. Declare the package through the deployment's supported mechanism, then compare the installed-package list with the baseline after every rebuild.
Does this palette fault affect the PLC?
No. The missing nodes never reach the S7-1200; the controller keeps running and keeps serving the clients it already has. The fault is confined to the gateway PC's Node-RED runtime. Treat the PLC side as a separate step: the PUT/GET permission, rack and slot, and the non-optimized test block only come into play after the palette shows the complete node set again.