Operations driven by device
Introduction
The typical use case is when the remote device, having been in a long sleep period, requests the pending operation requests stored in OpenGate.
sequenceDiagram
participant OG as OG Connector
participant Dev as Device
rect rgb(240, 246, 255)
Note over OG,Dev: Device polls for pending operation
Dev->>+OG: Retrieve Op. Request (HTTP POST)
OG-->>-Dev: RESPONSE ACK (HTTP RESPONSE) 201 Ok
end
rect rgb(240, 246, 255)
Note over OG,Dev: Platform generated command
Dev->>+OG: COMMAND (HTTP REQUEST -> POST)<br>Command Info (JSON)
OG-->>-Dev: COMMAND ACK (HTTP RESPONSE) 201 Ok
end
rect rgb(240, 246, 255)
Note over OG,Dev: Device generated response
Dev->>+OG: RESPONSE (HTTP REQUEST -> POST)<br>Response Info (JSON)
OG-->>-Dev: RESPONSE ACK (HTTP RESPONSE) 201 Ok
end
Usage examples
Ask for pending operations:
Send an asynchronous operation response:
A valid request returns HTTP 201 with a Location header.