Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions doc/Api.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,10 @@ move a consumer's cursor backwards.
### Steams

Recorded milk-steaming sessions. Each record is opened when the machine
enters `steam` and finalized when it leaves. Today no probe is wired in
production, so `SteamSnapshot.milkTemperature` is `null` on every frame —
the API surface is scaffolding for skin developers and for future
probe / FW support. `SteamSettings.stopAtTemperature` (in
enters `steam` and finalized when it leaves. `SteamSnapshot.milkTemperature`
uses the preferred Bengle milk probe when its declared temperature channel is
available, and is `null` when no suitable sensor is registered.
`SteamSettings.stopAtTemperature` (in
`/api/v1/workflow`) is the target the future FW-autonomous stop or
in-app stop will trigger on.

Expand Down
43 changes: 43 additions & 0 deletions examples/plugins/e64ws.reaplugin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# E64 WebSocket sensor

This opt-in example exposes one read-only sensor registration per configured
Mahlkoenig E64 grinder. It uses the existing host WebSocket transport and
publishes the complete driver state as the `state` object channel.

Use an ordinary setting for the instance list and the secure setting for the
tokens. Set `InstancesJson` to this JSON:

```json
[{"id":"e64-one","name":"Kitchen E64","scheme":"ws","host":"127.0.0.1","port":9997,"pollMs":1000}]
```

Set `TokensJson` to this JSON:

```json
{"e64-one":"replace-with-the-secure-session-token"}
```

Each instance needs a unique safe id, a non-empty name, `ws` or `wss`, a
hostname or bracketed valid IPv6 address, a port from 1 through 65535, and a
token. DNS labels cannot be empty or start/end with a hyphen. Malformed IPv6
literals such as `[.]`, `::::`, and `[12345::1]` are rejected.
At most eight instances are accepted. `pollMs` is optional: `0` disables
polling, otherwise it must be between 100 and 3,600,000 milliseconds. The
whole configuration is checked before any sensor registration or socket open;
an unknown token id or any invalid entry rejects the complete load.

The four exposed reads send only `RequestDriverState`, `RequestDriverConfig`,
`RequestNachineInfo`, and `RequestLogMessages`. The plugin has no motor,
configuration, calibration, or GBS write path. A device disconnect affects its
own instance. A settings reload is a whole-plugin operation and may reconnect
all configured instances; it is the supported way to change the list.

The corresponding result types are `RequestDriverStateResult`,
`RequestDriverConfigResult`, `RequestNachineInfoResult`, and
`RequestLogMessagesResult`. Results must carry the matching `refId`; the
documented JSON `pong` heartbeat is ignored and never published.

`ws` is suitable for a trusted network or a loopback fixture. `wss` uses the
platform's trusted TLS certificates and does not bypass certificate checks.
This example has been validated with the loopback simulator; it does not claim
hardware validation.
26 changes: 26 additions & 0 deletions examples/plugins/e64ws.reaplugin/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"id": "e64ws.reaplugin",
"name": "Mahlkoenig E64 WebSocket Sensor",
"author": "Decaid contributors",
"description": "Opt-in read-only E64 telemetry over the local WebSocket protocol.",
"version": "0.1.0",
"apiVersion": 1,
"permissions": ["network.websocket"],
"drivers": [{"id": "e64ws", "type": "sensor"}],
"settings": {
"InstancesJson": {
"type": "string",
"label": "E64 instances",
"description": "JSON array of grinder id, name, scheme, host, port, and optional pollMs values.",
"default": "[]"
},
"TokensJson": {
"type": "string",
"label": "E64 session tokens",
"description": "JSON object mapping each configured grinder id to its WebSocket session token.",
"secure": true,
"default": "{}"
}
},
"api": []
}
Loading