I have an Alexa project for smart home shades that include two range controllers, a brightness controller, and a toggle controller on each endpoint.
The two range controllers, toggle controller, and brightness controller all have different instances and friendlyNames.
When issuing commands to Alexa, anything containing a percentage is defaulting to the brightness controller regardless of how the command is phrased. If I fully remove the brightness controller and attempt to issue a rotation command (range controller), depending on the device, I get incredibly inconsistent results stating it doesn't know how to set the setting. Some devices will work around 90% at first and will then suddenly fail consistently. Other devices wont work at all. No device is consistently working.
If I reduce down to any one of the capabilities, it works nearly 100% of the time.
Has anyone else experienced this behavior and is there any solution?
Capability code:
export const ROTATE_CAPABILITY = {
type: "AlexaInterface",
interface: "Alexa.RangeController",
version: "3",
instance: "Blind.Rotate",
properties: {
supported: [{ name: "rangeValue" }],
proactivelyReported: false,
retrievable: true,
},
capabilityResources: {
friendlyNames: [
{
"@type": "text",
value: {
text: "Vane",
locale: "en-US"
}
},
{
"@type": "text",
value: {
text: "Tilt",
locale: "en-US"
}
},
{
"@type": "text",
value: {
text: "Angle",
locale: "en-US"
}
}
]
},
configuration: {
supportedRange: {
minimumValue: 0,
maximumValue: 100,
precision: 1,
},
unitOfMeasure: "Alexa.Unit.Percent"
}
}
export const BRIGHTNESS_CAPABILITY = {
type: "AlexaInterface",
interface: "Alexa.BrightnessController",
version: "3",
instance: "Blind.Brightness",
properties: {
supported: [
{
name: "brightness"
}
],
proactivelyReported: false,
retrievable: true
}
}
export const BRIGHTNESS_TOGGLE = {
type: "AlexaInterface",
interface: "Alexa.ToggleController",
instance: "Blind.Light",
version: "3",
properties: {
supported: [
{
name: "toggleState"
}
],
proactivelyReported: false,
retrievable: true,
nonControllable: false
},
capabilityResources: {
friendlyNames: [
{
"@type": "text",
value: {
text: "Shade Light",
locale: "en-US"
}
},
{
"@type": "text",
value: {
text: "Light",
locale: "en-US"
}
}
]
}
}
export const MAIN_CAPABILITY = {
type: "AlexaInterface",
interface: "Alexa.RangeController",
instance: "Blind.Lift",
version: "3",
properties: {
supported: [{
name: "rangeValue",
},],
proactivelyReported: false,
retrievable: true,
},
capabilityResources: {
friendlyNames: [
{
"@type": "text",
value: {
text: "Shade",
locale: "en-US"
}
}
],
},
configuration: {
supportedRange: {
minimumValue: 0,
maximumValue: 100,
precision: 1,
},
unitOfMeasure: "Alexa.Unit.Percent",
},
semantics: {
actionMappings: [{
"@type": "ActionsToDirective",
actions: ["Alexa.Actions.Close"],
directive: {
name: "SetRangeValue",
payload: {
rangeValue: 0,
},
},
},
{
"@type": "ActionsToDirective",
actions: ["Alexa.Actions.Open"],
directive: {
name: "SetRangeValue",
payload: {
rangeValue: 100,
},
},
},
{
"@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: [{
"@type": "StatesToValue",
states: ["Alexa.States.Closed"],
value: 0,
},
{
"@type": "StatesToRange",
states: ["Alexa.States.Open"],
range: {
minimumValue: 1,
maximumValue: 100,
},
},
],
},
}