devices(ubiquiti): the NanoSwitch priced a 72 W passthrough load at 3 W #2431

Merged
jaylouisw merged 1 commit from catalogue/1121-1352 into main 2026-11-21 14:39:58 +00:00
Owner

Refs #130 (the Dream Wall Pro link is still absent; this is the catalogue defect beside it, not a close).

devices/ubiquiti/n-sw.json shipped three sockets on the bare poeOut: true direction bit and no poe.budgetW. Device.poeDraw() (engine/device.js) adds that bit as 1 W, and pseDraw() (engine/validation.js) sums the same field against the budget - so the unit had no budget to exceed.

Measured before (HEAD~1 spec, three Ubiquiti R2AC radios, 24 W passive draw each):

budget seen by allocator: 0 name
eth0 accepted, poeDraw= 1
eth1 accepted, poeDraw= 2
eth2 accepted, poeDraw= 3        # 72 W of load, 3 W billed, no refusal

The vendor's page - https://techspecs.ui.com/uisp/wired/n-sw (HTTP 200, 575,565 B, server-rendered <td class="key"> table, crawler user-agent, read 2026-11-21):

row value
Networking interface (4) GbE RJ45 ports [(1) PoE-in, (3) PoE passthrough]
Power method Passive 24V, 2-pair PoE-in
Power consumption Typical: 1.5W / Max.: 30W
Passive PoE Max. Wattage per port 24V, 2-pair, 1A per port (24W)
Total passive PoE Max. Wattaget 24V, 2-pair, 1A for 3 ports (30W)

The fix. eth0-eth2 declare poeOut: 24 in the passive class (they had claimed PoE/802.3af, which the vendor's Power method: Passive 24V contradicts, and on which a standard PD cannot come up); poe.budgetW is 30 W with the vendor's line in poe.note; eth3 becomes the PoE-in socket (poeIn: 1.5, the typical consumption), so the spec's poe-pd capability finally has a socket that accepts power. Three sockets at 24 W reach 72 W against a 30 W aggregate, which is why the budget and not only the per-port ceiling is carried.

The vendor prints no port numbers - only (1) PoE-in, (3) PoE passthrough - so this pass fixed the count, the wattages and the class without renumbering the panel: the sockets that already carried poeOut stay the PSE sockets and the fourth becomes the input.

Measured after (test/ubiquiti-n-sw-poe-passthrough.test.js, 19 assertions):

Available:30.0(w) Used:24.0(w) Remaining:6.0(w)
eth0 auto on 24.0 Ubiquiti airMAX Rocket 2AC Prism-eth0
second radio -> E_POE_BUDGET: "2 powered ports draw 48 W of a 30 W budget (eth0, eth1)"

Gates: scripts/syntax-check.js 536 files OK; scripts/audit-port-types.js 0 gated, 0 contradicting; scripts/audit-poe-budget.js silent PSEs 19 -> 18; test/hardware-invariants.test.js 26 passed; test/catalogue-hygiene.test.js 25 passed; the six N-SW-touching suites (poe-inference, show-vlan-ports-wrap, show-vlan-router-ports, stp-port-channel-cost, vlan-name-length, etherchannel-summary-layout) pass; docs/DEVICE_REGISTRY.md regenerated with no diff.

Still blocked on #130 itself: re-measured this run - https://techspecs.ui.com/unifi/cloud-gateways/udw-pro 307 -> /, https://store.ui.com/us/en/products/udw-pro 404 (213,322 B), https://dl.ui.com/ds/udw_pro_ds.pdf 302 -> https://techspecs.ui.com/. No UDW-PRO row exists to model.

Refs #130 (the Dream Wall Pro link is still absent; this is the catalogue defect beside it, not a close). `devices/ubiquiti/n-sw.json` shipped three sockets on the bare `poeOut: true` direction bit and no `poe.budgetW`. `Device.poeDraw()` (engine/device.js) adds that bit as **1 W**, and `pseDraw()` (engine/validation.js) sums the same field against the budget - so the unit had no budget to exceed. **Measured before** (HEAD~1 spec, three Ubiquiti R2AC radios, 24 W passive draw each): ``` budget seen by allocator: 0 name eth0 accepted, poeDraw= 1 eth1 accepted, poeDraw= 2 eth2 accepted, poeDraw= 3 # 72 W of load, 3 W billed, no refusal ``` **The vendor's page** - `https://techspecs.ui.com/uisp/wired/n-sw` (HTTP 200, 575,565 B, server-rendered `<td class="key">` table, crawler user-agent, read 2026-11-21): | row | value | |---|---| | Networking interface | `(4) GbE RJ45 ports [(1) PoE-in, (3) PoE passthrough]` | | Power method | `Passive 24V, 2-pair PoE-in` | | Power consumption | `Typical: 1.5W / Max.: 30W` | | Passive PoE Max. Wattage per port | `24V, 2-pair, 1A per port (24W)` | | Total passive PoE Max. Wattaget | `24V, 2-pair, 1A for 3 ports (30W)` | **The fix.** eth0-eth2 declare `poeOut: 24` in the `passive` class (they had claimed `PoE`/802.3af, which the vendor's `Power method: Passive 24V` contradicts, and on which a standard PD cannot come up); `poe.budgetW` is 30 W with the vendor's line in `poe.note`; eth3 becomes the PoE-in socket (`poeIn: 1.5`, the typical consumption), so the spec's `poe-pd` capability finally has a socket that accepts power. Three sockets at 24 W reach 72 W against a 30 W aggregate, which is why the budget and not only the per-port ceiling is carried. The vendor prints no port numbers - only `(1) PoE-in, (3) PoE passthrough` - so this pass fixed the count, the wattages and the class without renumbering the panel: the sockets that already carried `poeOut` stay the PSE sockets and the fourth becomes the input. **Measured after** (test/ubiquiti-n-sw-poe-passthrough.test.js, 19 assertions): ``` Available:30.0(w) Used:24.0(w) Remaining:6.0(w) eth0 auto on 24.0 Ubiquiti airMAX Rocket 2AC Prism-eth0 second radio -> E_POE_BUDGET: "2 powered ports draw 48 W of a 30 W budget (eth0, eth1)" ``` **Gates:** `scripts/syntax-check.js` 536 files OK; `scripts/audit-port-types.js` 0 gated, 0 contradicting; `scripts/audit-poe-budget.js` silent PSEs 19 -> 18; `test/hardware-invariants.test.js` 26 passed; `test/catalogue-hygiene.test.js` 25 passed; the six N-SW-touching suites (poe-inference, show-vlan-ports-wrap, show-vlan-router-ports, stp-port-channel-cost, vlan-name-length, etherchannel-summary-layout) pass; `docs/DEVICE_REGISTRY.md` regenerated with no diff. **Still blocked on #130 itself:** re-measured this run - `https://techspecs.ui.com/unifi/cloud-gateways/udw-pro` 307 -> `/`, `https://store.ui.com/us/en/products/udw-pro` 404 (213,322 B), `https://dl.ui.com/ds/udw_pro_ds.pdf` 302 -> `https://techspecs.ui.com/`. No UDW-PRO row exists to model.
devices(ubiquiti): the NanoSwitch priced a 72 W passthrough load at 3 W (#130)
All checks were successful
CI / Server smoke and Docker build (pull_request) Successful in 27s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 7s
CI / Test (Node 22) (pull_request) Successful in 1m0s
CI / Test (Node 20) (pull_request) Successful in 1m1s
CI / Test (Node 18) (pull_request) Successful in 1m2s
CI / Arm auto-merge (pull_request) Successful in 3s
f1621abc14
N-SW shipped three bare `poeOut: true` sockets and no `poe.budgetW`, so
`poeDraw()` billed 1 W per socket and `pseDraw()` had no budget to sum
against: three 24 V radios drawing 24 W each were all accepted and the
faceplate answered 3 W of "budget not modelled".

Ubiquiti's tech-spec page (read 2026-11-21) prints
"(4) GbE RJ45 ports [(1) PoE-in, (3) PoE passthrough]", "Passive PoE Max.
Wattage per port 24V, 2-pair, 1A per port (24W)" and "Total passive PoE
Max. Wattaget ... 1A for 3 ports (30W)". Each passthrough socket now
carries the 24 W per-port ceiling in the passive class, `poe.budgetW` is
the 30 W aggregate, and the fourth socket is the PoE-in the unit runs from
(the poe-pd capability had no socket that accepted power).

Refs #130
forgejo-actions scheduled this pull request to auto merge when all checks succeed 2026-11-21 13:58:44 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jaylouisw/packetforge!2431
No description provided.