6a1f715a87
gates / gates (push) Successful in 6m43s
scripts/bench/plugmeter.py prints watts/mA/V/kWh as CSV from the Tuya plug on the LAN (default) or from Home Assistant on demo-hp's guest. 10-minute side by side and a 3-minute control in documentation/audits/plugmeter-2026-10-13/: Home Assistant alone did not move for 3 minutes, so the LAN reader is the measurement source. No key, device id or token in the repo; secrets scan 0 hits with a positive control.
35 lines
1.9 KiB
Markdown
35 lines
1.9 KiB
Markdown
# REPORT — reading the N100's power plug from DooPlex (2026-10-13)
|
||
|
||
## In plain words
|
||
|
||
- **Both ways work.** The plug read 6.6–7.0 W at rest; Home Assistant showed 7 W at the same time.
|
||
- **Use the direct (tinytuya) way for measurements.** It gives a new value every 2 seconds.
|
||
- **Home Assistant is the backup.** Alone, it did not change for 3 minutes. It looked fast only while the direct
|
||
reader ran, because the direct reader makes the plug report to the cloud too.
|
||
- Home Assistant from our catalog installed with no problems. It stays on the HP demo box.
|
||
- **One mistake:** the plug's local key was shown once in the operator chat (a filter missed it). It is not in any
|
||
file or commit. Pairing the plug again in Smart Life replaces the key; the operator decides.
|
||
|
||
## How to use it
|
||
|
||
```
|
||
~/.venvs/plugmeter/bin/python scripts/bench/plugmeter.py --duration 600 > run.csv
|
||
~/.venvs/plugmeter/bin/python scripts/bench/plugmeter.py --once
|
||
~/.venvs/plugmeter/bin/python scripts/bench/plugmeter.py --source ha --once
|
||
```
|
||
|
||
## Details
|
||
|
||
Evidence, data-point map, side-by-side table and control: `documentation/audits/plugmeter-2026-10-13/README.md`.
|
||
Data points: 19 power W×10, 18 current mA, 20 voltage V×10, 17 `add_ele` kWh×1000 (not a lifetime total).
|
||
10 min side by side: tuya mean 8.36 W / median 7.20 / sd 2.67, 215 rows, 56 slow reads (≤ 8 s), 0 failed;
|
||
ha mean 8.40 / 7.20 / 2.74, 301 rows, 0 failed.
|
||
|
||
Secrets scan: 10 values (device id, local key, uuid, MAC, HA token, Tuya Access ID/Secret, device id from
|
||
credentials) against the diff and every new file — 0 hits; positive control (the key planted in a scratch file) — hit.
|
||
|
||
Gates: `python3 scripts/repo_gates.py` rc 0 with the three sibling clones beside it.
|
||
Register: 125 rows before, 125 after; 0 opened, 0 closed.
|
||
Teardown: N100 untouched; Home Assistant on demo-hp stays (on purpose); hub untouched; DooPlex keeps the user venv
|
||
and `~/.config/felhom-bench/`. System poster: no fact changed.
|