Integration Drivers
Since we are providing an API and not an SDK for a specific programming language, one can develop external integrations in any language which is capable running a WebSockets server and handling JSON data.
The downside of an API is that more low-level coding is required. In our case this involves running a WebSocket server, handling the connections from the Remote device, and parsing the JSON payload in the WebSocket text messages. However, once this is done, the required API message interactions are rather simple to handle.
See examples below for integration libraries and existing open source integrations.
- How to write an integration driver
- WebSockets handling
- Driver mDNS advertisement
- Driver registration
- Driver setup
- Install integration driver on the device
WebSocket Integration API
The Unfolded Circle WebSocket Integration-API allows writing device integration drivers for the Unfolded Circle Remotes.
The API specification is defined with AsyncAPI in YAML format. The WebSocket communication is using text messages with JSON payload.
- Integration AsyncAPI viewer
- Integration AsyncAPI YAML definition
- View with AsyncAPI Studio online tool.
The link will directly load the yaml definition file from GitHub and display it together with the HTML documentation in the browser.
Examples
Node.js
Integrations using the Node.js API wrapper:
Python
Integrations using the Python API wrapper:
Rust
- API models in Rust
- Home Assistant integration written in Rust