Amazon Alexa Smart Skill item configuration issue - doesn't support that

  • openHAB version: 2.5

  • Issue of the topic: I am trying to set up a mqtt-controlled cooker fan to be responsive to Alexa, but am getting a “Fan doesn’t support that” to my requests to turn fan on/off.
    Details of setup follow. Also welcome any suggestions to simplify/improve what I have so far.
    [edited to include code fences]

  • Items configuration related to the issue

Group Fan "Fan" {alexa="Endpoint.Other"}
Number CookerFan_Control "CookerFan Ctrl [%d]" <cooker> (Fan) {alexa="RangeController.rangeValue" [supportedRange="1:3:1", presets="1=@ Value.Minimum:@Value.Low:Lowest,3=@Value.Maximum:@Value.High:Highest",friendlyNames="@Setting.FanSpeed,Speed"], mqtt="<[mymosquitto:home/cookfan/fanstate:state:default], >[mymosquitto:home/cookfan/control:command:0:f0], >[mymosquitto:home/cookfan/control:command:1:f1], >[mymosquitto:home/cookfan/control:command:2:f2], >[mymosquitto:home/cookfan/control:command:3:f3]"}
Switch CookerFan_Power "Cookerfan Power" <cooker> (Fan) {alexa="ToggleController.toggleState" [friendlyNames="@Setting.Fan,Power"], mqtt=">[mymosquitto:home/cookfan/control:command:ON:f1],>[mymosquitto:home/cookfan/control:command:OFF:f0], <[mymosquitto:home/cookfan/fanstate:state:MAP(fanonoff.map)]"}		
Switch CookerFan_lights "Cookerfan Light" <light> {alexa="Switchable", mqtt=">[mymosquitto:home/cookfan/control:command:ON:l1],>[mymosquitto:home/cookfan/control:command:OFF:l0], <[mymosquitto:home/cookfan/lights:state:MAP(onoff.map)]"}	
  • Sitemap configuration related to the issue
Text label="Cooker Fan" icon="kitchen" {
    Setpoint item=CookerFan_Control minValue=0 maxValue=3 step=1  
    Switch item=CookerFan_Power label="Fan"
    Switch item=CookerFan_lights label="Lights" //mappings=[0=OFF, 1=ON]
}

Desired response:

Alexa phrase Desired Action Command
Alexa, turn on the fan Turn the fan on to lowest speed Mqtt: home/cookfan/control, f1
Alexa, increase / decrease the fan speed Increase / decrease fan speed Mqtt: home/cookfan/control, f1/f2/f3
Alexa, turn off the fan Turn the fan off Mqtt: home/cookfan/control, f0
Alexa, turn on the fan light Turn on the fan light Mqtt: home/cookfan/control, l1
Alea turn off the fan light Turn off the fan light Mqtt: home/cookfan/control, l0

You should use code fences so you don’t have to fiddle around with the item definition formatting.

So for the common power control part of a group endpoint, it usually better to use PowerController over ToggleController, unless you want to request “Turn on/off Fan Power”. The reason is that with the latter interface, you need to specify the actual functionality name, while with the former, it is consider the default power control of a group endpoint. Also the @Setting.Fan asset id doesn’t exist.

The below changes should work as you intended to use. I updated the endpoint category to fan and also brought the lights in the group endpoint, since it is part of that device, using a ToggleController interface.

Group Fan "Fan" {alexa="Endpoint.Fan"}

Number CookerFan_Control "CookerFan Ctrl [%d]" (Fan) {alexa="RangeController.rangeValue" [supportedRange="1:3:1", presets="1=@Value.Minimum:@Value.Low:Lowest,3=@Value.Maximum:@Value.High:Highest", friendlyNames="@Setting.FanSpeed,Speed"], mqtt="<[mymosquitto:home/cookfan/fanstate:state:default], >[mymosquitto:home/cookfan/control:command:0:f0], >[mymosquitto:home/cookfan/control:command:1:f1], >[mymosquitto:home/cookfan/control:command:2:f2], >[mymosquitto:home/cookfan/control:command:3:f3]"}

Switch CookerFan_Power "Cookerfan Power" (Fan) {alexa="PowerController.powerState", mqtt=">[mymosquitto:home/cookfan/control:command:ON:f1],>[mymosquitto:home/cookfan/control:command:OFF:f0], <[mymosquitto:home/cookfan/fanstate:state:MAP(fanonoff.map)]"}

Switch CookerFan_lights "Cookerfan Light" (Fan) {alexa="ToggleController.toggleState" [friendlyNames="Light"], mqtt=">[mymosquitto:home/cookfan/control:command:ON:l1],>[mymosquitto:home/cookfan/control:command:OFF:l0], <[mymosquitto:home/cookfan/lights:state:MAP(onoff.map)]"}
1 Like

Thanks Jeremy, that worked a treat.
I also went back to my question to include the proper code fences in my question.
These are the manual controls which are now automated:
FanControlSml

1 Like