Skip to main content
Version: 1.3.1

The Agent

thin-edge.io agent is a set of services that implement the device management operations on a device. Examples of such device management functionality include:

  • software management, checking installed packages and updating these packages
  • configuration management, checking and updating configuration files
  • firmware management, updating the firmware of the device
  • device restart
  • remote access to a console on the device from the cloud
  • log file management, retrieving excerpts from log files
note

In the current version of thin-edge.io, the agent features are not implemented by a single executable, but by a set of executables:

  • tedge-agent
  • c8y-firmware-plugin
  • c8y-remote-access-plugin

The short-term plan is to re-organize these plugins to move the Cumulocity aspects into the Cumulocity mapper and to group the management operations into a single executable.

thin-edge.io agent acts as a device connector:

  • listening to operation requests published on the MQTT bus
  • delegating the actual operations to the operating system or other components
  • reporting progress of the requests

Operation MQTT topics​

Operation requests are published by the requesters on operation specific topics. The topic scheme for commands can be visualized using the diagram below.

Where the command segments are describe as follows:

SegmentDescription
<identifier>The identifier (e.g. device/service) associated with the command.
<cmd_type>Command type. Each command can define its own payload schema to allow commands to have parameters related to the command's function.
<cmd_id>Unique command id which is unique for the command instance. e.g. 123456, d511a86cab95be81 etc.

Command examples​

The following table details some example command types which are supported by thin-edge.io.

Command TypeDescriptionExample Topic
software_listGet the list of installed softwarete/<identifier>/cmd/software_list/<cmd_id>
software_updateInstall/remove softwarete/<identifier>/cmd/software_update/<cmd_id>
config_snapshotGet configurationte/<identifier>/cmd/config_snapshot/<cmd_id>
config_updateSet/update configurationte/<identifier>/cmd/config_update/<cmd_id>
restartRestart devicete/<identifier>/cmd/restart/<cmd_id>
log_uploadUpload log file/ste/<identifier>/cmd/log_upload/<cmd_id>

The command would be interpreted differently based on the target entity. For example, the restart could mean either a device restart or a service restart based on the target entity.