I followed a guide in the community to make my garage doors respond to OPEN/CLOSE commands and I SWEAR it was working, until I told my wife to use it. Now Alexa says the device doesn’t support that.
Have you tried to trigger the garage door manually in the alexa app? So inside the monbile app and not with an voice command?
My experience with alexa is that the wording is sometimes difficult. For almost all my devices I had to find another name wich was easier to recognize by Alexa and differs from any other item.
You most probably also tried to restart OH to solve the problem ?
I sometimes have the problem that alexa does not recognize e.g. a switch that is defined in a rule this seems to happen when I needed to modify something in the same file. It works via app but not via voice. After a restart of OH it is working again.
i have this configuration and it works with alexa for open/close garage. but in my case i have the state as String, not sure whether it will work with a switch
I just noticed that your item definition has semantic extensions using UP/DOWN commands and OPEN/CLOSED states while none of these are supported by the Switch item type. I am confused how that item is responding to your Alexa app requests.
You should take a look at the door metadata label and how it translates.
Also, since you seem to be using a proxy item, I would recommend using the ModeController interface as there is special garage door integration using the display category GARAGE_DOOR, which includes having a security pin code to open the door.
Coincidence or what but this happened to me this morning. I was in the garage, climbing into car with girlfriend and I preparing to leave. I over-confidently and cockily shouted over to Alexa ‘Open the garage door’ . Me in 'Smart Arse ’ mode and got the curt reply… ‘The device doesn’t support that’. Total deflation. So, I feel your pain. Maybe I should have added ‘Pleases and Thankyous’ to Alexa.
I have yet to investigate my issue but I have a useful bit of code that helps with this sort of thing and I will post it later if interested. It adds into the openHAB logs what Alexa thinks she heard and the resultant openHAB action or non action. Of course there could be some privacy concerns with that
Inconsistent use of ‘THE’ item’ or ‘Item’ in utterances and or inconsistent use of plurals eg blind, stair vs blinds, stairs are often the cause of equally inconsistent Alexa behaviour.
Fixed my issue. Last voice command wasn’t working properly. Restart fixed that but then I discovered I needed to better handle a null for one of the items.
My full ‘garage door code’ identifies which Alexa heard a command, checks if the command is for the garage door and if it is a door command the Alexa receiving the door command replies back with what its going to do or even not do if I am being stupid eg trying to close an already closed door. Garage door position is tracked using a combination of sensors and logic.
Here is the bit code that checks the voice commands and logs them. Very handy for debugging a recalcitrant Alexa. Includes some code notes to self.
rule "Alexa voice commands for garage door"
//Requires Alexa routine to avoid having to say 'set garage door to' for mode commands
//Requires garage door item to have mode controller function or Alexa will say she can't do that. Could be dummy item but in my case mode controller works
//eg implict variable if receivedCommand=='OPEN' the etc >> when using modecontroller >> Item GarageDoor_Command received command
when
Member of gAlexaVoiceCommand changed from NULL
or Member of gAlexaVoiceCommand changed from "alexa" //First command is usually wake up word followed by the actual command
or Member of gAlexaVoiceCommand changed from "computer"
or Member of gAlexaVoiceCommand changed from "echo"
then
//Extract garage door command and Echo used
val command = transform("REGEX", ".*\\b(open garage door|close garage door|stop garage door)\\b.*", triggeringItem.state.toString)
val AlexaName = triggeringItem.name.split("_LastCommand").get(0)
//Log all commands
logInfo ("Alexa", "Rule trigger >>>> " + triggeringItem.state.toString + " from " + AlexaName)
//Check if received command matches a door command
if (command === null) { //Command variable is null if phrase isn't exactly matched
logInfo ("Alexa", "Not a garage door command")
return; //Exit from rule
}
else {
logInfo ("Alexa", "Received voice command << " + command + " >> from " + AlexaName)
}
>>>> The code then adjusts volume of triggering Alexa if needed, sends TTS reply back to announce the action then executes door command(s) for my particular door
Here is what I see in the logs if garage command is OK but I am stupid:
[INFO ] [eclipse.smarthome.model.script.Alexa] - Rule trigger >>>> close garage door from EchoDot5
[INFO ] [eclipse.smarthome.model.script.Alexa] - Received voice command << close garage door >> from EchoDot5
[INFO ] [eclipse.smarthome.model.script.Alexa] - TTS volume set to 60. Was 0
[INFO ] [e.smarthome.model.script.Garage door] - Alexa command: Already Closed
Voice alert
DynamicAlexaTTSItem.sendCommand('Garage door is already closed')
and if the command is not recognised as door command
[INFO ] [eclipse.smarthome.model.script.Alexa] - Rule trigger >>>> set a five minute tea timer from EchoDot5
[INFO ] [eclipse.smarthome.model.script.Alexa] - Not a garage door command