Device Operating State
The operating state of a device indicates whether it is currently functioning or not.
The value of operating state can be UP
or DOWN
.
{
"apiVersion": "v2",
"statusCode": 200,
"device": {
"created": 1680078345742,
"modified": 1680082486187,
"id": "28ee2ec6-2ec7-4269-8928-43a5099c6c42",
"name": "test",
"adminState": "UNLOCKED",
"operatingState": "UP",
"serviceName": "device-modbus",
"profileName": "Network-Power-Meter",
"protocolName": "modbus-tcp",
"protocols": {
"modbus-tcp": {
"Address": "192.168.68.112",
"Port": "1502",
"UnitID": "1"
}
},
"properties": null
}
}
Note
If a device's operating state turns to DOWN
, auto events will not be executed, and sending REST APIs to access device resources will also be denied with the HTTP response status code 423 ("Locked").
Since Edge Xpert 2.3, the following Device Services can automatically update a device's operating state:
- device-bacnet-ip
- device-bacnet-mstp
- device-ble
- device-ethernet-ip
- device-gps
- device-modbus
- device-opc-ua
- device-s7
This update is based on the values of the newly added service configuration properties, which are located in the [XRTControl] section:
[XRTControl]
DeviceDownTimeout = 60
AllowedFails = 5
Configuration Property | Description | Default Value |
---|---|---|
DeviceDownTimeout | Time (in seconds) before changing the operating state to `UP` for the device which has been automatically marked `DOWN`. | 60 Set to zero to disable automatic re-enablement of devices. |
AllowedFails | The number of consecutive failed device requests after which a device's operating state is automatically marked `DOWN`. | 5 Set to zero to disable automatic disablement of devices. |
When a device's operating state changes, a Device Changed Notification will be generated. For further information on Device Changed Notification, see Manage Device Changed Notifications.