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:
@@ -85,16 +85,22 @@ All connection and collection settings live in a single JSON file:
|
|||||||
|
|
||||||
### CLI reference
|
### 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 |
|
| Flag | Overrides | Description |
|
||||||
|------|-------------|
|
|------|-----------|-------------|
|
||||||
| `-c FILE` | Credentials / settings file (required) |
|
| `-c FILE` | — | Credentials / settings file |
|
||||||
| `-u / -p` | Override username / password (also `WC_USER` / `WC_PASS`) |
|
| `-u / -p` | `credentials.username/password` | Username / password (also `WC_USER` / `WC_PASS`) |
|
||||||
| `-d DOMAINS` | Override domains (comma-separated or `all`) |
|
| `-d DOMAINS` | `domains` | Domains to collect (comma-separated or `all`) |
|
||||||
| `--max-records N` | Keep only the last N records per file |
|
| `-i SECONDS` | `interval_s` | Collection interval in seconds |
|
||||||
| `-v` | Verbose / debug logging |
|
| `--host HOST` | `host` | Push server bind address |
|
||||||
| `--list-domains` | Print available domains and exit |
|
| `--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`,
|
**Available domains:** `charging`, `climatisation`, `measurements`,
|
||||||
`readiness`, `parking`, `access`
|
`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).
|
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`)
|
## GUI client (`gui_client.py`)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
Reference in New Issue
Block a user