SmartConnect

Devices possessing the SmartConnect trait listen for a specific command to initiate the UltronKey Wi-Fi connection process.

Device ATTRIBUTES

Devices with this trait may report the following attributes as part of the SYNC operation.

AttributesTypeDescription
commandOnlyOnOffBoolean(Default: false) Indicates if the device can only be controlled through commands, and cannot be queried for state information.
formFactorString(Default: button) Indicates the physical form factor of the device. Possible values: module, button, hotspot

Example

{
  "name": "commandOnlyOnOff",
  "value": true
}
{
  "name": "formFactor",
  "value": "button"
}

Device STATES

Entities with this trait may report the following states as part of the QUERY operation.

StatesTypeDescription
smartconnectingNumber1: connecting; 0: otherwise

Response Example of /usr/v5/GetGroupMasters

{
    "result": 0,
    "masters": {
        "UTU400-3BXXXXX": {
            "UpdateTime": "2025-04-14T04:16:31Z",
            "mastermac": "38:FD:FE:XX:XX:XX",
            "ip": "192.168.XX.XX",
            "ssostatus": 0,
            "smartconnecting": 0,
            "uplhwtype": "WWan802.11",
            "wl2.4bssid": "38:FD:FE:XX:XX:XX",
            "wl5bssid": "",
            "uplifmac": "38:FD:FE:XX:XX:XX",
            "uplwlbssid": "7A:45:58:XX:XX:XX",
            "wirelesstype": "",
            "child_idlist": "",
            "uplrssi": 0,
            "uplrate": 0,
            "sso": null,
            "wifiattrs": {
                "wl2.4enbl": 0,
                "wl2.4key": "",
                "wl2.4encrypmode": "",
                "wl2.4encryptype": "",
                "wl2.4name": "",
                "wl2.4ch": 0,
                "wl2.4multissid": null,
                "guestwl2.4index": 0,
                "wl5enbl": 0,
                "wl5key": "",
                "wl5encrypmode": "",
                "wl5encryptype": "",
                "wl5name": "",
                "wl5ch": 0,
                "wl5multissid": null,
                "wl2.4bssid": "",
                "wl5bssid": "",
                "guestwl5index": 0,
                "rssencryptkey": ""
            }
        }
    }
}

Device COMMANDS

Send command: OnOff to the iotDev which contains trait: SmartConnect

OnOff

Start UltronKey

Parameters

ParameterTypeDescription
onBooleanRequired. Whether to turn the device on (true) or off (false).

Examples

Response from /usr/v5/GetGroupDevices, which contains device models.

{
  "result": 0,
  "devices": {
    "UTU301-2KXXXXX": {
      "sn": "UTU301-2KXXXXX",
      "mac": "38FDFEXXXXXX",
      "activated": true,
      "iotPath": "projects/ucc-doraemon/locations/asia-east1/registries/ultron-smart/devices/UTU301-2KXXXXX",
      "brokerId": "clearblade",
      "ver": {"hwVer": "A", "fwVer": "1.10.06", "countryCode": "TW"},
      "models": {
        "Ultron Button": { /* iotDev name */
          "type": "AIRFORES",
          "traits": ["SmartConnect"],
          "disabled": false,
          "attrs": [ {"name": "commandOnlyOnOff", "value": false}, {"name": "formFactor", "value": "button"} ]
        },
        "Ultron Device": {
          "type": "ULTRON",
          "traits": ["UltronCommand", "BluetoothGateway", "ReportState", "ApiResponse", "UltronConfig"],
          "disabled": false,
          "attrs": [
            {"value": 20, "name": "rebootTime"},
            {"name": "fwUpgradeTime", "value": 60},
            {"name": "iotConfigurableIntervals", "value": true},
            {
              "name": "sensorConfigurable",
              "value": { "Ultron Sensor": ["temp", "rh"] }
            }
          ]
        },
        "Ultron Sensor": {
          "type": "ULTRON_SENSOR",
          "traits": ["Sensor"],
          "disabled": false,
          "attrs": [
            {
              "name": "sensorProfile",
              "value": { "temp": {"Min": -40, "Max": 85, "Unit": "ºC"}, "rh": {"Min": 0, "Max": 100, "Unit": "%"} }
            }
          ]
        },
        "SENSOR": {
          "type": "SENSOR",
          "traits": ["TemperatureControl", "HumiditySetting"],
          "disabled": false,
          "attrs": [
            { "value": {"minThresholdCelsius": -40, "maxThresholdCelsius": 85}, "name": "temperatureRange" },
            {"value": "C", "name": "temperatureUnitForUX"}                                                  ,
            {"name": "queryOnlyTemperatureControl", "value": true}                                          ,
            {"name": "queryOnlyHumiditySetting", "value": true}
          ]
        }
      },
      "displayName": "UltronKey",
      "fwChannel": "Stable",
      "createdTime": "2025-03-08T05:14:52.243325Z"
    }
  }
}

Start UltronKey on a specific device:

/usr/v5/SendCommand request example, send to

{
  "sn": "UTU301-2KXXXXX",
  "iotDevs": [
    "Ultron Button"
  ],
  "iotCmds": [
    {
      "command": "OnOff",
      "params": {
        "on": true
      }
    }
  ]
}

Trigger UltronKey for devices within a specific group

Request example of /usr/v5/SendGroupCommand

{
  "groupId": "YOUR_GROUP_ID",
  "iotType": "AIRFORES",
  "iotCmds": [
    {
      "command": "OnOff",
      "params": {
        "on": true
      }
    }
  ]
}