README: update CLI reference and add diff mode section

- CLI table now shows which credentials file key each flag overrides
- Added --diff, --dry, --log-dir, -i/--interval, --host, --port
- New "Diff mode" subsection under Push server protocol

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-26 14:56:53 +02:00
co-authored by Claude Sonnet 4.6
parent d53202822e
commit 9951ef69e4
+25 -9
View File
@@ -85,16 +85,22 @@ All connection and collection settings live in a single JSON file:
### CLI reference
Only a handful of flags remain; all vehicle/server settings are in the credentials file.
CLI flags override the corresponding credentials file value when given.
| Flag | Description |
|------|-------------|
| `-c FILE` | Credentials / settings file (required) |
| `-u / -p` | Override username / password (also `WC_USER` / `WC_PASS`) |
| `-d DOMAINS` | Override domains (comma-separated or `all`) |
| `--max-records N` | Keep only the last N records per file |
| `-v` | Verbose / debug logging |
| `--list-domains` | Print available domains and exit |
| Flag | Overrides | Description |
|------|-----------|-------------|
| `-c FILE` | — | Credentials / settings file |
| `-u / -p` | `credentials.username/password` | Username / password (also `WC_USER` / `WC_PASS`) |
| `-d DOMAINS` | `domains` | Domains to collect (comma-separated or `all`) |
| `-i SECONDS` | `interval_s` | Collection interval in seconds |
| `--host HOST` | `host` | Push server bind address |
| `--port PORT` | `port` | Push server TCP port |
| `--log-dir DIR` | `log_dir` | Directory for rotating log files |
| `--max-records N` | — | Keep only the last N records per file |
| `--diff` | — | Send diffs instead of full snapshots (must match client setting) |
| `--dry` | — | Skip WeConnect; run push server only (for testing) |
| `-v` | — | Verbose / debug logging |
| `--list-domains` | — | Print available domains and exit |
**Available domains:** `charging`, `climatisation`, `measurements`,
`readiness`, `parking`, `access`
@@ -138,6 +144,16 @@ The server listens on the `host`:`port` from the credentials file (default `0.0.
All messages are **newline-delimited JSON** (one record per line, `\n` terminated).
### Diff mode (`--diff`)
When enabled on the server, the history burst is compressed: the first
record is sent in full, subsequent records as `jay_diff_full` diffs
(`{"_diff": true, "update_add": {…}, "delete": {…}}`). Live snapshots
are also diffed against the previous broadcast. Enable `--diff` on the
client side (`client.py`) or check **Diff mode** in the GUI Connector
tab to reconstruct full snapshots from the stream. Both sides must
agree — a mismatch produces garbled output.
## GUI client (`gui_client.py`)
```bash