So, I took the plunge, and add the HA CLOUD, and the Alexa Skill. I have it working with all the lights. The one issue that I have is with Dr.Zz’s Garage setup, I’m not crazy about saying, “Turn On Garage Door”, I would rather say “Open Garage Door”.
Can someone explain, how I would go about changing the code, from “Turn ON” to “Open”??
Alexa reserves those words (open/close) so they can’t be used in a skill (at least that’s my understanding).
But you can create a script, expose it to alexa, then create a routine on the Alexa mobile app that will then use those words to operate the garage door.
Here are my scripts:
close_gdn:
alias: Close the North Garage Door
sequence:
- condition: state
entity_id: binary_sensor.garage_door_north_position_sensor
state: 'on'
- service: switch.turn_on
entity_id: switch.garage_door_north_operator_switch
open_gdn:
alias: Open the North Garage Door
sequence:
- condition: state
entity_id: binary_sensor.garage_door_north_position_sensor
state: 'off'
- service: switch.turn_on
entity_id: switch.garage_door_north_operator_switch
Basically it checks that the garage door is open (or closed) as the initial condition then toggles the operator switch for the door. If you don’t do that check then the garage door will close if you tell it to open if it was already open.
Then you go to the mobile app and create the routine that calls that script when you say the designated words that you choose.
The commands Alexa “natively” understands are linked to smart home functions that are implemented in Alexa - an example being the Philips Hue integration.
As you currently have no actuators in Hue, there’s no need for an “Alexa, open/close” command.
In the past, controlling your HA stuff via Alexa was done setting up an emulated Hue bridge, so you are limited using the “Hue command set”.
An alternative would be developing and setting up your own Alexa skill where you could use arbitrary key words.
This comes with the disadvantage that you always have to say something like “Alexa, ask <MY_SKILL_NAME> to open the garage door”.
I’m completely unfamiliar with HA Cloud, but if I remember its release information correctly, they said its use would not require the added “ask <MY_SKILL_NAME>” part in an Alexa command.
I setup two routines, and they work, most of the time. Once in a while, (if I speak to fast), Alexa will reply, “Shed Door doesn’t support that”, but If I say it again, and pronounce the words separately, it works, Thanks.
Just a Note: With Dr.Zz’s Automation, for opening a Garage Door, he setup the Sonoff Basic relay to turn ON, then 1 second later turn OFF. So basicaly “OPENING” and “CLOSING” the door, do the same thing. Which is like simulating a momentary push of a button. So if I were to say “Alexa, Open Shed Door” twice(with a little in between), the door would open and then close. The same is true with “Close Shed Door”.
I still setup Both routines in the Alexa app, just so it sounds right…
I’ve been using the alexa skill on my Vera for a while. Door locks and garage doors are specifically uncontrollable, and for a good reason.
If I could say “Alexa, unlock the back door” and it did, then what’s stopping someone from calling when you’re not home and saying the same thing on the answering machine and having the door unlock?
I don’t know about all answering machines but mine puts the call on speaker and my echo dot can hear it.
But I still have a land line.
@R_V You got a good point there. But setting up an “Alexa Routine” does work, just not 100%.
But, I have a fix for the Phone call, connect Alexa to a Sonoff outlet, and when Nobody is home, it turns off. And, you could turn it back on with HA, if you forgot your keys.
Yeah, that’s why I put a check for the current position of the door to prevent operation if the door is already opened or closed. It’s in the script example I gave above.
If the door is closed and I say “Alexa, close the door” then the action is prevented from running and inadvertently opening the door by the condition.
- condition: state
entity_id: binary_sensor.garage_door_north_position_sensor
state: 'on'
the script checks that the door is in the open position (the door sensor is ‘on’) before it issues the command to operate the door switch which would then close the door.
If the door is already closed (position is ‘off’) then the command isn’t issued to operate the door switch.