Updated on 2026-01-19 GMT+08:00

Subscribing to LINK Device Notifications

Overview

ROMA Connect provides the device change notification function. When the status of a subscribed device changes, for example, the device goes online, goes offline, or is deleted, ROMA Connect sends a message to the corresponding message integration topic to obtain the latest device status in real time.

Prerequisites

A topic is available for receiving messages, and the topic is in the same application as a device. Otherwise, create a topic first.

Subscribing to Device Notifications

  1. Log in to the ROMA Connect console. In the navigation pane on the left, choose Resource. On the displayed page, click the instance to access its console.
  2. In the navigation pane on the left, choose LINK > Subscription Management.
  3. On the Subscription Management page, select the integration application to which the topic that needs to receive notifications belongs.
  4. Under the notification type to be subscribed to, select a topic to receive notifications and enable the notification function.
    • After a notification function is enabled or disabled, it takes a maximum of 30 seconds to take effect.
    • A notification is triggered when any of the following operations is performed:
      • The device type is changed. For example, a change from a common device to a subdevice.
      • The device name is changed.
      • The device status is changed.
      • The device description is changed.
    • For details about the notification message example, see Example of a Device Notification Packet.

Example of a Device Notification Packet

This section uses a common device as an example to describe sample MQS packets related to subscription management.
  • Message attributes
    {
            "deviceIdentifier":"iottest2", //Device identifier
            "eventTime":"1588843914884", //Message time    
            "gatewayIdentifier":"null", //Gateway identifier
            "deviceId":"D114VKx7a", //Device ID
            "gatewayId":"null", //Gateway ID
            "TAGS":"null" //Message tag
    }
    • For a common device or gateway, set gatewayId and gatewayIdentifier to null.
    • For a subdevice, gatewayId and gatewayIdentifier are deviceId and deviceIdentifier of the gateway respectively.
  • Message content
    1. Adding a device
      {
              'deviceType':'Default', //Device type
              'instanceOid':'40', //Instance OID
              'manufacturerName':'iotcompro1',//Manufacturer name
               'productOid':'1', //Product OID
              'manufacturerId':'iotcompro1', //Manufacturer ID
              'remark':'', //Device description
              'deviceId':'D114VKx7a', //Device ID
               'deviceName':'iottest2', //Device name
              'productName':'iotcompro1', //Product name
              'notifyType':'deviceAdded', //Message type
              'deviceIdentifier':'iottest2', //Device identifier
              'deviceOid':'14', //Device OID
              'createdBy':'admin', //Creator
              'eventTime':'1588843914884', //Message time
              'model':'iotcompro1', //Product model
              'productType':'0', //Product type. 1: gateway product; 0: common product.
              'status':'0', //Device status. 0: enabled; 1: disabled.
              'parentDeviceOid':'null' //Parent device OID
      }
    2. Deleting a device
      {
              'notifyType':'deviceDeleted', //Message type
              'deviceIdentifier':'iottest2', //Device identifier
              'eventTime':'1588843914884', //Message time
              'deviceId':'D114VKx7a', //Device ID
      }
    3. Taking a device online
      {
           'notifyType':'deviceOnline', //Message type: device online
          'deviceIdentifier':'iottest2', //Device identifier
          'eventTime':'1588843914884', //Message time
          'deviceId':'D114VKx7a', //Device ID
      }
    4. Taking a device offline
      {
           'notifyType':'deviceDeleted', //Message type
          'deviceIdentifier':'iottest2', //Device identifier
          'eventTime':'1588843914884', //Message time
          'deviceId':'D114VKx7a', //Device ID
      }
    5. Changing the device type
      {
              'instanceOid':'40', //Instance OID
               'productOid':'1', //Product OID
              'remark':'', //Device description
              'deviceId':'D114VKx7a', //Device ID
               'deviceName':'iottest1', //Device name
              'notifyType':'deviceChange', //Message type
              'deviceIdentifier':'iottest1', //Device identifier
              'deviceOid':'1', //Device OID
              'createdBy':'admin', //Creator
              'eventTime':'1588843914884', //Message time
              'status':'0', //Device status. 0: enabled; 1: disabled.
              'parentDeviceOid':'null' //Parent device OID
      }