Predefined Message Types

List of the predefined Message Types is presented in the following table:

Message Types are used to link rule chains together and to categorize the type of message that is processed in the rule node. (e.g. whether the message is measurement data or attributes or alarm information. )

Message Type

Display Name

Description

Message metadata

Message payload

POST_ATTRIBUTES_REQUEST

Post attributes

Request from device to publish client side attributes (see attributes api for reference)

deviceName - originator device name, deviceType - originator device type

key/value json: { "currentState": "IDLE" }

POST_TELEMETRY_REQUEST

Post telemetry

Request from device to publish telemetry (see telemetry upload api for reference)

deviceName - originator device name, deviceType - originator device type, ts - timestamp (milliseconds)

key/value json: { "temperature": 22.7 }

TO_SERVER_RPC_REQUEST

RPC Request from Device

RPC request from device (see client side rpc for reference)

deviceName - originator device name, deviceType - originator device type, requestId - RPC request Id provided by client

json containing method and params: { "method": "getTime", "params": { "param1": "val1" } }

RPC_CALL_FROM_SERVER_TO_DEVICE

RPC Request to Device

RPC request from server to device (see server side rpc api for reference)

requestUUID - internal request id used by sustem to identify reply target, expirationTime - time when request will be expired, oneway - specifies request type: true - without response, false - with response

json containing method and params: { "method": "getGpioStatus", "params": { "param1": "val1" } }

ACTIVITY_EVENT

Activity Event

Event indicating that device becomes active

deviceName - originator device name, deviceType - originator device type

json containing device activity information: { "active": true, "lastConnectTime": 1526979083267, "lastActivityTime": 1526979083270, "lastDisconnectTime": 1526978493963, "lastInactivityAlarmTime": 1526978512339, "inactivityTimeout": 10000 }

INACTIVITY_EVENT

Inactivity Event

Event indicating that device becomes inactive

deviceName - originator device name, deviceType - originator device type

json containing device activity information, see Activity Event payload

CONNECT_EVENT

Connect Event

Event produced when device is connected

deviceName - originator device name, deviceType - originator device type

json containing device activity information, see Activity Event payload

DISCONNECT_EVENT

Disconnect Event

Event produced when device is disconnected

deviceName - originator device name, deviceType - originator device type

json containing device activity information, see Activity Event payload

ENTITY_CREATED

Entity Created

Event produced when new entity was created in system

userName - name of the user who created the entity, userId - the user Id

json containing created entity details: { "id": { "entityType": "DEVICE", "id": "efc4b9e0-5d0f-11e8-8559-37a7f8cdca74" }, "createdTime": 1526918366334, ... "name": "my-device", "type": "temp-sensor" }

ENTITY_UPDATED

Entity Updated

Event produced when existing entity was updated

userName - name of the user who updated the entity, userId - the user Id

json containing updated entity details, see Entity Created payload

ENTITY_DELETED

Entity Deleted

Event produced when existing entity was deleted

userName - name of the user who deleted the entity, userId - the user Id

json containing deleted entity details, see Entity Created payload

ENTITY_ASSIGNED

Entity Assigned

Event produced when existing entity was assigned to customer

userName - name of the user who performed assignment operation, userId - the user Id, assignedCustomerName - assigned customer name, assignedCustomerId - Id of assigned customer

json containing assigned entity details, see Entity Created payload

ENTITY_UNASSIGNED

Entity Unassigned

Event produced when existing entity was unassigned from customer

userName - name of the user who performed unassignment operation, userId - the user Id, unassignedCustomerName - unassigned customer name, unassignedCustomerId - Id of unassigned customer

json containing unassigned entity details, see Entity Created payload

ADDED_TO_ENTITY_GROUP

Added to Group

Event produced when entity was added to Entity Group.

userName - name of the user who performed assignment operation, userId - the user Id, addedToEntityGroupName - entity group name, addedToEntityGroupId - Id of entity group

empty json payload

REMOVED_FROM_ENTITY_GROUP

Removed from Group

Event produced when entity was removed from Entity Group.

userName - name of the user who performed unassignment operation, userId - the user Id, removedFromEntityGroupName - entity group name, removedFromEntityGroupId - Id of entity group

empty json payload

ATTRIBUTES_UPDATED

Attributes Updated

Event produced when entity attributes update was performed

userName - name of the user who performed attributes update, userId - the user Id, scope - updated attributes scope (can be either SERVER_SCOPE or SHARED_SCOPE)

key/value json with updated attributes: { "softwareVersion": "1.2.3" }

ATTRIBUTES_DELETED

Attributes Deleted

Event produced when some of entity attributes were deleted

userName - name of the user who deleted attributes, userId - the user Id, scope - deleted attributes scope (can be either SERVER_SCOPE or SHARED_SCOPE)

json with attributes field containing list of deleted attributes keys: { "attributes": ["modelNumber", "serial"] }

ALARM

Alarm event

Event produced when an alarm was created, updated or deleted

All fields from original Message Metadata isNewAlarm - true if a new alram was just created isExistingAlarm - true if an alarm is existing already isClearedAlarm - true if an alarm was cleared

json containing created alarm details: { "tenantId": { ... }, "type": "High Temperature Alarm", "originator": { ... }, "severity": "CRITICAL", "status": "CLEARED_UNACK", "startTs": 1526985698000, "endTs": 1526985698000, "ackTs": 0, "clearTs": 1526985712000, "details": { "temperature": 70, "ts": 1526985696000 }, "propagate": true, "id": "33cd8999-5dac-11e8-bbab-ad47060c9431", "createdTime": 1526985698000, "name": "High Temperature Alarm" }

REST_API_REQUEST

REST API Request to Rule Engine

Event produced when user executes REST API call

requestUUID - the unique request id, expirationTime - the expiration time of the request

json with request payload

Last updated