On-Premise Connector Concepts
Lets dive into the various components and concepts for connectors.
Components of a connector
It's important to understand the architecture for how on-premise connectors work.
Each connector has 2 components:
The software agent
The connector definition
The software agent is the actual connector that runs on-premise within the building. You would write this connector using our SDK in a language like node.js and then deploy it within the building. This agent contains the actual logic for connecting to a device or application and exchanging data with it.
The connector definition is a metadata definition for the connector that you define on Lucy on the cloud. This allows you to map inputs and outputs from the agent to a block within the Lucy model designer. When you create this definition, new Lucy blocks become available that can be used within the model designer to create integrations and workflows.
Architecture
Here is what a standard architecture looks like for a connector.
In this example, the connector is talking to an access control system within the building.
It could also be a database or application or Lorawan Gateway or some building protocol.
You can see from this architecture that the agent only needs to open a single outbound connection to Lucy. This will be an https connection that can be upgraded to a websocket connection.
This allows Lucy and the agent to perform bi-directional real-time communication without the need to open any inbound ports to the agent.
The entire mechanism of performing the handshake with Lucy happens automatically through the SDK. When the SDK is used, you only need to focus on building the integration with the target system.
Connector Instances
Another key concept is that of connector instances.
If you have, say, a connector that speaks to an Access Control System.
You may deploy multiple copies of the connector - one for each building that you are integrating with.
So the same connector agent can be deployed in multiple places.
Each deployment is called an 'instance'.
When you use a connector in an integration, you need to specify which 'instance' you are communicating with.
There is a mechanism for registering new instances of a connector and managing them.
Each connector has a unique id that is used to refer to it in your integrations.
Connector Functions
When you create your connector definition, you can define multiple Functions
for each connector.
Each function is a unit of work that the connector can do.
Each function can have a defined set of inputs and outputs.
Every function you define will get its own block that can be used in the Lucy model designer.
Last updated