Agents Overview

What is an Agent?

Connecting a device to the IoTHub needs the installation of an Agent at the IoTHub server edge or a remote edge in the same network. An Agent is a standalone application which is able to control multiple devices by implementing one or more communication protocols, where each of these devices is represented by a thing. Agents communicate with the IoTHub via its gateway, which has a dedicated port number. For the identification of the Agents, each time that you create a new Agent, the IoTHub will automatically generate new unique identifiers (id and token) for it. Then, you can use these identifiers for executing a particular Agent as described in Install IoTHub Agents.open in new window

Custom Agents

If you need a customized agent for your businesses, ELCO Industrie Automation GmbH provides libraries for an easy agent development. Please, contact the ELCO Industrial Automation at www.elco-holding.euopen in new window for more details.

Running an Agent

In order to work with your Agents, check out the following links.

Info

Installing and starting an Agent is a simple task! Please take a look at the guidelines at Install IoTHub Agents.open in new window

Agent States

The Agent state indicates the current status of an Agent. Additional information such as the origin or the beginning of the state is provided by the Reason.

The following table gives an overview of the possible Agent states that can occur and their meaning.

StateDescription
UnassignedThe Agent has no controller assigned.
AssignedA controller is assigned to the Agent.
ConnectedThe Agent is connected to the IoTHub Gateway and communicates with it.
DisconnectedThe Agent is disconnected from the IoTHub Gateway and the communication with it stopped.
InstallingThe Agent is being installed on the system hosting the controller.
DownloadingThe Agent's binary is being downloaded.
DecompressingThe Agent's binary is being decompressed.
InstalledThe Agent was successfully installed.
StartingThe Agent is being started.
StartedThe Agent was successfully started.
StoppingThe Agent is being stopped.
StoppedThe Agent was successfully stopped.
Install FailedThe installation process failed e.g. because of a wrong URL or invalid credentials.
Startup FailedThe Agent's process cannot be started e.g. because the Agent configuration is wrong or system permissions are missing.
Process ExitedThe Agent's process was terminated for unexpected reasons (e.g. connection to the IoTHub Gateway failed).

Info

After applying changes the new Agent state gets displayed by clicking .

Agent Controller

An Agent controller acts as a layer between the IoTHub and an Agent. It allows for an even easier controlling of Agents.

To make use of an Agent controller, the controller first needs to be started. In the UI, click on the menu item button and then Add Controller.

Add Controller
Add Controller
Copy the token seen in the dialog, you will need it to start the agent.

Info

How to setup a controller is explained in the Installing a controlleropen in new window section.

After properly starting the controller, it needs to be assigned to an Agent. After the controller has been assigned, the Agent can be installed via the controller. Manually downlading binaries for the Agent is not required since the controller takes over this task.

Assign Controller
Assign Controller

With the Agent installed, the controller can now be used to start and stop the Agent, as well as to reset it. Resetting an Agent restores its initial state with the controller still assigned. Restarting the Agent now requires installing it again. To detach the controller the Agent needs to be stopped. If the Agent is currently running this can be done by either stopping the Agent or resetting it.

Last Updated: