JSON WebSocket Sender @ vrch.ai
Pushing JSON over a WebSocket channel
- JSON
If the WebSocket Channel Loader is the pack's radio, this is the transmitter. The VrchJsonWebSocketSenderNode takes a JSON string and broadcasts it over a WebSocket channel to any listener connected to the same server - most commonly the matching loader node running on another machine. It's how a ComfyUI workflow on one box tells a ComfyUI instance (or browser, or custom script) on another what it's doing, live.
What it does
The inputs are the same trio the loader uses, plus the payload itself:
server- the WebSocket server address ashost:port. The default172.17.0.2:8001is a Docker bridge IP straight out of the developers' own container setup; you will almost certainly replace it with your own relay or endpoint. This is the single most common gotcha in the whole WebSocket set.channel- one of 8 numbered channels (1–8). Sender and receiver must agree on it, and it's your way of running multiple independent data streams over one server.json_string- the payload, typed in as multiline JSON. Defaults to{}.
It outputs JSON as a passthrough of what you sent, and it's an output node. That passthrough is handy for chaining: you can broadcast your payload and still have it flow onward in the graph without needing a reroute.
The debug toggle prints what's happening so you can confirm the send actually went out - worth switching on the first time, because a silent node that thinks it's sending when nobody's listening is a classic source of confusion.
Why you'd reach for it
This is the "talk to another machine" node. Pair it with the JSON WebSocket Channel Loader on a second instance and you've got a simple message bus between two ComfyUI boxes - send a prompt change, a status flag, or live control values and have the other side react in real time. It's the same pattern the pack uses for its real-time gamepad and control tutorials, just for JSON instead of pixels or latents. If you're not running anything multi-machine, this node does nothing for you on its own; it's the loaders and viewers that make it worth having.
Installing and fixing it
Shared pack install: clone VrchStudio/comfyui-web-viewer into ComfyUI/custom_nodes, pip install -r comfyui-web-viewer/requirements.txt, restart - or just search ComfyUI Web Viewer in Manager. No model files involved.
When a receiver stays silent: check the server address first, then the channel on both ends, then flip debug on the sender and confirm the message left. A typo in json_string (invalid JSON) is the other classic failure - the sender can't serialize what you typed.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| channel | COMBO | 1 | 8 options: 1, 2, 3, 4, 5, 6, +2 |
| server | STRING | 172.17.0.2:8001 | — |
| debug | BOOLEAN | false | — |
| json_string | STRING | {} | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| JSON | JSON | — |