Multiple Sensors - Merge into a single virtual sensor

I have a Simulated Presence Sensor which takes two presence sensors and turns it into one device. I also have a Simulated Light which turns two lights into one device on SmartThings.

What I’m looking for is a device type that will merge two contact sensors into one.

Background: I have 2 cheap garage door sensors. They each sometimes think the door is open when it isn’t. But rarely do they BOTH not work at the same time. Therefore I’d like to merge them into one device so that only when both sensors say they are open that it’ll trigger my alarm system, smartapps etc.

Thanks in advance!

This exists, it comes with a smart app called “zone manager” so you can assign the sensors you want to the zone. Look on the quick browse list in the community – created wiki under sensors or under security. :sunglasses:

http://thingsthataresmart.wiki/index.php?title=How_to_Quick_Browse_the_Community-Created_SmartApps_Forum_Section

You may also need Mike’s “universal virtual device type handler” which will let a contact sensor report as motion.

What about a Latching CoRE Piston that says:

If Both contact sensors open
Then open virtual contact sensor

But-If Both contact sensors close
Then close virtual contact sensor

Thanks @rontalley,

Would I not then still need a ‘virtual contact sensor’ device type?

Thanks @JDRoberts,

You are talking about this motion zone manager, right?

I think that’s about what I’m looking for… ideally without having to also trick SmartThings into thinking an open door is a motion sensor, but this could work.

1 Like

Yeah, but wasn’t that the intention?

Not exactly, I was hoping to have a virtual door sensor that combines two door sensors, not a virtual motion sensor.

1 Like

Create a basic core piston that operates a simulated contact sensor.

If sensor A and sensor B are open then change simulated sensor C to ‘whatever’

You can set other rules to change it back based on how you decide you want to record it as closed or just hit the button in the app.

1 Like

You could create a virtual switch to simulate a virtual contact sensor and in rontalley’s example, that’s what would be turned off/on in the logic.

Aside from that, you can use CoRE in different way from rontalley’s example to accomplish the same thing. For example, I have 3 motion sensors in my office which control one of the lights. My CoRE logic says that if any of the 3 see motion, the light comes on. The logic states that when ALL show no motion, wait 2 minutes and then turn off the lights if no additional motion is detected in that 2 minute timeframe. So basically, with CoRE logic, I’ve created a virtual motion sensor using 3 separate physical motion sensors.

If you’re having reliability issues with these contact sensors, I’d make sure they have solid connectivity to the hub (you may need a repeater of some sort added between them and the hub) and maybe consider adding a Monoprice tilt sensor to the garage doors. Mine have been super reliable.

1 Like

That was my understanding. Never suggested motion sensors. You can create a simulated contact sensor in the IDE which is a ‘virtual contact sensor’ device type. Use my CoRE Latching Piston example and you will be all set.

Should take about 2 minutes to set it up in the IDE and another 3 minutes to create the Piston.

1 Like

Thanks @Brad_Langhorst and @rontalley ,

I forgot that Smartthings has these virtual devices built-in. I thought I’d need to find a user-created virtual device.

And as far as the Monoprice Tilt Sensor, that’s actually the device that I’m using. I’ve got 2 and they both give me false open signals at times… I’ve even had the alarms set off at 1am for no reason because it thought the garage door opened.

I like having specific smartapps instead of running everything through CORE logic, but what you suggest is probably easiest solution. I like what you have here. That should do the trick.

Sorry, I thought you suggested the “Smart Zone Motion Detector” which seems to me like it connects two motion sensors into one, but I’m wanting to connect 2 garage door tilt sensors into 1.

Perhaps I misunderstood.

1 Like

It’s cool. You are definitely on the right track. It took a while for everything in my home to finally work as I needed it to. Never in a million years could have accomplished what I have with just the stock ST apps.

I’m close to 200 devices and you would think by now that I would have all of the apps I need but I still have alot more that I want to do which will continue to push my knowledge of ST and it’s possibilities further.

As far as CoRE, it is the most important “app” in my arsenal. I put app in quotes because its more of a rule engine than an app. Many of the “Apps” are just a set of rules that someone made which could be, most of the time, easily reproduced in CoRE. So instead of finding the app that does this or that, I typically ask myself if I can create a CoRE Piston to achieve the desired outcome. Especially if its an ITTT kinda scenario.

Hope this eliminates your false positives!

Kicking an old thread.

Is there a better solution to merge two presence sensors into one? Tying a virtual device to latching code that polls multiple sensors per @rontalley seems pretty straight forward. Any one have code to share? Thanks

I’ve been using a Simulated Presence Sensor and then this smartapp: