Connect door sensor to socket?


I’ve just bought the starter set, I want to use the door sensor to turn on/off the outlet whenever the door is opened/closed, I’ve added the devices etc but cannot find a way to get them to work together. I would have thought this should be very simple to configure so am I missing something obvious?


Welcome! :sunglasses:

In zwave and zigbee, which are the two protocols that SmartThings supports directly, A “switch” is anything that has a basic on/off command. That includes a wall switch, the smart plug, an in wall receptacle, a light bulb, or an in wall relay.

So you can use the built in feature “smart lights,” select the smart plug as the “switch” that you want to turn on, and have it turn on when the motion sensor detects motion. Or when an open/close sensor is opened.

Smart Lights automations can also be configured to run when SmartThings detects the following events through connected sensors:

Switch Turned On/Off
Button Pressed/Held

1 Like

Ah Great, that is working now, many thanks for your reply. Is it also possible to use 2 of the sensor capabilities at the same time. I’ve put the door sensor on a door to a conservatory so it now turns on a heater when the door is opened, just wondering if it’s possible to only turn the heater on when door is opened and the temperature is below a certain level. Would that be possible?


1 Like

It’s possible, but not easy.

There is a very powerful community created rules engine, called core, which allows you to have multilevel “if” statements including “if A and B while C but not D.”

You’d need to use custom code, which is pretty straightforward: basically you’re going to copy the author’s code and paste it into your account. Here’s the FAQ for that

Then if you decide that something you’d like to try, there are two forum threads you will need for core.

The first is the author’s thread where you get the actual code.

The second is a peer assistance thread where community members can help you figure out how to set up any particular rule you want. (In core, an individual rule is called a “piston.”)

So Core is very powerful, but also quite complicated.

If by chance you have an iPhone, there is a third-party app, SmartRules, which costs about $10 and is also very popular. It is much simpler than core and cannot do as much, but it does have a “do while” option which many people find very useful. It’s easy to install, you do it like any other app from the App Store.

So there are some options depending on your particular requirements. :sunglasses:

CoRE is at candidate release now :smiley:

1 Like

Thanks :smile:, your help is appreciated, sounds like smartrules might be a good one to try first and if I need more complex rules I can move on to Core