Skip to main content
Version: 7.9

system.device.setDeviceHostname

This function is used in Python Scripting.

Description

Changes the hostname of a device. Used for all ethernet based drivers.

Client Permission Restrictions

Permission Type: Device Management

Client access to this scripting function is blocked to users that do not meet the role/zone requirements for the above permission type. This function is unaffected when run in the Gateway scope.

Syntax

system.device.setDeviceHostname(deviceName, hostname)

Parameters

TypeParameterDescription
StringdeviceNameThe name of the device in Ignition.
StringhostnameThe new IP address or hostname.

Returns

Nothing

Scope

All

Code Examples

Example 1
# Set Hostname:

system.device.setDeviceHostname("CLX", "10.10.1.20")