All checks were successful
Build & Deploy docs / build-deploy (push) Successful in 3m52s
Le badge PUBLIC de PermissionScopeNone devient AUTH : sur un transport authentifié, nymea exige un token valide pour toute méthode sauf JSONRPC.Hello, Authenticate et RequestPushButtonAuth (jsonrpcserverimplementation.cpp, tag 1.15.2). « Lecture publique, aucun token requis » était faux, en trois langues. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2.0 KiB
2.0 KiB
JSON-RPC API Supported
ETM PowerSync exposes nymea's JSON-RPC API locally, extended with the ETM
namespaces (Energy, AirConditioning, EvDash).
Connection
| Mode | Address | Notes |
|---|---|---|
| Raw TCP | <ip>:2222 |
The server sends a JSON welcome message (\n-delimited) on connect |
| WebSocket | ws://<ip>:4444 |
The client sends JSONRPC.Hello first |
Every message is a JSON object terminated by \n. Requests carry an id field
(integer) to match the reply. Notifications have no id.
Authentication
- Call
JSONRPC.Authenticatewithusername,passwordanddeviceName→ the server answers with atoken. - Include the
tokenin every subsequent request. - To receive notifications: call
JSONRPC.SetNotificationStatuswith{ "namespaces": ["Energy", "Integrations", ...] }.
Energy conventions
| Quantity | Convention |
|---|---|
| PV output | negative value (producer convention) |
currentPowerAcquisition |
grid — positive = import, 0 when exporting |
currentPowerStorage |
battery — positive = charging, negative = discharging |
| Energy totals | in kWh |
| Timestamps | in seconds (Unix epoch) |
Permission badges
| Badge | Scope | Description |
|---|---|---|
| AUTH | PermissionScopeNone |
Any authenticated account (token required whenever the transport requires authentication; only JSONRPC.Hello, Authenticate and RequestPushButtonAuth work without one) |
| CONTROL | PermissionScopeControlThings / ExecuteRules |
Control of things and rules |
| CONFIGURE | PermissionScopeConfigureThings / ConfigureRules |
Configuration of integrations and rules |
| ADMIN | PermissionScopeAdmin |
System administration |