question

Radu Pascal avatar image
Radu Pascal asked

GetTargetTemperatureRequest equivalent in V3?

I can't figure out how to support querying for targetSetpoint in V3. In V2 there was the GetTargetTemperatureRequest, but what is the equivalent in V3? Any pointers?

Thanks.

alexa smart homehow-to
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Pooja P. avatar image
Pooja P. answered

A ‘ReportState’ Directive will be sent whenever user queries any of the temperatures : targetTemp or current temp reading.

In the ‘StateReport’ response, you should include all your 'retrievable' properties for:

  • Alexa.TemperatureSensor / temperature
  • Alexa.ThermostatController / lowerSetpoint + /upperSetpoint + /thermostatMode

(or whatever setpoints apply to your device)

I think then Alexa voice service will take care of responding back with just the Target Temperature if the user asked for that.

2 comments
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

ok, I looked into V2 and realised the correct form to ask should be "Alexa, what is the device name set to?". Unfortunately I am having trouble with V3 finding the utterance examples. V2 was much clearer in that respect..

0 Likes 0 ·

Yes, they definitely need to provide more example utterances and maybe a clearer flow of directives and responses. It takes some time to go through the big overhaul for V3.

0 Likes 0 ·
nickmadge avatar image
nickmadge answered
1 comment
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

To my understanding, that's the equivalent of GetTemperatureReadingRequest. GetTargetTemperatureRequest should provide the temperature to which the Thermostat has been set, and that's the function I can't find in the new V3 API: how to query for the temperature to which the thermostat is currently set.

0 Likes 0 ·
HCA Dev Team avatar image
HCA Dev Team answered

I'm also having issues with providing the capabilities to show that a devices state can be retrieved...

1 comment
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

likewise - pretty happy that the response is correct. I must be missing something?

{
  "context": {
    "properties": [
      {
        "namespace": "Alexa.TemperatureSensor",
        "name": "temperature",
        "value": {
          "value": 22,
          "scale": "CELSIUS"
        },
        "timeOfSample": "2017-10-07T16:39:44.108Z",
        "uncertaintyInMilliseconds": 1000
      }
    ]
  },
  "event": {
    "header": {
      "namespace": "Alexa",
      "name": "StateReport",
      "payloadVersion": "3",
      "correlationToken": "dFMb0z+PgpgdDmluhJ1LddFvSqZ/jCc8ptlAKulUj90jSqg==",
      "messageId": "1bd5d003-31b9-476f-ad03-71d471922820"
    },
    "endpoint": {
      "scope": {
        "type": "BearerToken",
        "token": "OAUTH-TOKEN-WAS-HERE"
      },
      "endpointId": "184"
    }
  },
  "payload": {}
}
0 Likes 0 ·
nickmadge avatar image
nickmadge answered

Anyone from Amazon help out here? I can't get ReportState working for thermostats - Interestingly, when I try opening the thermostat in the latest v of the Android app, it hangs that device and can't be re-queried

Properties:

{
    "properties": [
        {
            "namespace": "Alexa.TemperatureSensor",
            "name": "temperature",
            "value": {
                "value": 20,
                "scale": "CELSIUS"
            },
            "timeOfSample": "2017-11-04T20:16:52.767Z",
            "uncertaintyInMilliseconds": 1000
        }
    ]
}
1 comment
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Has anyone got querying thermostats to work in V3?

0 Likes 0 ·
Christian avatar image
Christian answered

Also not getting back the set target temperature of my thermostat.

This is the response data for an Alexa Interface / ReportState request:

{
  "event": {
    "header": {
      "messageId": "6163d6b7-6547-4bf7-8512-e783056866a0",
      "correlationToken": "xyz",
      "namespace": "Alexa",
      "name": "StateReport",
      "payloadVersion": "3"
    },
    "payload": {},
    "endpoint": {
      "scope": {
        "type": "BearerToken",
        "token": "xyz"
      },
      "endpointId": "7"
    }
  },
  "context": {
    "properties": [
      {
        "namespace": "Alexa.ThermostatController",
        "name": "targetSetpoint",
        "timeOfSample": "2018-05-15T12:31:16Z",
        "uncertaintyInMilliseconds": 500,
        "value": {
          "value": 8,
          "scale": "CELSIUS"
        }
      }
    ]
  }
}

Looks valid to me, but Alexa states that my device does not support this.

Any ideas?

1 comment
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hi Christian,

Are you still having this issue? Do you have a Temperature Sensor capability on this device?

0 Likes 0 ·