Update User Terminal authored by Jan Janak's avatar Jan Janak
...@@ -299,8 +299,12 @@ The values must be in the ISO 8601 timestamp format and are inclusive. ...@@ -299,8 +299,12 @@ The values must be in the ISO 8601 timestamp format and are inclusive.
To delete events stored at a terminal, e.g., after they have been transferred to the base station, the client can send a HTTP DELETE request to `/api/events`. Without the query string, all events stored at the terminal will be deleted. Use the query string parameters 'from' and 'until' (see above) to only delete events in the specified time range. To delete events stored at a terminal, e.g., after they have been transferred to the base station, the client can send a HTTP DELETE request to `/api/events`. Without the query string, all events stored at the terminal will be deleted. Use the query string parameters 'from' and 'until' (see above) to only delete events in the specified time range.
# Real-Time Notifications # Real-Time Control & Notifications
Apart from the RESTful HTTP interface described elsewhere on this page, each user terminal also provides a WebSocket based API for real-time notifications. Selected subsystems within the user terminal generate such notifications. The API provides a subscribe mechanism that can be used by the client to indicate interest in real-time notifications. Each user terminal provides a WebSocket based API for real-time control and notifications. Selected subsystems within the user terminal expose control points through the API or generate state-change notifications. The WebSocket API is based on [socket.io](https://socket.io/). JavaScript clients can use the [socket.io client library](https://socket.io/docs/client-api/) to connect to the user terminal's WebSocket server. The WebSocket server is available at `ws://<hostname>:<port>/socket.io`, where &lt;hostname&gt; is the hostname of the user terminal and &lt;port&gt; is an ephemeral port number of the terminal's HTTP server that can be discovered via ZeroConf.
The WebSocket API is based on [socket.io](https://socket.io/). JavaScript clients can use the [socket.io client library](https://socket.io/docs/client-api/) to connect to the user terminal's WebSocket server. The WebSocket API is available at `ws://<hostname>:<port>/socket.io`, where &lt;hostname&gt; is the hostname of the user terminal and &lt;port&gt; is an ephemeral port number of the terminal's HTTP server that can be discovered via ZeroConf. ## PTT Button Control
To remotely control the PTT button on the user terminal, emit a 'ptt' event on the socket.io connection. The event value is a boolean that represents the desired state of the button (true for pressed, false for released). The terminal will generate a response once the button has been switched to the desired state. The terminal will automatically release the PTT button if the socket.io connection is terminated.
Note: If the microphone input on the speaker-mic is electrically disconnected while the physical PTT button is released (usually the case), remotely activating the PTT button will not activate the physical microphone.
\ No newline at end of file