Skip to main content
Version: 8.1

system.device.getDeviceHostname

This function is used in Python Scripting.

Description​

Returns the hostname of the device.

Client Permission Restrictions​

This scripting function has no Client Permission restrictions.

Syntax​

system.device.getDeviceHostname()

Parameters​

TypeParameterDescription
StringdeviceNameThe name of the device in Ignition.

Returns​

The hostname of the device. The value will display null if the device doesn't have a hostname.

Scope​

Gateway, Vision Client, Perspective Session

Code Example​

Code Snippet
# The following example displays the device hostname
# for the device as entered in Ignition.

print system.device.getDeviceHostname(deviceName)

Keywords​

system device getDeviceHostname, device.getDeviceHostname