Open/close garage door with Alexa work around?

Currently Alexa does not allow to open/close garage door for security reasons (for example stick head in open window and yell “Alexa open the garage door”).

But if I wanted to create a virtual switch with a code name could that work using reactor to trigger the garage door?

How do you create a virtual switch compatible with Alexa?

use the ‘switchboard’ plugin and set a scene or reactor sensor to have the garage open/close if the switch us turned on/off

2 Likes

Haha. Just found the switchboard threads. Rigpapa has a solution for everything!

1 Like

ok so in the middle of programming Reactor, I got stuck with circular reference between Switch on/off and garage door open/close because of this logic:

If Garage Door = Open, then Switch = On
If Garage Door = Closed, then Switch = Off

If Switch turned from Off to On, then Open Garage Door
If Switch turned from On to Off, then Close Garage Door

Any elegant solutions to get around this?

Ah yes I’ve run into this problem before and never was able to correct it. Maybe @rigpapa can help!

Unstated is that there’s a door sensor in the mix here that provides the actual status, correct? You’re then using the switch both to mimic the door state and control the door.

Group “Switch State Control” - NUL

  • Group “Door open” – AND – sustained 30 seconds
    • Door sensor says door is open
    • Switch status is OFF
  • Group “Door closed” – AND – sustained 30 seconds
    • Door sensor says door is closed
    • Switch status is ON

Activity “Door Open is True”: Set switch to ON
Activity “Door Closed is True”: Set switch to OFF

So basically, if the sensor and the switch disagree for 30 seconds, the switch gets set to whatever the sensor thinks the door state is. The delay may seem odd, but remember that the closure of the door isn’t instantaneous–it takes time to go from one state to another, and then for whatever sensing to relay home the new state of the door.

Then the switch actions:

Group “Door Control” – NUL

  • Group “Switch On” – AND
    • Switch status is ON
  • Group “Switch Off” – AND
    • Switch status is OFF

Activity: “Switch On is TRUE”: command door to open
Activity: “Switch Off is TRUE”: command door to close

You could also do this with sequences, but you’d still have to be careful about the timing of door movement, since, again, opening and closing isn’t instantaneous, and “open” and “closed” aren’t really that–they’re probably actually “closed and not in motion” and “not closed and possibly in motion either direction”.

You also need to allow time for the sensors to respond.

1 Like

Can you add a delay into sequences?
For example such as a x sec. delay between each event in the sequence or even different delays within the sequence event?

Sure, but it doesn’t prevent you from having to assume that the door is open based on how long it hasn’t been closed. That’s really the fly in the ointment. Add a sensor for when the door is in the fully open position and the game changes completely, and gets a lot easier.

I’d agree with that suggestion, Door/Window sensors are the cheapest device in the stable, makes for a better solution.

^^^
I should add that I use a motion sensor in sequence with a door sensor (in PLEG) to resolve entry/exit from the main entrane.

1 Like

Yes there is a door tilt sensor.

I’ve made the above Reactor sensor and it behaves as expected when using through vera. Now trying to get the new virtual switch to show up in Alexa. Thanks again!

Woot woot! Everything works as expected with Alexa. Cheers @rigpapa for coming through again!

To add switch to Alexa (if the vera skill was added previously), per this previous post

  1. Login to vera at https://home.getvera.com/
  2. Click the dropdown on your name in top right corner (Before you select your controller)
  3. Click Manage Alexa
  4. Add devices.
  5. Open Alexa App on your phone.
  6. Click Add Device.
  7. Click Other
  8. Click Discover Devices.

Cheers!

1 Like

Ok next challenge with this, i want to be able to say “open/close device” instead of “ turn on device”.

Any device options or tricks on switchboard or Alexa to make it respond to open/close?

That I do not know. Alexa has a thing about locks, so that’s probably not a path to success. Maybe create a routine in the Alexa app? I’ve heard you can do such things, but I have not done it.

Possibly create a routine? To operate the virtual switch to run the scene to open the door…

C

The Alexa app lets you set routines. you can set a phrase like “open garage door”. I do find open is a key word to Alexa, so some times Alexa does get confused, but works 90% of the time. Try setting a virtual switch as an open/close blind, as I think Alexa will allow you to say open without a routine.

clicked wrong reply direct a w1se

1 Like

Ok will try the routine path. I haven’t used Alexa for making any custom routines yet. Will let you know if I’m successful.

That’s brilliant! @w1se , Switchboard will let you make a virtual window covering. It supports the same Target and Status as any other switch (among other things). You should probably turn off Switchboard’s “motor emulator” by setting the virtual cover’s RampRatePerSecond variable to 0.

Ok I tried the Switchboard virtual blind, and everything works in Vera. For some reason however, Alexa will not find the virtual blind. (I did a luup reload, changed the name, added to vera through “manage alexa”, and it still can’t find it.) It found the first virtual switch no problem.

Any ideas?

Have you done the discover on Alexa? I always miss at least one step :frowning:
C