question

ubisys avatar image
ubisys asked

Friendly name doesent seems to work for Range controller

I am developing Alexa skill to support Blind controller. I want to use two range controllers in the skill, one to control Lift (hight) and another one to control the Tilt (angle) of the blind.

Here is the discovery response sent to Alexa.

{
  "endpoints": [
    {
      "endpointId": "d7:e1@WindowCoveringControl",
      "friendlyName": "Blind",
      "description": "J1-R (5602)",
      "manufacturerName": "ubisys",
      "displayCategories": [
        "INTERIOR_BLIND"
      ],
      "capabilities": [
        {
          "type": "AlexaInterface",
          "interface": "Alexa.RangeController",
          "version": "3",
          "instance": "Tilt",
          "properties": {
            "supported": [
              {
                "name": "rangeValue"
              }
            ],
            "proactivelyReported": false,
            "retrievable": false
          },
          "capabilityResources": {
            "friendlyNames": [
              {
                "@type": "text",
                "value": {
                  "text": "Tilt",
                  "locale": "en-US"
                }
              },
              {
                "@type": "asset",
                "value": {
                  "assetId": "Alexa.Setting.Preset"
                }
              }
            ]
          },
          "configuration": {
            "supportedRange": {
              "minimumValue": 0,
              "maximumValue": 100,
              "precision": 1
            },
            "presets": [],
            "unitOfMeasure": "Alexa.Unit.Percent"
          }
        },
        {
          "type": "AlexaInterface",
          "interface": "Alexa.RangeController",
          "version": "3",
          "instance": "Lift",
          "properties": {
            "supported": [
              {
                "name": "rangeValue"
              }
            ],
            "proactivelyReported": false,
            "retrievable": false
          },
          "capabilityResources": {
            "friendlyNames": [
              {
                "@type": "asset",
                "value": {
                  "assetId": "Alexa.Setting.Opening"
                }
              },
              {
                "@type": "text",
                "value": {
                  "text": "Lift",
                  "locale": "en-US"
                }
              }
            ]
          },
          "configuration": {
            "supportedRange": {
              "minimumValue": 0,
              "maximumValue": 100,
              "precision": 1
            },
            "presets": [],
            "unitOfMeasure": "Alexa.Unit.Percent"
          },
          "semantics": {
            "actionMappings": [
              {
                "@type": "ActionsToDirective",
                "actions": [
                  "Alexa.Actions.Close"
                ],
                "directive": {
                  "name": "SetRangeValue",
                  "payload": {
                    "rangeValue": 100
                  }
                }
              },
              {
                "@type": "ActionsToDirective",
                "actions": [
                  "Alexa.Actions.Open"
                ],
                "directive": {
                  "name": "SetRangeValue",
                  "payload": {
                    "rangeValue": 1
                  }
                }
              },
              {
                "@type": "ActionsToDirective",
                "actions": [
                  "Alexa.Actions.Lower"
                ],
                "directive": {
                  "name": "AdjustRangeValue",
                  "payload": {
                    "rangeValueDelta": 10,
                    "rangeValueDeltaDefault": false
                  }
                }
              },
              {
                "@type": "ActionsToDirective",
                "actions": [
                  "Alexa.Actions.Raise"
                ],
                "directive": {
                  "name": "AdjustRangeValue",
                  "payload": {
                    "rangeValueDelta": -10,
                    "rangeValueDeltaDefault": false
                  }
                }
              }
            ],
            "stateMappings": []
          }
        }
      ]
    }
  ]
}


As you can see the capability has a friendly name as "Tilt" and the second one has "Lift"
Whereas the Alexa voice control only accepts "Lift" and I can set the lift value,

but it does not accept the "Tilt" keyword and says "Blind doesn't support that. "

alexa voice servicealexaalexa smart home
capture.png (16.8 KiB)
capture1.png (8.4 KiB)
10 |5000

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

1 Answer

Jason@Amazon avatar image
Jason@Amazon answered

Tilt isn't supported by default so that's expected behavior - check each controller to see the utterances that are supported.

10 |5000

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