问题描述
我有一个用于智能家居窗帘的 Alexa 项目,其中包括每个端点上的两个范围控制器、一个亮度控制器和一个切换控制器。
两个范围控制器、切换控制器和亮度控制器都有不同的实例和友好名称。
向 Alexa 发出命令时,无论命令的措辞如何,任何包含百分比的内容都默认为亮度控制器。如果我完全移除亮度控制器并尝试发出旋转命令(范围控制器),根据设备的不同,我会得到非常不一致的结果,表明它不知道如何设置设置。有些设备一开始可以正常工作 90% 左右,然后会突然出现持续故障。其他设备根本无法工作。没有设备一直在工作。
如果我减少到任何一种功能,它几乎可以 100% 地工作。
有没有其他人遇到过这种行为,有什么解决办法吗?
能力代码:
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",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",instance: "Blind.Brightness",properties: {
supported: [
{
name: "brightness"
}
],retrievable: true
}
}
export const BRIGHTnesS_TOGGLE = {
type: "AlexaInterface",interface: "Alexa.ToggleController",instance: "Blind.Light",properties: {
supported: [
{
name: "toggleState"
}
],nonControllable: false
},value: {
text: "Shade Light",value: {
text: "Light",locale: "en-US"
}
}
]
}
}
export const MAIN_CAPABILITY = {
type: "AlexaInterface",instance: "Blind.Lift",properties: {
supported: [{
name: "rangeValue",],value: {
text: "Shade",locale: "en-US"
}
}
],unitOfMeasure: "Alexa.Unit.Percent",semantics: {
actionMappings: [{
"@type": "ActionsToDirective",actions: ["Alexa.Actions.Close"],directive: {
name: "SetRangeValue",payload: {
rangeValue: 0,{
"@type": "ActionsToDirective",actions: ["Alexa.Actions.Open"],payload: {
rangeValue: 100,actions: ["Alexa.Actions.Lower"],directive: {
name: "AdjustRangeValue",payload: {
rangeValueDelta: -10,rangeValueDeltaDefault: false,actions: ["Alexa.Actions.Raise"],payload: {
rangeValueDelta: 10,stateMappings: [{
"@type": "StatesTovalue",states: ["Alexa.States.Closed"],value: 0,{
"@type": "StatesToRange",states: ["Alexa.States.Open"],range: {
minimumValue: 1,}
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)