Skip to main content
Version: 2.8

Publish IoT Gateway

Use the command publish to publish the targets to your target system.

Settings

There are different possibilities to publish gateways:

  • Directory: publishing directly to a directory, e.g. share for gateway deployment and installation
  • Platform: publishing to the HumanOS IoT Platform.

Publishing

Click following button:

Publish

Select the targets to publish.

Publish

Setup Auto Update

HumanOS supports the auto update feature. The process includes following steps:

  1. publishing the configuration to a shared folder.
  2. Reboot the gateway on the remote host
    • Before reboot, the gateway will check its update folder for new files. If any available, it backups and the replaces the current configuration by the new one.

Configuration of Update Folder

Auto update requires to setup a shared folder on a filer (server or host). It is recommended to use the name of the target as sub folder, to avoid overwriting configurations by other targets, e.g.

Kernel Settings

The Update Manager settings on the target setting page - tab HumanOS Kernelis used to setup the update behavior of the gateway.

Publishing

Use the same folder to publish the configuration:

Additionally, use a powershell script to force the reboot of the windows service on the target system.

Pass arguments to your script, like

ArgumentDescriptionExample
SourceBuild directory. This argument is implicit and built-in.
ServiceNameName of the windows service for rebooting.$(Target.ServiceName)
HostNameName of the remote computer.GATEWAY-HOST1

Example script for auto reboot of a Windows Service:

Param(
[parameter(Mandatory=$false)]
[string]
$HS_SOURCE,
[parameter(Mandatory=$false)]
[string[]]
$HS_SERVICENAME,
[parameter(Mandatory=$false)]
[string[]]
$HS_REMOTEMACHINE)

Write-Output "Source : $HS_SOURCE"
Write-Output "Service : $HS_SERVICENAME"
Write-Output "Host : $HS_REMOTEMACHINE"

$cred = (Get-Credential)

Invoke-Command -ComputerName $HS_REMOTEMACHINE -ScriptBlock { param($servicename)
Write-Output "Restart service '$servicename'..."
Restart-Service -Name $servicename -Force
Write-Output "Service started."
} -Credential $cred -ArgumentList $HS_SERVICENAME

Troubleshooting

  1. Files are not updated. The zip file is not removed after restarting the service.

    • Check if the Path for Updates on the Kernel Setting tab is correctly set.

    • Check if the windows service can access the directory on the filer.

    NOTE

    The gateway service has no access to the update folder on a file server. This is often caused by access rights to this file server.

    One possibility is to change the user running the windows service. Use a user able to access the file server.