MotorRotation

The configuration sets up the rotation of a device.

Required Attribute

motorReversible

{
  "name": "motorReversible",
  "value": true
}

Example Device Model

{
  "CURTAIN1": {
    "type": "CURTAIN",
    "traits": ["OpenClose", "CustomModes"],
    "disabled": false,
    "attrs": [
      {"name": "queryOnlyOpenClose", "value": false},
      {
        "name": "availableCustomModes",
        "value": [{ "name": "action", "settings": ["0", "1"], "ordered": true }]
      },
      {"name": "openDirection", "value": ["LEFT"] },
      {"name": "motorReversible", "value": true}
    ]
  },
  "CURTAIN2": {
    "type": "CURTAIN",
    "traits": ["OpenClose", "CustomModes"],
    "disabled": false,
    "attrs": [
      {"name": "queryOnlyOpenClose", "value": false},
      {
        "name": "availableCustomModes",
        "value": [{ "name": "action", "settings": ["0", "1"], "ordered": true }]
      },
      {"name": "openDirection", "value": ["LEFT"] },
      {"name": "motorReversible", "value": true}
    ]
  },
  "Ultron Device": {
    "type": "ULTRON",
    "traits": ["UltronCommand", "BluetoothGateway", "ReportState"],
    "disabled": false,
    "attrs": [
      {"name": "rebootTime", "value": 20},
      {"name": "fwUpgradeTime", "value": 60}
    ]
  }
}

Config Item Attributes

Field NameTypeNote
reversedBooleanReverse the rotation of a device.

Example

Config

[
  {
    "config": "MotorRotation",
    "iotName": "CURTAIN1",
    "items": {
      "reversed": true
    }
  },
  {
    "config": "MotorRotation",
    "iotName": "CURTAIN2",
    "items": {
      "reversed": false
    }
  }
]

API Example: /usr/v5/SetDeviceConfigs

{
  "sn": "UT2801-3BXXXXX",
  "configs": [
    {
      "config": "MotorRotation",
      "iotName": "CURTAIN1",
      "items": {
        "reversed": true
      }
    },
    {
      "config": "MotorRotation",
      "iotName": "CURTAIN2",
      "items": {
        "reversed": false
      }
    }
  ]
}