Open/close a virtual door by opening/closing a virtual switch

Hey guys! So I’m pretty brand new ST and I think I have looked through every topic and can’t find what I’m looking for. I wish I was good enough with code to develop my own SmartApp for this, but I need some help!

What I would like to do is use my Manything cameras as motion sensors while they are recording. Using virtual switches & door sensor and IFTTT, I programmed the camera to start and stop recording when I come home and leave. My problem is that there is no way (as far I know) to trigger my alarm when motion is detected via motion on my camera. IFTTT doesn’t have a “that” statement that allows a virtual door to open.

The scenario I would like for to occur is the following: (if there is a better way of doing this, please let me know!)

  1. I leave > “Goodbye!” routine activated & within “Goodbye!” my virtual switch called Camera_1 is turned ON. | completed
  2. Through IFTTT, “If Camera_1 is switched ON, then start recording on (ManythingCamera)” | completed
  3. Through IFTTT, “If motion detected by (ManythingCamera), then Switch on VirtualSwitch_1” | completed
  4. Through a SmartApp, when VirtualSwitch_1 (simulated switch) is switched on, open VirtualDoor_1 (simulated contact sensor) | HELP!
  5. When VirtualDoor_1 is opened, the alarm triggers | completed

If that makes sense, what I obviously need help with is #4 in that scenario. I think there could be a number of uses for a SmartApp like this where you could use anything through IFTTT to trigger your alarm.

I believe this is what you’re looking for, uDTH.

1 Like

Thanks! I think this is exactly what I’m looking for! Only trouble is I’m not sure how to implement this. I’ll have to look into and try to figure it out. Any advice/starting tips?

Look in the bottom part of the thread, I posted a short how-to after trying to figure it out myself :slight_smile:

You are my hero! I was missing the whole Device Handler thing…your how-to was simple/easy and I’ve got everything up and running perfectly. Now if only IFTTT could fire just a bit faster :grimacing:

Thanks again!

1 Like