Power-off spike (Part A) on the N100: plugswitch, wall-power figures, the hub's view
gates / gates (push) Successful in 6m35s

plugswitch.py refuses 'off' unless 20 s of readings show the N100 is already off (standby + 1 W,
no ping); 7 tests, each check red-proofed. By hand: guest shutdown 12 s, host off, 0.0 W; the hub
stayed silent and 'ONLINE' for 18 min; plug off/on did not start the N100, its power button did
(dashboard in 42 s). Wall figures into SIZING.md 4 and sizing.json power (8.5 / 20.7 / 0.0 W).
This commit is contained in:
2026-10-13 19:15:08 +02:00
parent 6a1f715a87
commit b4dcf4b373
32 changed files with 1410 additions and 20 deletions
+15
View File
@@ -31,3 +31,18 @@ lifetime total. Use watts × time for energy.
When the plug moves address or is paired again: re-run the tinytuya wizard in `~/.config/felhom-bench/`
(credentials `TUYA_ID`, `TUYA_SECRET`, `TUYA_DEVICE_ID` from `~/.config/credentials`, region `eu`) and
update `plug.json`. Its output prints the key — send it to a file, never to a terminal or a log.
## plugswitch.py — switch the N100's plug (`on`, `off`, `status`)
```
~/.venvs/plugmeter/bin/python scripts/bench/plugswitch.py status
~/.venvs/plugmeter/bin/python scripts/bench/plugswitch.py off # only when the N100 is already off
~/.venvs/plugmeter/bin/python scripts/bench/plugswitch.py on
```
**`off` is not a power-cut button.** It refuses (exit 2, with the reason) unless the plug's readings over at least
20 s are all below `standby_w` + 1 W and the N100 answers no ping. `standby_w` (0.0, measured 2026-10-13) and
`host_ping` live in `plug.json`. Pinned by `test_plugswitch.py`. Never use it on any other plug.
The N100 does **not** start when the plug comes back on after a deliberate power-off (2026-10-13,
`documentation/audits/poweroff-2026-10-13/`): press its power button.