ThingWorx Lua Script Resource > Configuring Edge Things
Configuring Edge Things
The EdgeThing group is used to configure an Edge Thing to run in the Lua Script Resource environment. Of all the parameters that can be included in the EdgeThing group of the configuration file, only the file and template parameters are required. All other parameters are optional and can be included anywhere between the curly braces {}.
* 
The entry that defines the Thing.lua Edge Thing must exist in the configuration file. You can define additional Edge things with their own EdgeThing statements.
scripts.EdgeThing = {
file = "Thing.lua",
template = "example",
}
Parameters
The EdgeThing group contains the following parameters:
Parameter
Description
file
Define an Edge Thing. This parameter is required.
template
Specify the script identifying the information that you want to send from the device to your Edge Thing. The template file defines the behavior of the Edge Thing. This parameter is required.
The template file must be placed in the \microserver\etc\custom\templates directory.
scanrate
Specify how frequently to evaluate the properties and possibly push them to the ThingWorx Platform, in milliseconds. The default value is 60000 milliseconds.
taskrate
Specify how frequently to execute the tasks that are defined in the template of the edge Thing, in milliseconds. The default value is 15000 milliseconds.
scanRateResolution
Specify how long the main execution thread for this edge Thing pauses between iterations, in milliseconds. Each iteration checks the scan rate and task rate to determine if any properties are to be evaluated, or any tasks are to be executed. The value must be less than the scan rate or task rate. The default is 500 milliseconds. Refer to Configuring the scanRateResolution.
register
Specify whether or not the Edge Thing registers with the EMS. The default value is true (recommended).
keepAliveRate
Specify how frequently this edge Thing should renew its registration with the EMS, in milliseconds.
If the EMS is restarted, this parameter controls the maximum amount of time before this edge Thing is re-registered.
This value also controls how frequently the EMS performs a keep-alive check on the Lua Script Resource. If the Lua Script Resource is unavailable, the registered Thing is unbound from the ThingWorx Platform and appears to be offline.
The default value is 60000 milliseconds.
requestTimeout
Specify the amount of time to wait for a response to an HTTP request to the EMS before timing out.
maxConcurrentPropertyUpdates
Specify the maximum number of properties that can be included in a single property update call to the ThingWorx Platform. This value can be decreased if the overall size of the batch property pushes is larger than what is supported by the EMS. The default value is 100 properties.
getpropertiesubscriptionsOnReconnect
Specify whether or not the edge Thing re-requests its property subscriptions when it reconnects to the EMS. This value is useful if the Lua Script Resource is running on a different edge device from the EMS. The default value is true.
identifier
Specify the identifier used to register the edge Thing with the EMS and the ThingWorx Platform.
useShapes
Specify whether or not to use Data Shapes for property definitions. The default value is true.
Was this helpful?