Use IFTTT to have ring doorbell motion turn on a smart switch between certain hours with a timer


#41

That night IFTTT/Hubitat was bugging out for me too.

Yes just create a trigger with a delay to turn it off. You can also go into the virtual device and set it to auto turn off on its own. That's what I do.

Here is the current rule I"m using that will turn the switch on only at night and isn't already already on. It also will keep the light on if there is new motion. The Virtual switch is set to auto turn off 500ms and the global variable is there to track that IFTTT turned it on. Because this is a rule it should be more reliable about turning off your device and virtual switch,


#42

trying to set it up like you have and created a couple more virtual switches but cannot get the same stuff that you have. For example you have variable iftttfrontdooormotion(false) = false, I don't get an option for false only an on or off state. Do you have another rule setup from ifttt that runs and this communicates with it in order to use a true or false?

I am guessing that your front door switch is an actual switch that works in hubitat?

What kind of rule are you running for the global variable? I don't have an option to make any switch like that and the ones created in ifttt dont show up in hubitat


#43

I'll give you detailed step-by-steps either tonight or sometime this weekend but this is the rule I use and only rule. I do have one that when I go mode day makes sure the Global variable is set back to false and the light is off so if it gets stuck it gets unstuck itself. That's it so far.

However, I do have some logic hole still or something weird with rule machine. Every once in a while the rule cancel my pending items because it want true but I don't see it in the logs. I'm probably just missing it but it isn't 100% perfect yet but it works 90% of the time. It took a week for it to get stuck in a state this time.

Short list of what you need

  • A global Boolean that is false at start (That's iftttfrontdooormotion)

  • A Virtual Switch for IFTTT to turn on that you will watch with your rule. Set it to auto turn off. Currently using 500ms myself. You don't want IFTTT flipping on the actual switch because it will do it with no logic beyond If this then that.

  • The actual switch or smart bulb to turn off and on. My Front Door Switch is the actual light switch.

  • Mode manager to set your modes (Day, night, etc) or replace my mode check with between sunset and sunrise


#44

I don't have a RIng doorbell, but wouldn't the Alexa method be faster and more reliable?


#45

It's been some time since I tried and it seemed slow too but Alexa Routines while dumber are easier to get going.


#46

Why would you think that? Both methods rely on the cloud integration. Most of the issues I've seen with IFTTT are not caused by IFTTT but by the services they link to.


#47

I have tested both IFTTT and Alexa to integrate Ring with Hubitat. I have found Alexa to be much, much quicker than IFTTT. IFTTT would take 15 to 30 seconds. Alexa is almost instantaneous. Since Amazon owns Ring now, it makes sense that the integration between the two should be pretty solid.


#48

mine right now has alexa to turn on the light when motion is detected with ring and after it gets dark and at the sametime ifttt also turns on a virtual switch in hubitat. I dont have alexa turning on the virtual switch because every single way I have tried for some reason she wont turn the virtual switch on and yes its added to hubitat and up to date.

I am just trying to make it so it checks to make sure that the switch is shut off through ifttt so thats why I am trying to figure his rules out.

Yes Alexa is about 15 to 30 seconds quicker then ifttt is for turning the outdoor lights on.


#49

I am not sure how to make a global Boolean set to false in hubitat. I don't see an option for it in the virtual switch settings.

My main switch is turned on by alexa since she can see and control it and since she can use the ring doorbell motion features as well. She won't turn on the virtual switch in hubitat for somw reason. It gives me the option to do so but she wont turn it on so I have IFTTT turn it on by saying when ring detects motion turn on virtual switch. I then have hubitat turn off the virtual switch after 1 minute.


#50

I use my Virtual Motion with Switch Driver to handle my Ring to Hubitat integration via an Alexa Routine. You can give it a try and see if it helps at all. For me, using an Alexa Routine has been very reliable and fast. This driver will automatically turn “off” the HE device to sure it is ready for the next Ring event.

https://raw.githubusercontent.com/ogiewon/Hubitat/master/Drivers/virtual-motion-switch.src/virtual-motion-switch.groovy


#51

I will give it a try. The only thing I am worried about is that when I had my virtual switch set to auto shutoff then my light wouldn't turn on before.


#52

Use motion lighting/simple lighting/Rule Machine to treat the doorbell like any other motion detector. Don’t use the switch capability, use the motion capability. This allows the builtin apps to behave normally, as they do with any motion detector.