# Namespace hcap.iot

hcap.iot

- Defined in: hcap-1.24.6.5901.js

Namespace Summary
Constructor Attributes | Constructor Name and Description
--- | ---
| hcap.iot

## Method Summary

## Namespace Detail

hcap.iot

## Method Detail

- <static> hcap.iot.getBindingIdList(param)
  Gets the binding ID list.

      hcap.iot.getBindingIdList({
           "onSuccess": function(s) {
               console.log("getBindingIdList onSuccess : bindingIdList = " + JSON.stringify(s.bindingIdList));
           },
           "onFailure" : function(f) {
               console.log("getBindingIdList onFailure : errorMessage = " + f.errorMessage);
           }
      });

  Parameters:
  {Object} param
    - {Function} param.onSuccess [Optional] - success callback function.

            param.onSuccess = function (s) {
                // {Array} s.bindingIdList - binding ID list when returnValue is true.
            }

    - {Function} param.onFailure [Optional] - failure callback function.

            param.onFailure = function (param) {
                // {String} param.errorMessage - in case of failure, this message provides the details.
            }

  Since:
    1.22.2
  See:
    {Event} iot_binding_ready
    {Event} iot_thing_discovered
    {Event} iot_bridge_status_changed
    {Event} iot_thing_registered
    {Event} iot_thing_rejected
    {Event} iot_component_reported
    {Event} iot_thing_unregistered
    {Event} iot_thing_meta_data_changed
    {Event} iot_set_component_result_received
    {Event} iot_framework_status_changed
    {Event} iot_factory_reset_result_received
    hcap.iot.requestSetBridgeStatus()
    hcap.iot.getBridgeStatus()
    hcap.iot.requestRegisterThing()
    hcap.iot.requestRejectThing()
    hcap.iot.getThingList()
    hcap.iot.requestSetComponent()
    hcap.iot.requestUnregisterThing()
    hcap.iot.setThingNickname()
    hcap.iot.requestSynchronizeThing()
    hcap.iot.getFrameworkStatus()
    hcap.iot.requestFactoryReset()
    hcap.iot.getVersions()
- <static> hcap.iot.getBridgeStatus(param)
  Gets the bridge status.

      hcap.iot.getBridgeStatus({
           "bridgeUid": "Zigbee:ZHA",
           "onSuccess": function(s) {
               console.log("getBridgeStatus onSuccess : status = " + s.status);
           },
           "onFailure" : function(f) {
               console.log("getBridgeStatus onFailure : errorMessage = " + f.errorMessage);
           }
      });

  Parameters:
  {Object} param
    - {String} param.bridgeUid [Required] - bridge UID.
    - {Function} param.onSuccess [Optional] - success callback function.

            param.onSuccess = function (param) {
                // {String} param.status - "scan" for scan status, "normal" for normal (non-scan) status.
            }

    - {Function} param.onFailure [Optional] - failure callback function.

            param.onFailure = function (param) {
                // {String} param.errorMessage - in case of failure, this message provides the details.
            }

  Since:
    1.22.2
  See:
    {Event} iot_binding_ready
    {Event} iot_thing_discovered
    {Event} iot_bridge_status_changed
    {Event} iot_thing_registered
    {Event} iot_thing_rejected
    {Event} iot_component_reported
    {Event} iot_thing_unregistered
    {Event} iot_thing_meta_data_changed
    {Event} iot_set_component_result_received
    {Event} iot_framework_status_changed
    {Event} iot_factory_reset_result_received
    hcap.iot.requestSetBridgeStatus()
    hcap.iot.requestRegisterThing()
    hcap.iot.requestRejectThing()
    hcap.iot.getThingList()
    hcap.iot.getBindingIdList()
    hcap.iot.requestSetComponent()
    hcap.iot.requestUnregisterThing()
    hcap.iot.setThingNickname()
    hcap.iot.requestSynchronizeThing()
    hcap.iot.getFrameworkStatus()
    hcap.iot.requestFactoryReset()
    hcap.iot.getVersions()
- <static> hcap.iot.getFrameworkStatus(param)
  Gets the IoT framework status.

      hcap.iot.getFrameworkStatus({
           "onSuccess": function(s) {
               console.log("getFrameworkStatus onSuccess : status = " + s.status);
           },
           "onFailure" : function(f) {
               console.log("getFrameworkStatus onFailure : errorMessage = " + f.errorMessage);
           }
      });

  Parameters:
  {Object} param
    - {Function} param.onSuccess [Optional] - success callback function.

            param.onSuccess = function (param) {
                // {String} param.status - "off" : framework is off, "initializing" : framework is initializing, "ready" : framework is ready.
            }

    - {Function} param.onFailure [Optional] - failure callback function.

            param.onFailure = function (param) {
                // {String} param.errorMessage - in case of failure, this message provides the details.
            }

  Since:
    1.22.2
  See:
    {Event} iot_binding_ready
    {Event} iot_thing_discovered
    {Event} iot_bridge_status_changed
    {Event} iot_thing_registered
    {Event} iot_thing_rejected
    {Event} iot_component_reported
    {Event} iot_thing_unregistered
    {Event} iot_thing_meta_data_changed
    {Event} iot_set_component_result_received
    {Event} iot_framework_status_changed
    {Event} iot_factory_reset_result_received
    hcap.iot.requestSetBridgeStatus()
    hcap.iot.getBridgeStatus()
    hcap.iot.requestRegisterThing()
    hcap.iot.requestRejectThing()
    hcap.iot.getThingList()
    hcap.iot.getBindingIdList()
    hcap.iot.requestSetComponent()
    hcap.iot.requestUnregisterThing()
    hcap.iot.setThingNickname()
    hcap.iot.requestSynchronizeThing()
    hcap.iot.requestFactoryReset()
    hcap.iot.getVersions()
- <static> hcap.iot.getThingList(param)
  Gets cached information for registered things.
  Each parameter works as a filter for result things list.
  If several parameters are given, only the highest priority parameter will be effective. Priorities among parameters are (HIGH) > thingUidList > thingTypeId > (LOW).
  If no parameter is given, it's same as no filter, therefore all things list will be returned.

      hcap.iot.getThingList({
           "onSuccess": function(s) {
               console.log("getThingList onSuccess : valueType of the first component of the first thing = " + s.thingList[0].thingComponentList[0].componentValue.valueType);
           },
           "onFailure" : function(f) {
               console.log("getThingList onFailure : errorMessage = " + f.errorMessage);
           }
      });

  Parameters:
  {Object} param
    - {Array} param.thingUidList [Required] - thing UID list as an array of a string thingUids like [|thingUid-0|, |thingUid-1|, ..., |thingUid-n|] while |thingUid-n| is a string of thing UID.
    - {String} param.thingType [Optional] - |ThingType|, thing type. ThingBridge for bridges. ThingDiscovered for discovered things.
    - {Function} param.onSuccess [Optional] - success callback function.

            param.onSuccess = function (s) {
                // {Array} s.thingList - information for things as a type of json array as of [|thing-0|, |thing-1|, ..., |thing-n|]
                //   |thing-n| - json object for a thing
                //     {
                //       "bindingId": |string|, // binding ID
                //       "thingUid" : |string|, //thing UID
                //       "thingId" : |string|, // thing ID
                //       "thingType" : |ThingType|, //thing type
                //       "thingMetaData" : |ThingMetaData|, // thing meta data
                //       "thingComponentList": [|thingComponentList-0|, |thingComponentList-1|, ..., |thingComponentList-n|], // component list of the thing
                //     }
                //   |thingComponentList-n| - json object for a component
                //     {
                //       "parentThingUid": |string|, // parent thing UID of the component
                //       "componentType": |string|, // component type
                //       "componentId": |string|, // component ID
                //       "componentValueType": |string|, // component value type
                //       "componentValue": |ComponentValue|, // component value
                //       "componentGettable": |boolean|, // true:component is gettable, false:component is not gettable
                //       "componentSettable": |boolean|, // true:component is settable, false:component is not settable
                //     }
                //   |ComponentValue| - json object for a component value
                //     {
                //       "valueType": |string|, // "Unknown", "String", "Boolean", "Variables", "Double", "Float", "Int8", "Int16", "Int32", "Int64", "UInt8", "UInt16", "UInt32", "UInt64"
                //       "value": |string|, // value
                //       "additionalValue": |string|, //custom additional value as a string
                //     }
            }

    - {Function} param.onFailure [Optional] - failure callback function.

            param.onFailure = function (param) {
                // {String} param.errorMessage - in case of failure, this message provides the details.
            }

  Since:
    1.22.2
  See:
    {Event} iot_binding_ready
    {Event} iot_thing_discovered
    {Event} iot_bridge_status_changed
    {Event} iot_thing_registered
    {Event} iot_thing_rejected
    {Event} iot_component_reported
    {Event} iot_thing_unregistered
    {Event} iot_thing_meta_data_changed
    {Event} iot_set_component_result_received
    {Event} iot_framework_status_changed
    {Event} iot_factory_reset_result_received
    hcap.iot.requestSetBridgeStatus()
    hcap.iot.getBridgeStatus()
    hcap.iot.requestRegisterThing()
    hcap.iot.requestRejectThing()
    hcap.iot.getBindingIdList()
    hcap.iot.requestSetComponent()
    hcap.iot.requestUnregisterThing()
    hcap.iot.setThingNickname()
    hcap.iot.requestSynchronizeThing()
    hcap.iot.getFrameworkStatus()
    hcap.iot.requestFactoryReset()
    hcap.iot.getVersions()
- <static> hcap.iot.getVersions(param)
  Get versions of hcapmw, iotservice, core and bindings.

      hcap.iot.getVersions({
           "onSuccess": function(s) {
               console.log("getVersions onSuccess : versions = " +  JSON.stringify(s.versions));
           },
           "onFailure" : function(f) {
               console.log("getVersions onFailure : errorMessage = " + f.errorMessage);
           }
      });

  Parameters:
  {Object} param
    - {Function} param.onSuccess [Optional] - success callback function.

            param.onSuccess = function (s) {
                // {Object} s.versions - versions of JSON foramt when returnValue is true. If no binding is ready, "bindings" doesn't exist.
            }

    - {Function} param.onFailure [Optional] - failure callback function.

            param.onFailure = function (param) {
                // {String} param.errorMessage - in case of failure, this message provides the details.
            }

  Since:
    1.22.2
  See:
    {Event} iot_binding_ready
    {Event} iot_thing_discovered
    {Event} iot_bridge_status_changed
    {Event} iot_thing_registered
    {Event} iot_thing_rejected
    {Event} iot_component_reported
    {Event} iot_thing_unregistered
    {Event} iot_thing_meta_data_changed
    {Event} iot_set_component_result_received
    {Event} iot_framework_status_changed
    {Event} iot_factory_reset_result_received
    hcap.iot.requestSetBridgeStatus()
    hcap.iot.getBridgeStatus()
    hcap.iot.requestRegisterThing()
    hcap.iot.requestRejectThing()
    hcap.iot.getThingList()
    hcap.iot.getBindingIdList()
    hcap.iot.requestSetComponent()
    hcap.iot.requestUnregisterThing()
    hcap.iot.setThingNickname()
    hcap.iot.requestSynchronizeThing()
    hcap.iot.getFrameworkStatus()
    hcap.iot.requestFactoryReset()
- <static> hcap.iot.requestFactoryReset(param)
  Request to do factory reset for core DB and binding DBs.
  If factory reset is successful, {Event} iot_factory_reset_result_received will be delivered.

      hcap.iot.requestFactoryReset({
           "onSuccess": function(s) {
               console.log("requestFactoryReset onSuccess");
           },
           "onFailure" : function(f) {
               console.log("requestFactoryReset onFailure : errorMessage = " + f.errorMessage);
           }
      });

  Parameters:
  {Object} param
    - {Array} param.bindingIdList [Required] - binding ID list to do factory reset.
      If bindingIdList is undefined, core and all bindings will remove DB file.
      If bindingIdList is defined, the bindings in bindingIdList will remove DB files, and core will remove bindings in binidngIdList and their information in core DB but core will not remove core DB file.
      For core or bindings to delete its DB file, its factory reset result will be included in factoryResetResultList of IoT event {Event} iot_factory_reset_result_received
    - {Function} param.onSuccess [Optional] - success callback function.

            param.onSuccess = function (param) {
                // No parameter.
            }

    - {Function} param.onFailure [Optional] - failure callback function.

            param.onFailure = function (param) {
                // {String} param.errorMessage - in case of failure, this message provides the details.
            }

  Since:
    1.22.2
  See:
    {Event} iot_binding_ready
    {Event} iot_thing_discovered
    {Event} iot_bridge_status_changed
    {Event} iot_thing_registered
    {Event} iot_thing_rejected
    {Event} iot_component_reported
    {Event} iot_thing_unregistered
    {Event} iot_thing_meta_data_changed
    {Event} iot_set_component_result_received
    {Event} iot_framework_status_changed
    {Event} iot_factory_reset_result_received
    hcap.iot.requestSetBridgeStatus()
    hcap.iot.getBridgeStatus()
    hcap.iot.requestRegisterThing()
    hcap.iot.requestRejectThing()
    hcap.iot.getThingList()
    hcap.iot.getBindingIdList()
    hcap.iot.requestSetComponent()
    hcap.iot.requestUnregisterThing()
    hcap.iot.setThingNickname()
    hcap.iot.requestSynchronizeThing()
    hcap.iot.getVersions()
- <static> hcap.iot.requestRegisterThing(param)
  Requests registration for a discovered thing.
  If the discovered thing is registered, {Event} iot_thing_registered will be delivered and {Event} iot_component_reported may also be delivered subsequently.

      document.addEventListener(
           "iot_thing_discovered",
           function (param) {
               // {String} param.bindingId - binding ID.
               // {String} param.thingUid : thing UID.
               console.log(
                   "Event 'iot_thing_discovered' is received.\n" +
                   "bindingId = " + param.bindingId + "\n" +
                   "thingUid = " + param.thingUid
               );
               hcap.iot.requestRegisterThing({
                   "thingUid": param.thingUid,
                   "onSuccess": function() {
                       console.log("requestRegisterThing onSuccess");
                   },
                   "onFailure": function(f) {
                       console.log("requestRegisterThing onFailure : errorMessage = " + f.errorMessage);
                   }
               });
           },
           false
      );

  Parameters:
  {Object} param
    - {String} param.thingUid [Required] - UID of the discovered thing to register.
    - {Function} param.onSuccess [Optional] - success callback function.

            param.onSuccess = function () {
                // No Parameter.
            }

    - {Function} param.onFailure [Optional] - failure callback function.

            param.onFailure = function (param) {
                // {String} param.errorMessage - in case of failure, this message provides the details.
            }

  Since:
    1.22.2
  See:
    {Event} iot_binding_ready
    {Event} iot_thing_discovered
    {Event} iot_bridge_status_changed
    {Event} iot_thing_registered
    {Event} iot_thing_rejected
    {Event} iot_component_reported
    {Event} iot_thing_unregistered
    {Event} iot_thing_meta_data_changed
    {Event} iot_set_component_result_received
    {Event} iot_framework_status_changed
    {Event} iot_factory_reset_result_received
    hcap.iot.requestSetBridgeStatus()
    hcap.iot.getBridgeStatus()
    hcap.iot.requestRejectThing()
    hcap.iot.getThingList()
    hcap.iot.getBindingIdList()
    hcap.iot.requestSetComponent()
    hcap.iot.requestUnregisterThing()
    hcap.iot.setThingNickname()
    hcap.iot.requestSynchronizeThing()
    hcap.iot.getFrameworkStatus()
    hcap.iot.requestFactoryReset()
    hcap.iot.getVersions()
- <static> hcap.iot.requestRejectThing(param)
  Requests a reject to register a discovered thing.
  If the discovered thing is rejected to register, {Event} iot_thing_rejected will be delivered.

      hcap.iot.requestRejectThing({
          "thingUid": "Zigbee:01EC789805006F0D00",
          "onSuccess": function() {
              console.log("requestRejectThing onSuccess");
          },
          "onFailure": function(f) {
              console.log("requestRejectThing onFailure : errorMessage = " + f.errorMessage);
          }
      });

  Parameters:
  {Object} param
    - {String} param.thingUid [Required] - UID of the discovered thing to reject.
    - {Function} param.onSuccess [Optional] - success callback function.

            param.onSuccess = function () {
                // No Parameter.
            }

    - {Function} param.onFailure [Optional] - failure callback function.

            param.onFailure = function (param) {
                // {String} param.errorMessage - in case of failure, this message provides the details.
            }

  Since:
    1.22.2
  See:
    {Event} iot_binding_ready
    {Event} iot_thing_discovered
    {Event} iot_bridge_status_changed
    {Event} iot_thing_registered
    {Event} iot_thing_rejected
    {Event} iot_component_reported
    {Event} iot_thing_unregistered
    {Event} iot_thing_meta_data_changed
    {Event} iot_set_component_result_received
    {Event} iot_framework_status_changed
    {Event} iot_factory_reset_result_received
    hcap.iot.requestSetBridgeStatus()
    hcap.iot.getBridgeStatus()
    hcap.iot.requestRegisterThing()
    hcap.iot.getThingList()
    hcap.iot.getBindingIdList()
    hcap.iot.requestSetComponent()
    hcap.iot.requestUnregisterThing()
    hcap.iot.setThingNickname()
    hcap.iot.requestSynchronizeThing()
    hcap.iot.getFrameworkStatus()
    hcap.iot.requestFactoryReset()
    hcap.iot.getVersions()
- <static> hcap.iot.requestSetBridgeStatus(param)
  Requests to set the bridge status.
  If the bridge status is changed, {Event} iot_bridge_status_changed will be delivered.
  In "scan" mode, a bridge can terminate the "scan" mode and change to "normal" mode by the timeout (the timeout is different binding by binding).

      hcap.iot.getThingList({
           "thingType": "ThingBridge",
           "onSuccess": function(s) {
               console.log("getThingList onSuccess");
               hcap.iot.requestSetBridgeStatus({
                   "bridgeUid": s.thingList[0].thingUid,
                   "status": "scan",
                   "onSuccess": function() {
                       console.log("requestSetBridgeStatus onSuccess");
                   },
                   "onFailure": function(sf) {
                       console.log("requestSetBridgeStatus onFailure : errorMessage = " + sf.errorMessage);
                   }
               });
           },
           "onFailure" : function(f) {
               console.log("getThingList onFailure : errorMessage = " + f.errorMessage);
           }
      });

  Parameters:
  {Object} param
    - {String} param.bridgeUid [Required] - bridge UID.
    - {String} param.status [Required] - "scan" for scan status, "normal" for normal (non-scan) status.
    - {Function} param.onSuccess [Optional] - success callback function. Request for the same status returns onSuccess and it has no effect.

            param.onSuccess = function () {
                // No Parameter.
            }

    - {Function} param.onFailure [Optional] - failure callback function.

            param.onFailure = function (param) {
                // {String} param.errorMessage - in case of failure, this message provides the details.
            }

  Since:
    1.22.2
  See:
    {Event} iot_binding_ready
    {Event} iot_thing_discovered
    {Event} iot_bridge_status_changed
    {Event} iot_thing_registered
    {Event} iot_thing_rejected
    {Event} iot_component_reported
    {Event} iot_thing_unregistered
    {Event} iot_thing_meta_data_changed
    {Event} iot_set_component_result_received
    {Event} iot_factory_reset_result_received
    hcap.iot.getBridgeStatus()
    hcap.iot.requestRegisterThing()
    hcap.iot.requestRejectThing()
    hcap.iot.getThingList()
    hcap.iot.getBindingIdList()
    hcap.iot.requestSetComponent()
    hcap.iot.requestUnregisterThing()
    hcap.iot.setThingNickname()
    hcap.iot.requestSynchronizeThing()
    hcap.iot.getFrameworkStatus()
    hcap.iot.requestFactoryReset()
    hcap.iot.getVersions()
- <static> hcap.iot.requestSetComponent(param)
  Requests to set the component value.
  If this call is succeeded or failed, {Event} iot_set_component_result_received will be delivered.
  If the component value is changed, {Event} iot_component_reported will be delivered.

      hcap.iot.requestSetComponent({
           "thingUid": "Zigbee:01EC789805006F0D00",
           "componentId": "Dimming",
           "componentValue": {
               "additionalVlaue":"",
               "valueType": "Double",
               "value": "60"
           },
           "callId": "7",
           "onSuccess": function() {
               console.log("requestSetComponent onSuccess");
           },
           "onFailure" : function(f) {
               console.log("requestSetComponent onFailure : errorMessage = " + f.errorMessage);
           }
      });

  Parameters:
  {Object} param
    - {String} param.thingUid [Required] - thing UID.
    - {String} param.componentId [Required] - component ID.
    - {Object} param.componentValue [Required] - |ComponentValue|. component value to set.

                // {Object} |ComponentValue| - json object for a variable
                //     {
                //       "valueType": |string|, // "Unknown", "String", "Boolean", "Variables", "Double", "Float", "Int8", "Int16", "Int32", "Int64", "UInt8", "UInt16", "UInt32", "UInt64"
                //       "value": |string|, // value
                //       "additionalValue": |string|, //custom additional value as a string
                //     }

    - {String} param.callId [Required] - callId which will be delivered for the result identification of this call via {Event} iot_set_component_result_received.
    - {Function} param.onSuccess [Optional] - success callback function.

            param.onSuccess = function () {
                // No Parameter.
            }

    - {Function} param.onFailure [Optional] - failure callback function.

            param.onFailure = function (param) {
                // {String} param.errorMessage - in case of failure, this message provides the details.
            }

  Since:
    1.22.2
  See:
    {Event} iot_binding_ready
    {Event} iot_thing_discovered
    {Event} iot_bridge_status_changed
    {Event} iot_thing_registered
    {Event} iot_thing_rejected
    {Event} iot_component_reported
    {Event} iot_thing_unregistered
    {Event} iot_thing_meta_data_changed
    {Event} iot_set_component_result_received
    {Event} iot_framework_status_changed
    {Event} iot_factory_reset_result_received
    hcap.iot.requestSetBridgeStatus()
    hcap.iot.getBridgeStatus()
    hcap.iot.requestRegisterThing()
    hcap.iot.requestRejectThing()
    hcap.iot.getThingList()
    hcap.iot.getBindingIdList()
    hcap.iot.requestUnregisterThing()
    hcap.iot.setThingNickname()
    hcap.iot.requestSynchronizeThing()
    hcap.iot.getFrameworkStatus()
    hcap.iot.requestFactoryReset()
    hcap.iot.getVersions()
- <static> hcap.iot.requestSynchronizeThing(param)
  Requests to synchronize components values of an IoT thing between components values in TV's cache and them in the thing.
  This request is a trigger to update components between TV and the thing.
  Therefore if the thing is not reached by the reason like thing's sleep, it will be failed to synchronize components.
  If the request for a component update is reached to the thing, {Event} iot_component_reported will be delivered.

      hcap.iot.requestSynchronizeThing({
           "thingUid": "Zigbee:01EC789805006F0D00",
           "onSuccess": function() {
               console.log("requestSynchronizeThing onSuccess");
           },
           "onFailure" : function(f) {
               console.log("requestSynchronizeThing onFailure : errorMessage = " + f.errorMessage);
           }
      });

  Parameters:
  {Object} param
    - {String} param.thingUid [Required] - thing UID to synchronize.
    - {String} param.componentId [Optional] - component ID to synchronize. If componentId is not defined, all components of the thing will be requested to synchronize.
    - {Function} param.onSuccess [Optional] - success callback function.

            param.onSuccess = function () {
                // No Parameter.
            }

    - {Function} param.onFailure [Optional] - failure callback function.

            param.onFailure = function (param) {
                // {String} param.errorMessage - in case of failure, this message provides the details.
            }

  Since:
    1.22.2
  See:
    {Event} iot_binding_ready
    {Event} iot_thing_discovered
    {Event} iot_bridge_status_changed
    {Event} iot_thing_registered
    {Event} iot_thing_rejected
    {Event} iot_component_reported
    {Event} iot_thing_unregistered
    {Event} iot_thing_meta_data_changed
    {Event} iot_set_component_result_received
    {Event} iot_framework_status_changed
    {Event} iot_factory_reset_result_received
    hcap.iot.requestSetBridgeStatus()
    hcap.iot.getBridgeStatus()
    hcap.iot.requestRegisterThing()
    hcap.iot.requestRejectThing()
    hcap.iot.getThingList()
    hcap.iot.getBindingIdList()
    hcap.iot.requestSetComponent()
    hcap.iot.requestUnregisterThing()
    hcap.iot.setThingNickname()
    hcap.iot.getFrameworkStatus()
    hcap.iot.requestFactoryReset()
    hcap.iot.getVersions()
- <static> hcap.iot.requestUnregisterThing(param)
  Requests to unregister a thing.
  If a thing is unregistered, {Event} iot_thing_unregistered will be delivered.

      hcap.iot.requestUnregisterThing({
           "thingUid": "Zigbee:01EC789805006F0D00",
           "onSuccess": function() {
               console.log("requestUnregisterThing onSuccess");
           },
           "onFailure" : function(f) {
               console.log("requestUnregisterThing onFailure : errorMessage = " + f.errorMessage);
           }
      });

  Parameters:
  {Object} param
    - {String} param.thingUid [Required] - thing UID to unregister.
    - {Function} param.onSuccess [Optional] - success callback function.

            param.onSuccess = function () {
                // No Parameter.
            }

    - {Function} param.onFailure [Optional] - failure callback function.

            param.onFailure = function (param) {
                // {String} param.errorMessage - in case of failure, this message provides the details.
            }

  Since:
    1.22.2
  See:
    {Event} iot_binding_ready
    {Event} iot_thing_discovered
    {Event} iot_bridge_status_changed
    {Event} iot_thing_registered
    {Event} iot_thing_rejected
    {Event} iot_component_reported
    {Event} iot_thing_unregistered
    {Event} iot_thing_meta_data_changed
    {Event} iot_set_component_result_received
    {Event} iot_framework_status_changed
    {Event} iot_factory_reset_result_received
    hcap.iot.requestSetBridgeStatus()
    hcap.iot.getBridgeStatus()
    hcap.iot.requestRegisterThing()
    hcap.iot.requestRejectThing()
    hcap.iot.getThingList()
    hcap.iot.getBindingIdList()
    hcap.iot.requestSetComponent()
    hcap.iot.setThingNickname()
    hcap.iot.requestSynchronizeThing()
    hcap.iot.getFrameworkStatus()
    hcap.iot.requestFactoryReset()
    hcap.iot.getVersions()
- <static> hcap.iot.setThingNickname(param)
  Set the nickname of a thing.
  The change of the nickname of a thing causes {Event} iot_thing_meta_data_changed.

      hcap.iot.setThingNickname({
           "thingUid": "Zigbee:01EC789805006F0D00",
           "nickname": "NewNickname",
           "onSuccess": function() {
               console.log("setThingNickname onSuccess");
           },
           "onFailure" : function(f) {
               console.log("setThingNickname onFailure : errorMessage = " + f.errorMessage);
           }
      });

  Parameters:
  {Object} param
    - {String} param.thingUid [Required] - thing UID to remove.
    - {String} param.nickname [Required] - nickname.
    - {Function} param.onSuccess [Optional] - success callback function.

            param.onSuccess = function () {
                // No Parameter.
            }

    - {Function} param.onFailure [Optional] - failure callback function.

            param.onFailure = function (param) {
                // {String} param.errorMessage - in case of failure, this message provides the details.
            }

  Since:
    1.22.2
  See:
    {Event} iot_binding_ready
    {Event} iot_thing_discovered
    {Event} iot_bridge_status_changed
    {Event} iot_thing_registered
    {Event} iot_thing_rejected
    {Event} iot_component_reported
    {Event} iot_thing_unregistered
    {Event} iot_thing_meta_data_changed
    {Event} iot_set_component_result_received
    {Event} iot_framework_status_changed
    {Event} iot_factory_reset_result_received
    hcap.iot.requestSetBridgeStatus()
    hcap.iot.getBridgeStatus()
    hcap.iot.requestRegisterThing()
    hcap.iot.requestRejectThing()
    hcap.iot.getThingList()
    hcap.iot.getBindingIdList()
    hcap.iot.requestSetComponent()
    hcap.iot.requestUnregisterThing()
    hcap.iot.requestSynchronizeThing()
    hcap.iot.getFrameworkStatus()
    hcap.iot.requestFactoryReset()
    hcap.iot.getVersions()