Running the agent
In the previous step we registered a new instance and named it (in the example we used 'BuildingA' as the name).
Now lets go back to the agent and run it.
Running the agent
The next step is to configure the Lucy server that this connector needs to talk to.
The Lucy server configuration has 3 parts:
The url of the Lucy instance you are trying to connect to
An api key to let you connect to it
The name of the connector instance that this connector agent represents.
Also - recall, each instance of a connector has its own unique name
All 3 get combined into a single value called an 'Installation Key'.
The format of the key is:
<url>|<apikey>|<instance name>
Example:
The connector is configured using the LucyConnector.fromInstallationKey()
function which you can see in the above code. Its reading the installation key from an environment variable called LUCY_CONNECTOR_KEY
So we just need to set that environment variable and run the program to launch the agent and connect it to our Lucy server on the cloud.
Lets run our program:
Once you run your program you can see some messages in the console indicating that it has connected. The 'Connector initialized' message should appear.
Last updated