sinricpro / sample_messages

Sinric Pro example JSON messages
https://sinric.pro
8 stars 6 forks source link

setRangeValue (FAN): sinricpro-web sending string instead integer value #19

Closed sivar2311 closed 4 years ago

sivar2311 commented 4 years ago

sinricpro-web sends rangeValue as a String, not as integer value:

{
  "header": {
    "payloadVersion": 2,
    "signatureVersion": 1
  },
  "payload": {
    "action": "setRangeValue",
    "clientId": "sinricpro-web",
    "createdAt": 1582220426,
    "deviceAttributes": [],
    "deviceId": "xxxxxxxxxxxxxxxxxxx",
    "replyToken": "e8883be6-e3c4-4039-baff-b17fa9f25850",
    "type": "request",
    "value": {
      "rangeValue": "1"
    }
  },
  "signature": {
    "HMAC": "QePZSTJ0gqjRSopy0IciP9WH6BWfR+Iqi0+PRavKLnU="
  }
}

Alexa (voice / app) is sending correct integer value:

{
  "header": {
    "payloadVersion": 2,
    "signatureVersion": 1
  },
  "payload": {
    "action": "setRangeValue",
    "clientId": "alexa-skill",
    "createdAt": 1582220381,  
    "deviceAttributes": [],   
    "deviceId": "xxxxxxxxxxxxxxxxxxxxxxx",
    "replyToken": "fe5bcec9-2b2b-4051-9ded-11b162cd25fa",
    "type": "request",
    "value": {
      "rangeValue": 2
    }
  },
  "signature": {
    "HMAC": "M2WD1Vh+jQqPlv2fGY4RusNfu5kM/26pEZOhGXRwvL0="
  }
}