EmAySee Host Pinger
Is your API up? This node pings it and hands you a 1 or 0
- is_up
You've got a workflow that calls out to a local server - an LLM on another box, a ControlNet preprocessing service, a render farm - and sometimes that server is down, and the workflow just fails or hangs. This node runs an actual network ping against a hostname or IP and outputs 1 if the host answers, 0 if it doesn't. Wire that into a conditional branch and your workflow can decide what to do when the backend is unreachable instead of dying mid-run. It's the pack's answer to "check the dependency before you use it."
How it works
It shells out to your system's ping command (that's the "Host Pinger" part - no Python networking library, no raw sockets). The implementation is careful about platform differences:
- Windows gets
ping -n 1 -w 1000 <host>; Linux/macOS getping -c 1 -W 1 <host>. - The subprocess runs with a 2-second timeout, so a hung network can't hang your whole queue forever.
- Return code 0 means reachable →
is_up = 1; anything else (host unreachable, timeout,pingnot installed) →is_up = 0.
It prints a clear console error if ping isn't on your PATH, which is the one environment gotcha.
Inputs and outputs
host(STRING, defaultgoogle.com) - a hostname or IP address. Change it to whatever you actually want to check - your local LLM box, a NAS, a remote API endpoint.
Output: is_up (INT) - 1 reachable, 0 unreachable. Feed it into a switch, a conditional selector, or multiply it against a value to gate an operation.
Where it earns its place
The strongest use is gating the pack's own network nodes. Before EmAySee_DeepReasoningConnector fires a request to your local text-generation-webui, ping the box first - if is_up is 0, branch to a fallback prompt or skip the call entirely. It's also the cheap way to detect "is the internet even on" (ping google.com) before a workflow depends on it. Pair with EmAySee_GreaterThanNode and the string selector for a full availability check.
Install
Part of ComfyUI_EmAySee_CustomNodes. ComfyUI Manager → search "EmAySee" → install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/EmAySee/ComfyUI_EmAySee_CustomNodes
No pip dependencies - it uses only the standard library and your OS's ping binary. Restart and you'll see the pack's "SPECTRE v5.0" banner.
Gotchas
Because it runs a real subprocess each time, the node is slow relative to normal node math (up to 2 seconds per run) - ComfyUI caches nodes between runs, but every re-run pays the ping cost. And ping semantics matter: some hosts block ICMP even when their HTTP service is fine, so "unreachable by ping" doesn't always mean "API down." If you're gating an HTTP service, the more accurate check is actually hitting the endpoint; this node is the coarse, fast proxy for that.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| host | STRING | google.com | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| is_up | INT | — |