Skip to main content

Tasks

The Tasks feature provides different services to commission the hopit Edge Device or perform service tasks in the field.

Configuration

To enable this feature, the Tasks Service must be activated.

Corresponding Edge configuration and Device Twin definition to activate the service:
https://localhost:5050/Settings
Tasks Settings

Overview

All Tasks are performed sequentially. If the Status of a Task is FINISHED or FAILED it will be skipped in subsequent runs.

Corresponding Edge configuration and Device Twin definition to add new Tasks:

To add a new Task at the end of the list, select a Command, optionally set JSON formatted Arguments, click the Plus icon and confirm with a click on the Submit button.

https://localhost:5050/Deployment
DevOps Chain
caution

Be aware, that all Tasks not specified in the Tasks array in the Device Twin gets deleted on the Edge Device on a Device Twin update.

info

All Tasks can also be triggered by Azure, Magenta, ThingsBoard or MQTT targets. See the Targets documentation for details.

Definitions

Reboot

Performs a simple reboot on the Edge Device.

Corresponding Edge configuration and Device Twin definition:

To add a new Task at the end of the list, select a Command, optionally set JSON formatted Arguments, click the Plus icon and confirm with a click on the Submit button.

https://localhost:5050/Deployment
DevOps Chain

Install Real-Time Ethernet Driver

The Beckhoff Real-Time Ethernet Driver enables real-time communication via EtherCAT on a specific network interface.

Arguments
  • PortName (default="Ethernet"): The name of the network interface.
Corresponding Edge configuration and Device Twin definition:

To add a new Task at the end of the list, select a Command, optionally set JSON formatted Arguments, click the Plus icon and confirm with a click on the Submit button.

https://localhost:5050/Deployment
DevOps Chain

Disable USB Ports

Disables all USB ports on the Edge Device.

Corresponding Edge configuration and Device Twin definition:

To add a new Task at the end of the list, select a Command, optionally set JSON formatted Arguments, click the Plus icon and confirm with a click on the Submit button.

https://localhost:5050/Deployment
DevOps Chain

Enable USB Ports

Enables all USB ports on the Edge Device.

Corresponding Edge configuration and Device Twin definition:

To add a new Task at the end of the list, select a Command, optionally set JSON formatted Arguments, click the Plus icon and confirm with a click on the Submit button.

https://localhost:5050/Deployment
DevOps Chain

Discover

The Discover Task tries to read all available metrics from connected Targets. This is supported for Targets from type:

  • ADS
  • Azure
  • OpcUa
  • MQTT
  • Magenta
  • ThingsBoard

To view the discovered metrics, open https://localhost:5050/Targets and click on Namespace at the discovered Target.

Arguments
  • TargetName (optional): The name of the Target to discover. This must be identical with the Name of the Target. If this is not specified, all available Targets are discovered.
info

The Monitoring Targets System and System Monitor can also be discovered. See the Monitoring documentation for details.

Corresponding Edge configuration and Device Twin definition:

To add a new Task at the end of the list, select a Command, optionally set JSON formatted Arguments, click the Plus icon and confirm with a click on the Submit button.

https://localhost:5050/Deployment
DevOps Chain

Start Discovery Task

The StartDiscovery Task features the same functionality as the "Discover" task, but sends found metrics back to the Target the request came from. Therefore, this Task can only be executed from a compatible Target (Azure, Magenta, ThingsBoard or MQTT). See the Target documentation for more details.

Arguments:

  • Targets (optional): The name of the Targets or Service to discover. This must be identical with the Name of the Target. If this is not specified, all available Targets are discovered. Payload must be written as JSON Array:
    {
    "Targets": [
    "System",
    "PLC"
    ]
    }
caution

This Task cannot be used in the ProvisioningChain.

info

The Monitoring Targets System and System Monitor can also be discovered. See the Monitoring documentation for details.

Create User

Creates a new Windows user with trimmed privileges.

Use Case. When displaying a HMI on the Edge Device, a Windows user have to be logged in to display the web interface. Running this with the Administrator account enables people with physical access to the device to run admin tasks. To prevent this, a user with trimmed privileges can be created. To display the HMI, it is recommended to set the AutoLogon argument to "1" and open the HMI with the autostart feature of windows.

Arguments
  • Username (required): The desired Windows username. Must be a non-empty string.
  • Password (required): The login password. Must be a non-empty string.
  • FullName (default=Username): Display Name of the new user. Must be a non-empty string.
  • Description (default=Username): A user description. Must be a non-empty string.
  • AutoLogon (default="0"): Set to "0" to disable the auto-logon feature or "1" to automatically login the user after a restart.

After adding a new user, the user have to login to finish the process. When settings AutoLogon to "1", this can be done by adding a Reboot task after the Create_User task.

For security reasons it is recommended to delete the task after execution to hide the password.

Corresponding Edge configuration and Device Twin definition:

To add a new Task at the end of the list, select a Command, optionally set JSON formatted Arguments, click the Plus icon and confirm with a click on the Submit button.

https://localhost:5050/Deployment
DevOps Chain

Set IP Address

This Task disables the DHCP and sets a fixed IP address on a specified network interface.

INFO: When executing this task, the network interface must be active (a network cable bust be plugged in).

Arguments
  • Ip (required): The desired IP address.
  • PrefixLength (default="24"): Prefix length to set the subnet mask.
  • PortName (default="Ethernet"): The desired network interface name.
  • DefaultGateway (default=""): The desired default gateway IP address.
  • PrimaryDns (default=""): Desired primary DNS IP address.
  • SecondaryDns (default=""): Desired secondary DNS IP address.
Corresponding Edge configuration and Device Twin definition:

To add a new Task at the end of the list, select a Command, optionally set JSON formatted Arguments, click the Plus icon and confirm with a click on the Submit button.

https://localhost:5050/Deployment
DevOps Chain

Add Web-Autostart

The Add_Web_Autostart Task configures a browser to open a webpage in kiosk mode after every user login.

Use Case: This can be used to open a HMI interface on a Panel IPC.

Arguments
  • Name (required): A distinct name of the Task.
  • Url (required): The URL to open.
  • Browser (default="Edge"): The browser used to open the website. Possible values are Edge, Chrome or Firefox.
Corresponding Edge configuration and Device Twin definition:

To add a new Task at the end of the list, select a Command, optionally set JSON formatted Arguments, click the Plus icon and confirm with a click on the Submit button.

https://localhost:5050/Deployment
DevOps Chain

Remove Web-Autostart

Removes the autostart task created with Add_Web_Autostart.

Arguments
  • Name (required): The distinct name of the Task. Must be the same as the name used in the corresponding Add_Web_Autostart Task.
Corresponding Edge configuration and Device Twin definition:

To add a new Task at the end of the list, select a Command, optionally set JSON formatted Arguments, click the Plus icon and confirm with a click on the Submit button.

https://localhost:5050/Deployment
DevOps Chain