# Virtual Devices with v2 hub?

**URL:** <https://community.smartthings.com/t/virtual-devices-with-v2-hub/30028>\
**Category:** Devices & Integrations\
**Created:** [November 25, 2015, 1:25am UTC](https://community.smartthings.com/t/virtual-devices-with-v2-hub/30028 "2015-11-25T01:25:01Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![leblaaanc](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/leblaaanc/32/22006_2.png) [@leblaaanc](https://community.smartthings.com/u/leblaaanc)\
**Post date:** [November 25, 2015, 1:25am UTC](https://community.smartthings.com/t/virtual-devices-with-v2-hub/30028/1 "2015-11-25T01:25:01Z")

</div>

What am I missing here? Once I upgraded to v2 hub I can no longer create “virtual” doors by mapping a open/close sensor to a lock/relay. It seemed like with v1 I could make these types of mappings into a virtual device.

I’d simply like to know how to unlock/lock or open/close a door with a given presence sensor’s departure or arrival.

---

<div class="post-metadata">

**Author:** ![bridaus](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/bridaus/32/94511_2.png) [@bridaus](https://community.smartthings.com/u/bridaus)\
**Post date:** [November 25, 2015, 2:23am UTC](https://community.smartthings.com/t/virtual-devices-with-v2-hub/30028/2 "2015-11-25T02:23:44Z")

</div>

I think you should look at Rule Machine or Trigger Happy apps. They will bring you happiness. Or something like that.

---

<div class="post-metadata">

**Author:** ![leblaaanc](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/leblaaanc/32/22006_2.png) [@leblaaanc](https://community.smartthings.com/u/leblaaanc)\
**Post date:** [November 25, 2015, 4:21pm UTC](https://community.smartthings.com/t/virtual-devices-with-v2-hub/30028/3 "2015-11-25T16:21:44Z")

</div>

Thanks Brian! This should work for now.

Have you seen any smart apps floating around that manipulate the shm states (arm/disarm)? I’d like to disarm my alarm for maybe 10mins when someone arrives.

---

<div class="post-metadata">

**Author:** ![bridaus](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/bridaus/32/94511_2.png) [@bridaus](https://community.smartthings.com/u/bridaus)\
**Post date:** [November 25, 2015, 4:24pm UTC](https://community.smartthings.com/t/virtual-devices-with-v2-hub/30028/4 "2015-11-25T16:24:25Z")

</div>

For sure you can use Routines for now. They are ST native SmartApps. They have had their issues, but have worked for me more than 99% of the time.

I know of some SmartApps that can change SHM, like Keypad Manager, and Smart Alarm (highly recommended by reputation). Check those out as a start.

@bravenel, do you have plans for Rule Machine or Trigger Happy support SHM in the future?

---

<div class="post-metadata">

**Author:** ![SBDOBRESCU](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/sbdobrescu/32/30067_2.png) [@SBDOBRESCU](https://community.smartthings.com/u/SBDOBRESCU)\
**Post date:** [November 25, 2015, 4:26pm UTC](https://community.smartthings.com/t/virtual-devices-with-v2-hub/30028/5 "2015-11-25T16:26:25Z")

</div>

> [@leblaaanc](#):
>
> I’d like to disarm my alarm for maybe 10mins when someone arrives.

Handling timed events and SmartThings don’t go well together. You’re better off coming up with a physical event that would arm your SHM back up.

---

<div class="post-metadata">

**Author:** ![leblaaanc](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/leblaaanc/32/22006_2.png) [@leblaaanc](https://community.smartthings.com/u/leblaaanc)\
**Post date:** [November 28, 2015, 1:02am UTC](https://community.smartthings.com/t/virtual-devices-with-v2-hub/30028/6 "2015-11-28T01:02:09Z")

</div>

@SBDOBRESCU I don’t need it to be accurate just reliable. My delayed door lock when the door is open using Rule Machine seems to work.

@bridaus Thanks for showing me these, they did help accomplish maybe 40% of the commands I’d like to perform. What’s screwing me is I can’t seem to figure out how to with either Rule Machine or Trigger Happy to have one of the devices act as a conditional for the other instead of them both being triggers.

My example is I’d like to open the garage when I get home. In Rule Machine I set `My Presence AND Garage Contact Closed` -\> `Trigger Momentary Switch`. The problem is, it will keep triggering the momentary switch when I attempt to close the garage (opening the garage back up). Any thoughts on accomplishing this? With the V1 virtual devices this wasn’t a problem as the contact sensor was, as it should be, a conditional for the state of the garage.

Seems like there should be a SmartApp that works like Trigger Happy but with other devices as conditionals. I also wonder if it’s possible to create a virtual “garage” device because none of this works within routines.

---

<div class="post-metadata">

**Author:** ![SBDOBRESCU](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/sbdobrescu/32/30067_2.png) [@SBDOBRESCU](https://community.smartthings.com/u/SBDOBRESCU)\
**Post date:** [November 28, 2015, 1:12am UTC](https://community.smartthings.com/t/virtual-devices-with-v2-hub/30028/7 "2015-11-28T01:12:38Z")

</div>

> [@leblaaanc](#):
>
> I’d like to open the garage when I get home.

I didn’t mean the timers are not accurate, they often fail. As for opening the garage, there is a custom device type built by ST, called garage door sensor button. With that type and Rule Machine, you can achieve exactly what you need…

---

<div class="post-metadata">

**Author:** ![leblaaanc](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/leblaaanc/32/22006_2.png) [@leblaaanc](https://community.smartthings.com/u/leblaaanc)\
**Post date:** [November 28, 2015, 1:18am UTC](https://community.smartthings.com/t/virtual-devices-with-v2-hub/30028/8 "2015-11-28T01:18:57Z")

</div>

What’s that device type do that the others don’t? I’m assuming I assign it to the contact sensor. It doesn’t seem to do anything particularly different.

Ah I got it figured out with your direction. I think that device type is just left over from the V1 virtual devices and you still need to install this [SmartApp](https://community.smartthings.com/t/garage-door-control-after-v2/22393/22?u=leblaaanc) to get it working.

---

<div class="post-metadata">

**Author:** ![SBDOBRESCU](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/sbdobrescu/32/30067_2.png) [@SBDOBRESCU](https://community.smartthings.com/u/SBDOBRESCU)\
**Post date:** [November 28, 2015, 1:37am UTC](https://community.smartthings.com/t/virtual-devices-with-v2-hub/30028/9 "2015-11-28T01:37:35Z")

</div>

It was taken down initially, and then brought back, I believe. But yes, is the same as the v1 functionality…you don’t need to use that specific app though. But that’s what I use too…however, the presence sensor has been so delayed lately that I use the Homelink often because I don’t feel like waiting in front of the ggaragejust to use ST.

---

<div class="post-metadata">

**Author:** ![leblaaanc](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/leblaaanc/32/22006_2.png) [@leblaaanc](https://community.smartthings.com/u/leblaaanc)\
**Post date:** [November 28, 2015, 1:47am UTC](https://community.smartthings.com/t/virtual-devices-with-v2-hub/30028/10 "2015-11-28T01:47:40Z")

</div>

Interestingly enough I think I was able to do away with modes altogether when pimping out routines to the max and as a side effect I get to use the iPhone widget. Finally I think I understand their use.

---

<div class="post-metadata">

**Author:** ![leblaaanc](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/leblaaanc/32/22006_2.png) [@leblaaanc](https://community.smartthings.com/u/leblaaanc)\
**Post date:** [November 28, 2015, 7:38pm UTC](https://community.smartthings.com/t/virtual-devices-with-v2-hub/30028/11 "2015-11-28T19:38:36Z")

</div>

I was able to get a working “virtual device” with my Z-Wave Tilt Sensor (I like to keep everything Z-Wave) as well using this device type:

> [@Garage Door Control after v2?](https://community.smartthings.com/t/garage-door-control-after-v2/22393/25):
>
> Here’s a z-wave version of the SmartSense Garage Door Sensor Button this should be compatible with any device supported by the Z-Wave Door/Window Sensor. Combined with the code @chrisb posted [above](https://community.smartthings.com/t/garage-door-control-after-v2/22393/22) to intercept the events emitted by this device and a Z-Wave Relay set to the Z-Wave Virtual Momentary Contact Switch device type you should have a working garage door for use in routines.
