Updating Device Properties


IAP/REST 

You can use /iap/devs/updateProperties to update the device properties for a device.


PUT     /iap/devs/updateProperties                                                              
Payload for Update Device Properties
{
  "id": "17q2d9v.4",
  "name": "test2",
  "latitude": -13.9234,
  "longitude": -59.0625,
  "category": "EDGE",
  "scId": "17q2d9v",
  "capabilities": {
    "replacement": {},
    "commissioning": {
      "commissionMethod": "MANUAL"
    }
  },
  "protocol": "modbus",
  "scState": "provisioned",
  "scName": "SmartServer IoT3",
  "uid": "01:1",
  "typeId": 1586,
  "firmwareVersion": "HHG 42 Series Digital Power Met",
  "installationDate": "2019-04-03",
  "geozoneId": 44,
  "customerId": 43,
  "gpsEnabled": false,
  "gpsLatitude": null,
  "gpsLongitude": null,
  "gpsDilution": null,
  "geozoneName": "World",
  "ownerMAC": "00-D0-71-06-5E-63",
  "discoveryMethod": "manual",
  "DID": "17q2d9v.4",
  "olcProfiles": [
    {}
  ],
  "createdOnGlp": true,
  "metadata": {
    "stateClass": "device on-background provisioned health-normal",
    "sc": {
      "id": "17q2d9v",
      "name": "SmartServer IoT3",
      "latitude": 18.5332,
      "longitude": 73.8626,
      "category": "SC",
      "status": {
        "state": "provisioned",
        "health": "normal",
        "connection": "connected",
        "connectionStatusSince": "2019-04-03T09:54:28.991+03:00[Europe/Kirov]",
        "action": null,
        "pingTime": "2019-04-03T09:04:29"
      },
      "capabilities": {
        "replacement": {}
      },
      "firmwareVersion": "2.40.504",
      "geozoneId": 44,
      "customerId": 43,
      "datapoints": {
        "ScRtsmTiming": {
          "datapointValueType": "SC_RTSM_TIMING",
          "name": "ScRtsmTiming"
        },
        "about": {
          "datapointValueType": "SC_ABOUT",
          "datapointValue": {
            "product": "SmartServer IoT",
            "model": "SmartServer IoT Professional Edition",
            "version": "2.40.504"
          },
          "name": "about"
        },
        "location": {
          "datapointValueType": "LOCATION",
          "datapointValue": {
            "desc": "",
            "lat": 18.5332,
            "lng": 73.8626,
            "elevation": null
          },
          "name": "location"
        },
        "ScScheduleAndClockUpdate": {
          "datapointValueType": "SC_SCHEDULE_CLOCK_UPDATE",
          "datapointValue": {
            "sendsched": null,
            "ncup": null
          },
          "name": "ScScheduleAndClockUpdate"
        },
        "ScMessaging": {
          "datapointValueType": "SC_MESSAGING",
          "name": "ScMessaging"
        }
      },
      "rtsm": "2019-04-03T10:04:04.011+03:00[Europe/Kirov]",
      "geozoneName": "World",
      "MACaddress": "00-D0-71-06-5E-63",
      "timezone": "Europe/Kirov",
      "SID": "17q2d9v",
      "metadata": {
        "stateClass": "device on-background provisioned health-normal"
      }
    }
  }
}


Response for Update Device Properties
{
  "name": "test2",
  "category": "EDGE",
  "id": "17q2d9v.4",
  "geozoneId": 44,
  "geozoneName": "World",
  "customerId": 43,
  "latitude": -13.9234,
  "longitude": -59.0625,
  "capabilities": {
    "replacement": {},
    "commissioning": {
      "commissionMethod": "MANUAL"
    }
  },
  "firmwareVersion": "HHG 42 Series Digital Power Met",
  "status": {
    "state": "provisioned",
    "health": "normal",
    "connection": "connected",
    "connectionStatusSince": "2019-04-03T11:56:33+03:00[Europe/Kirov]",
    "action": null,
    "product": "PM42RTU",
    "wasProvisioned": true
  },
  "scName": "SmartServer IoT3",
  "scId": "17q2d9v",
  "scState": "provisioned",
  "uid": "01:1",
  "discoveryMethod": "manual",
  "protocol": "modbus",
  "typeId": 1586,
  "createdOnGlp": true,
  "deviceTypeName": "HHG 42 Series Digital Power Meter RTU",
  "gpsLatitude": null,
  "gpsLongitude": null,
  "gpsDilution": null,
  "gpsEnabled": false,
  "installationDate": "2019-04-03",
  "ownerMAC": "00-D0-71-06-5E-63",
  "DID": "17q2d9v.4"
}