In this page
nes
Client for NES System Software’s device-control SOAP API: connect/disconnect electricity service, connect/disconnect a control relay.
@library("nes", "0.0.0");
Usage
var client = NesClient {
config: NesConfig {
base_url: "http://<nes-host>/CoreServices",
constants: NesConstants { /* from your install's Constants.cs */ },
http_timeout: 30s,
poll_interval: 5s,
poll_timeout: 5min,
},
};
var result = client.connect_load(device_id);
NesConstants’ values are not published anywhere — copy them from your NES
installation’s own Constants.cs (installer’s chosen install location; also
linked from the Start menu). See pro/nes/docs/specs/2026-08-11-nes-client-design.md
for why, and for what this client does and does not cover — notably, there is
no live power-limiting/injection-control command in NES’s API; only
connect/disconnect is supported.
Authentication against the SOAP endpoint is unconfirmed — NesConfig.auth_headers
is there to carry whatever your installation needs once you’ve confirmed it.