ThingWorx WebSocket-based Edge MicroServer (WS EMS) and Lua Script Resource (LSR) > Additional Configuration of WS EMS > Configuring Automatic Binding for WS EMS
  
Configuring Automatic Binding for WS EMS
The auto_bind group is used to define specific local things that are always expected to be bound through this WS EMS, or to define a WS EMS as a gateway. For more information about configuring WS EMS as a gateway, refer to Auto-bound Gateways.
The auto_bind property is an array, allowing you to statically define more than one device or machine thing.
* 
The code sample below is provided for example purposes only.
"auto_bind": [{
"name" : "EdgeThing001",
"host" : "localhost",
"port" : 8001,
"path" : "/",
"timeout" : 30000,
"protocol" : "http",
"user" : "username",
"password" : "some_encrypted_password",
"gateway" : false
}],
The following table lists and describes the properties for automatic binding:
Property
Description
name
REQUIRED. This property specifies the thing name of the entity as it exists on the configured ThingWorx platform instance. If an identifier is configured for the thing on the platform instance, you must specify that identifier here. For more information, see the section, “Identifiers”, below.
host
This property specifies the name of the host machine for the thing. The default value is localhost, but this likely means IPV6, and not 127.0.0.1.
port
This property specifies the port number used by the thing/device for communications. The default value is 8001.
path
This property specifies the path to prepend to the path received in the request from the ThingWorx platform instance.
timeout
This property specifies the maximum amount of time to wait for a response from the target, in milliseconds. The default value is 30000 milliseconds (30 seconds).
protocol
This property specifies whether the protocol to use for communications is HTTP or HTTPS. The default value is http.
user
This property specifies the name of the user account to use for authentication when connecting. In general, do not use the colon (:) character in user names.
password
This property specifies the password for the user account specified for the user property.
If you specify a user name and password, it is recommended that you encrypt the password. For details, see Encrypting Application Keys, Passwords, and Passphrases.
gateway
This property specifies whether this automatically bound thing is a gateway or non-gateway thing. By default, this property is set to false. To understand the differences between these two settings, refer to Auto-bound Gateways.
Identifiers
Identifiers provide a way to specify an alternate name for a given thing. An identifier can be set for a thing on the General Information tab of the thing in ThingWorx Composer. If a thing has an identifier set, the ThingWorx platform must bind the thing using the identifier. A typical use case for an identifier is the serial number for a device, as opposed to an intuitive name.
You can use an identifier when dynamically registering a thing or when configuring the auto_bind group. To use an identifier, prepend an asterisk (*) to the identifier and specify it as the value for the "name" property, as follows:
{
"name" : "*SN0012",
"host" : "localhost",
"port" : 9000,
"path" : "/"
}