device Data Type

Device is an object representing a device or gateway connected to the Everyware platform. The Device object contains several useful information on the connected object including its connection status and its profile information. Each devices is defined in the context of an Everyware Account whose ID is specified in the Device accountId attribute.

Upon connecting to the Everyware platform, each device will publish a birth certification announcing its characterinstics. The device profile attributes can be divided into few groups.
The device identifiers are attributes which uniquely identify the device. Those include: id, clientId, displayName, serialNumber, IMEI, IMSU, ICCID. The device displayName can be updated by the Account administrator.
The device connection information are attributes related to the device connection. Those include: status, lastEventOn, lastEventType, connectionIp, gpsLatitude, gpsLongitude.
The device version information are attributes related to the device model and version information. Those include: modelId, biosVersion, firmwareVersion, osVersion, jvmVersion, osgiFrameworkVersion, esfVersion, applicationIdentifiers.
The value of the device custom attributes 1-5 are set by the system administrator as additional string attributes that can be associated to the device.
All other device attributes are defined as device extended properties.
When loading or searching a device using the Everyware REST APIs, a fetch parameter can be used to control whether the device extended attributes should be loaded and returned.

Namespace
http://eurotech.com/edc/2.0
Schema
edc.xsd
Properties
name data type type namespace min/max occurs constraints description
accountId long element edc 1/1 required  
id string element edc 0/1    
clientId string element edc 0/1 max size: 255, min size: 0  
status deviceStatus element edc 0/1    
connectionStatus deviceConnectionStatus element edc 0/1    
createdOn dateTime element edc 0/1    
createdBy long element edc 1/1 required  
lastEventOn dateTime element edc 0/1    
lastEventType deviceEventType element edc 0/1    
displayName string element edc 0/1 max size: 255, min size: 0  
serialNumber string element edc 0/1 max size: 255, min size: 0  
imei string element edc 0/1 max size: 24, min size: 0  
imsi string element edc 0/1 max size: 15, min size: 0  
iccid string element edc 0/1 max size: 22, min size: 0  
modelId string element edc 0/1 max size: 255, min size: 0  
connectionIp string element edc 0/1 max size: 255, min size: 0  
biosVersion string element edc 0/1 max size: 255, min size: 0  
firmwareVersion string element edc 0/1 max size: 255, min size: 0  
osVersion string element edc 0/1 max size: 255, min size: 0  
jvmVersion string element edc 0/1 max size: 255, min size: 0  
osgiFrameworkVersion string element edc 0/1 max size: 255, min size: 0  
esfVersion string element edc 0/1 max size: 255, min size: 0  
applicationIdentifiers string element edc 0/1 max size: 1024, min size: 0  
acceptEncoding string element edc 0/1 max size: 255, min size: 0  
gpsLatitude double element edc 0/1    
gpsLongitude double element edc 0/1    
customAttribute1 string element edc 0/1 max size: 255, min size: 0  
customAttribute2 string element edc 0/1 max size: 255, min size: 0  
customAttribute3 string element edc 0/1 max size: 255, min size: 0  
customAttribute4 string element edc 0/1 max size: 255, min size: 0  
customAttribute5 string element edc 0/1 max size: 255, min size: 0  
optlock int element edc 1/1 required The optlock field is used to detect that this entity has not been modified by someone else. When updating an entity, first do a find to get the latest version of the entity and note the value of the optlock. Then in the update operation, set the optlock value to match the value that you found. If someone else has updated the entity between your find and update operations, the update will fail and the db/server will return an error.

See this stackoverflow question for more information on optimistic locking.

uptime long element edc 0/1    
modelName string element edc 0/1    
partNumber string element edc 0/1    
availableProcessors string element edc 0/1    
totalMemory string element edc 0/1    
os string element edc 0/1    
osArch string element edc 0/1    
jvmName string element edc 0/1    
jvmProfile string element edc 0/1    
osgiFramework string element edc 0/1    
connectionInterface string element edc 0/1    
gpsAltitude double element edc 0/1    
deviceUserId long element edc 1/1 required  
accountName string element edc 0/1    
signedCertificateId long element edc 0/1    
mqttConnectionIp string element edc 0/1 max size: 255, min size: 0  
credentialsTight deviceCredentialsTight element edc 0/1    
credentialsAllowChange boolean element edc 1/1 required  
certificateCommonName string element edc 0/1    
brokerClusterId long element edc 0/1    

Example

<device xmlns="http://eurotech.com/edc/2.0">
  <accountId>...</accountId>
  <id>...</id>
  <clientId>...</clientId>
  <status>...</status>
  <connectionStatus>...</connectionStatus>
  <createdOn>...</createdOn>
  <createdBy>...</createdBy>
  <lastEventOn>...</lastEventOn>
  <lastEventType>...</lastEventType>
  <displayName>...</displayName>
  <serialNumber>...</serialNumber>
  <imei>...</imei>
  <imsi>...</imsi>
  <iccid>...</iccid>
  <modelId>...</modelId>
  <connectionIp>...</connectionIp>
  <biosVersion>...</biosVersion>
  <firmwareVersion>...</firmwareVersion>
  <osVersion>...</osVersion>
  <jvmVersion>...</jvmVersion>
  <osgiFrameworkVersion>...</osgiFrameworkVersion>
  <esfVersion>...</esfVersion>
  <applicationIdentifiers>...</applicationIdentifiers>
  <acceptEncoding>...</acceptEncoding>
  <gpsLatitude>...</gpsLatitude>
  <gpsLongitude>...</gpsLongitude>
  <customAttribute1>...</customAttribute1>
  <customAttribute2>...</customAttribute2>
  <customAttribute3>...</customAttribute3>
  <customAttribute4>...</customAttribute4>
  <customAttribute5>...</customAttribute5>
  <optlock>...</optlock>
  <uptime>...</uptime>
  <modelName>...</modelName>
  <partNumber>...</partNumber>
  <availableProcessors>...</availableProcessors>
  <totalMemory>...</totalMemory>
  <os>...</os>
  <osArch>...</osArch>
  <jvmName>...</jvmName>
  <jvmProfile>...</jvmProfile>
  <osgiFramework>...</osgiFramework>
  <connectionInterface>...</connectionInterface>
  <gpsAltitude>...</gpsAltitude>
  <deviceUserId>...</deviceUserId>
  <accountName>...</accountName>
  <signedCertificateId>...</signedCertificateId>
  <mqttConnectionIp>...</mqttConnectionIp>
  <credentialsTight>...</credentialsTight>
  <credentialsAllowChange>...</credentialsAllowChange>
  <certificateCommonName>...</certificateCommonName>
  <brokerClusterId>...</brokerClusterId>
</device>