Bench: plugcut.py — a real power cut on the HP with three ways back on; the night's round table written before round 1
gates / gates (push) Successful in 6m45s
gates / gates (push) Successful in 6m45s
This commit is contained in:
@@ -53,3 +53,16 @@ Same tools, `--plug hp` (config `~/.config/felhom-bench/plug-hp.json`, the plug
|
||||
the HP at `192.168.0.104`). `plugswitch.py off --plug hp` refuses until the HP's switched-off figure (`standby_w`) is
|
||||
measured. The wizard reads both plugs from one Tuya account; the credentials are `TUYA_DEVICE_ID_N100` and
|
||||
`TUYA_DEVICE_ID_HP` (renamed from `TUYA_DEVICE_ID` by the operator).
|
||||
|
||||
## plugcut.py — a real power cut, on purpose (2026-10-13 night)
|
||||
|
||||
`plugswitch.py off` stays „not a power-cut button". `plugcut.py` is the separate tool that cuts a running machine:
|
||||
|
||||
~/.venvs/plugmeter/bin/python scripts/bench/plugcut.py --plug hp --off-seconds 10 --i-mean-a-power-cut --log DIR
|
||||
|
||||
- Only the plug `hp` (the N100's only with `--allow-n100`); only with `--i-mean-a-power-cut`; 1–60 s, up to 3600 s
|
||||
only with `--long`.
|
||||
- Three ways back on: the plug's own countdown (data point 9, sent in the same command as the off, then read back —
|
||||
not shown running → on at once); a detached watchdog process started before the off (on after off-seconds + 15 s,
|
||||
survives the tool being killed); `finally:` in the tool.
|
||||
- One line per action to stdout and `DIR/plugcut.log`. Pinned by `test_plugcut.py` (12 tests, each guard red-proofed).
|
||||
|
||||
Reference in New Issue
Block a user