-
-
Notifications
You must be signed in to change notification settings - Fork 41
Developer Tools
Note: Some examples use "washer" in topic/entity names, but the same tooling applies to other predictable-cycle appliances (e.g., dryers and dishwashers).
See Testing for comprehensive documentation.
All testing and mock socket documentation has been consolidated into Testing:
- Mock socket reference & parameters
- Fault injection scenarios
- Testing procedures
- Debugging guide
cd /root/ha_washdata/devtools
pip install paho-mqtt
python3 mqtt_mock_socket.py --speedup 720In another terminal:
mosquitto_pub -t homeassistant/mock_washer_power/cmd -m 'LONG'See https://github.com/3dg1luk43/ha_washdata/wiki/Testing#mock-socket-reference for full documentation.
Analyses a WashData diagnostic export (JSON) and compares the device's current settings against optimal settings derived from its own cycle history. Uses the same heuristics as the in-HA suggestion engine but runs fully offline - no Home Assistant required.
# From the repository root with the venv activated:
source .venv/bin/activate
# Pass the export file as an argument
python3 devtools/analyze_diag.py path/to/diagnostics_export.json
# Or let it prompt you interactively
python3 devtools/analyze_diag.py
# Plain text output (no ANSI colours - good for CI or piping)
python3 devtools/analyze_diag.py --no-color export.json| Section | Parameters analysed |
|---|---|
| Power Thresholds |
stop_threshold_w, start_threshold_w, running_dead_zone
|
| Energy Gates |
end_energy_threshold, start_energy_threshold
|
| Timing & Operational |
watchdog_interval, no_update_active_timeout, off_delay, min_off_gap, profile_match_interval
|
| Matching & Learning |
duration_tolerance, profile_duration_tolerance, min/max_duration_ratio
|
Each row shows the current value, suggested value, a % change arrow, and a one-line rationale. A summary at the end lists how many parameters can be improved and where to apply them in the HA UI.
The report also surfaces any suggestions already computed by live HA operation (stored in manager_state.suggestions inside the export) alongside the offline analysis - useful for cross-checking.
A Cycle History table at the bottom lists every detected programme with its average duration, standard deviation, and coefficient of variation so you can immediately see which programmes are consistently recognised vs. which are noisy.
- In Home Assistant go to Settings → Devices & Services → WashData.
- Click the three-dot menu on the device card and choose Download Diagnostics.
- Pass the downloaded
.jsonfile toanalyze_diag.py.
User Docs
Reference
Development
Repository