Requisição de Leitura

Para realizar a leitura dos dados do dispositivo, basta utilizar o comando *getDevice* através do envio de uma String contendo o seguinte JSON serializado:

{
	"command": "getDevice"
}

Resposta

Imediatamente após receber o comando, o produto retornará como resposta uma String com um objeto JSON serializado no seguinte formato (contendo as saídas referentes ao produto):

{
  "command": "getDevice",
  "response": {
    "id": 11462,
    "reset": 0,
    "error": 0,
    "updating": false,
    "firmware": "P858V2",
    "firmware2": "P844V0",
    "timezone": -10800,
    "leds": {
      "led0": {
        "on": false,
        "onAut": false,
        "effect": 255,
        "brightness": 48,
        "speed": 50,
        "type": 2,
        "saturation": 66,
        "color": [
          163,
          255,
          40
        ]
      }
    },
    "heatings": {
      "heat0": {
        "on": false,
        "onAut": true,
        "opMode": 0,
        "type": 1,
        "step": 10,
        "sp": 400,
        "maxSp": 400,
        "minSp": 150,
        "aux": null
      },
      "heat1": {
        "on": true,
        "onAut": true,
        "opMode": 2,
        "type": 1,
        "step": 10,
        "sp": 400,
        "maxSp": 400,
        "minSp": 150,
        "aux": null
      }
    },
    "outputs": {
      "out0": {
        "id": 0,
        "on": false,
        "onAut": true
      },
      "out1": {
        "id": 10,
        "on": false,
        "onAut": true
      },
      "out2": {
        "id": 11,
        "on": false,
        "onAut": true
      },
      "out3": {
        "id": 12,
        "on": false,
        "onAut": true
      },
      "out4": null
    }
  }
}