// ED-range (Ethernet Remote IO) — complete reference template, all keys explained. // // Values shown are the FACTORY DEFAULTS where the firmware defines one // (verified against Brainboxes.ED.Firmware @ master = release 8.33.0); // otherwise a typical value captured from a live device, marked "typical". // // Template semantics: a null field or omitted section means "don't touch". // This file is documentation — the CLI's `template apply` parses strict JSON, // so strip the comments (or copy the shape) before feeding it to the tool. // Ranges cited are what the DEVICE FIRMWARE enforces; bb-eco may guard more // tightly where noted. { // ---- Envelope (metadata; suppressed from `bb-eco config` output) ---- "version": 3, // Template schema version. Optional — omit it and the current // version is assumed. IO line values are per-line, and lines are // ordered by the device's own slot order (outputs first). Version-2 // files still validate and apply; version-1 files are refused. "family": "ED", // "ED" | "ES" | "BB" | null (any). Apply refuses a family mismatch. "compatibleModels": ["ED-038"], // Optional allow-list; null = any model of the family. "description": "Reference template — every ED key with defaults and ranges", "createdAt": "2026-08-13T00:00:00Z", // ---- identity: READ-ONLY snapshot (export artifact) ---- // Never applied by TemplateApplicator, never compared by DriftDetector. // Shown here for completeness; safe to delete from a reusable template. "identity": { "mac": "00:0A:4F:05:F3:62", // Device MAC. Read-only. "ip": "192.168.2.96", // IP at export time. Read-only. "model": "ED-038", // Model number. Read-only. "modelVariant": null, // Hardware variant suffix, if any. Read-only. "firmwareVersion": "8.33", // Read-only. "firmwareType": "T", // TIVA chip class marker. Read-only. "firmwareDate": "11/12/2023" // Read-only. }, // ---- network (network.cgi; applied LAST — can drop the connection) ---- "network": { "dhcp": true, // true = DHCP, false = static. Static requires // staticIp+subnet+gateway (device wants all 12 octets together; // the applicator fills omissions from current config). "staticIp": null, // Dotted quad. Octets are masked & 0xFF by the device, // NOT validated — nonsense like 999 is silently truncated. "subnet": "255.255.255.0", // Dotted quad. No contiguity check by the device. "gateway": "0.0.0.0", // Dotted quad. 0.0.0.0 = no gateway. "dns": null, // READ-ONLY in practice: optional network.cgi param on ED, // but bb-eco never writes it. "webPort": 80, // HTTP port, 1–65535. Change drops the connection (device reset). "upnp": true // SSDP/UPnP announcements on/off (0/1 on the wire). }, // ---- device (dev.cgi) ---- "device": { "name": "ED-038", // devname. HARD LIMIT 10 CHARS on ED (DEV_NAME_LEN=10): // an overlong value is neither truncated nor rejected — the // CGI handler never answers and the HTTP stack wedges. // bb-eco refuses >10 before sending. Factory default = model name. "location": "", // loc. Same 10-char limit. Must travel WITH devname (the // firmware only parses loc inside the devname branch) — the // applicator always sends the pair. Factory default: empty. "checkConnectivity": false // READ-ONLY on current ED firmware. }, // security: null = don't touch. "security": null, // ---- io (proto.cgi + io.cgi; ED only) ---- // !! proto.cgi RESETS THE DEVICE when anything changed (m_bResetDevice in the // firmware handler) — expect a reboot after applying protocol settings. "io": { "protocol": "ASCII", // IO protocol: "ASCII" | "Modbus" (wire currpro: 1 | 2). "dconAddress": 1, // DCON unit address, 1–255. Factory: 1. "dconTcpPort": 9500, // ASCII/DCON TCP port, 1–65535. Factory: 9500. "idleTimeout": 0, // ASCII idle disconnect, seconds, 0–65535. 0 = never. "counterUpdate": 0, // Counter update direction, 0 | 1 (digital models). "counterMode": 0, // Counter mode, 0 | 1 (digital models). "checksum": 0, // DCON checksum enable, 0 | 1. "modbusTcpPort": 502, // Modbus TCP port, 1–65535. Factory: 502. "modbusSlaveId": 255, // READ-ONLY: the device's reported Modbus address setting // (255 = accept all). Not written by templates. "modbusIdleTimeout": 0, // Modbus idle disconnect, seconds, 0–65535. 0 = never. "maxConnections": 8, // Modbus "Max. Connections", 1–8 (firmware accepts up to 16). Factory: 8. "modbusRespondToAllSlaveIds": false, // false = respond to server IDs 0 and 255 only (factory); // true = respond to 0–247 and 255. Wire param msid. "modbusAcceptAllAddresses": false, // Accept all register/coil/input addresses. Wire param maa. Factory: false. "gatewayBaudRate": 9600, // REAL baud of the DCON gateway serial port. Legal values: // 1200, 2400, 4800, 9600 (factory), 19200, 38400, 57600, 115200 // (converted to the wire code dbaud 3–10 internally; templates // exported before 2026-08 carry the raw code — still accepted). // null / absent on devices without a configured gateway (they // report dbaud=0). NOTE: digital IO models (ED-038/008/204/004/ // 504/500) PIN this value in firmware — writes answer Success // but the original is kept (no gateway serial port exists). "commandTimeout": 200, // DCON gateway command timeout, ms, 0–50000 (the firmware's own // error message wrongly claims 0–5000). Factory: 200. // Thermocouple models (ED-593) only — absent on every other model: "coldJunctionCompensation": true, // Enable cold-junction compensation. Wire param enCJC. Factory: true. "openWireDetection": true, // Enable open-wire detection. Wire param enOWD. Factory: true. "temperatureOffset": 0.00, // Manual offset added to every reading, in temperatureOffsetUnit. // Range -99.99 to +99.99 (C, K) or -179.96 to +179.96 (F). Factory: 0. "temperatureOffsetUnit": "C", // "C" | "F" | "K" — the unit temperatureOffset is written in. The device // stores offsets in Celsius; bb-eco converts on the way in. "eStopLine": "255", // Quick-stop trigger input, as a digital-input ORDINAL // ("0" = DIn 0, … ; "255" = disabled — the factory default). // Wire param sEL. Only exists on devices with both digital // outputs and inputs. "eStopDirection": "0", // Quick-stop trigger edge: "0" = falling, "1" = rising. // Wire param sEE. Travels with eStopLine in the same request. "lines": [ // One entry per line, ordered by the device's own slot order: OUTPUTS // FIRST, then inputs (e.g. an ED-004 is DO0-3 at index 0-3, DI0-3 at // 4-7). `index` is that slot number. io.cgi is ALL-OR-NOTHING: the // applicator read-modify-writes every line, so a template may list only // the lines it changes. // // This reference lists EVERY per-line key; real exports include only the // keys that apply to the line's hardware type (a relay has its three // output values, a digital input its debounce, an analogue line its // sensor config) — absent means the same as null: "don't touch". { "index": 3, // Device slot number (outputs first). Identity — cannot be changed. "name": "RL0", // ≤10 chars (same firmware limit + wedge hazard as devname). // ONLY configurable on analog models — digital EDs answer // Success but keep factory names; bb-eco reports that honestly. "lineType": "relay", // READ-ONLY hardware fact: digitalInput | digitalOutput | relay | // analogInput | analogOutput | rtd | thermocouple. "enabled": null, // Analog lines only (wire ioAEn{n}: 0/1). Digital lines // cannot be disabled, so this stays null for them. "unit": null, // READ-ONLY display unit reported by the device. "sensorType": null, // Analog models: sensor/FSR selection written as the ioAFsr{n} // code — legal names/codes are model-specific, see // SensorCodeMap.cs (e.g. thermocouple types, ±10V, 4–20mA). "wiring": null, // RTD models: "2-wire" | "3-wire" | "4-wire" // (wire ioARTDConnType{n}). null elsewhere. "powerOnValue": "0", // Output lines: state driven at power-up. Digital outputs and // relays: "0" | "1" (wire ioPv{n}). Analog outputs: the device's // display-formatted string verbatim, e.g. "+05.000" (wire ioAP{n}). // null on input lines. "safeValue": "0", // Output lines: state driven when the network connection is lost // (comms watchdog). Same format as powerOnValue (wire ioSv{n} / // ioAS{n}). null on input lines. "quickStopValue": "0", // Digital outputs/relays only, and only on devices that also // have digital inputs: state driven when the quick-stop trigger // (eStopLine/eStopDirection) fires. "0" | "1" (wire ioEv{n}). "debounce": null // Digital inputs only, on debounce-capable models: input // debounce time in milliseconds (wire ioDb{n}). Factory: "0". } ] }, // serialPorts: ED models with a serial gateway port export it here, in the same // shape as the ES reference template. IO-only models have none (null = don't touch). "serialPorts": null }