3rd Party Lua Control Drivers
Cognio lets you control and integrate third-party devices using drivers written in Lua. A driver runs on the Cognio device and can open network connections, send and receive messages, react to control changes, and drive controls in your design.
The Lua API is extended with a set of libraries specific to Cognio. Use these to read and write controls, talk to the device, open sockets, run timers, and work with JSON.
Building and Sharing a Driver
You build a driver as an Unspecified Managed Device in Cognio DesignOps: you design its Control Panel, and attach a Lua script to it. See Control Panel Scripting for how to make a Control Panel Group scriptable.
When the driver is ready, export the Managed Device from its properties so you can import it into other Sites:
Lua API Extensions
- Overview — Introduction to the Cognio Lua API extensions.
- Controls — Read and write control values.
- Named Control — Access controls by their remote names.
- Device — Interact with the hosting Cognio device.
- System — System-level helpers.
- HTTP Client — Make HTTP requests.
- TCP Socket — Open and use TCP connections.
- UDP Socket — Open and use UDP connections.
- SSH — Communicate over SSH.
- JSON — Encode and decode JSON.
- Timer — Schedule and manage timers.