Alexa/Google Integrations

New user, everything up and running.
I have a Schlage Wifi lock, bought because their zwave one destroyed my network on the Vera every time I tried to add it. It does everything I want with their app except lock the door at night at a certain time. This device integrates with both Alexa and Google Assistant. How would I set things up in HE to lock the door using one of these integrations (and is one better than the other)? I don't want to actually talk to the assistant, I want a rule to kick this off. I don't think I need to poll the lock, just tell it to lock.
Edit- I feel like I may have this backwards. It looks like the integrations allow you to add your HE devices to Alexa or Google. I don't want to do this, I want to execute an Alexa/Google skill by using my hubitat.

IF Alexa allows you to Lock and Unlock your WiFi lock in an Alexa Routine, then you could create a Hubitat Virtual Contact Sensor, and use that as a Trigger for the Alexa Routines (one to lock and another to unlock) based on the virtual contact sensor changing from ‘open’ to ‘closed’ and vice versa..

1 Like

It does. (Well, unlock requires a code but I don't care about that. Just want to lock at a certain time) And I understand how to create a virtual device. What I don't understand is how to tell that virtual device to execute an Alexa routine.

OK, so let's say you've created a virtual contact sensor in Hubitat, and then have exposed that device to Alexa by adding it to the Hubitat "Amazon Echo Skill" app on your Hubitat hub. Once you've done that, the device should appear in the Alexa mobile app on your phone. Within that Alexa app on your phone, you should be able to create an "Alexa Routine" and select the Hubitat virtual contact sensor as the trigger for that routine.

In order to change the status of the virtual contact sensor, you would use Rule Machine to change the status of the virtual contact sensor from 'open' to 'closed', thereby resulting in the Alexa Routine being triggered. You will need reset the virtual contact sensor back to 'open' via Rule Machine a few seconds later to be ready for the next time you want Hubitat to lock your lock.

I hope this makes sense and provides you with the approach to making this work. If you have any questions, or need more details, please reach out. This community is full of very helpful people.

3 Likes

I'm so close. I can manually close the virtual contact sensor and the Alexa routine runs. But I'm unclear what Action to choose to be able to change the sensor status. None of them seem to have the virtual contact sensor available. This is what I have available

Try "Run Custom Action", fourth line from the bottom of your screenshot.

2 Likes

I think I've got it. It works fine when I Run Actions in the rule. It didn't work last night but I may not have left the virtual device in an open state, so I've now put this at the beginning and end of the rule for good measure, and we'll see tonight. :+1:

If you’d like some help troubleshooting your rule, please post a screenshot of it and the community will help.

The simplest set of actions i can think of would be:

Custom Action to call the virtual device’s ‘close()’ command

Delay 30 seconds

Custom Action to call the virtual device’s ‘open()’ command

Yeah, that's pretty much what I've got. I'm confident in it since it runs manually, using Run Actions, and the rest of the rule runs on schedule. I just want to see it succeed in locking the door when the schedule triggers it. Appreciate all the help, I'll report back.

1 Like

Worked flawlessly last night. In addition to turning out the lights, the front door was locked and the MyQ garage door closed. Integrations are great. Thanks for the help on this one.

1 Like

Excellent! Glad to hear it's working as desired. Enjoy!

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.