How to Automate an Outbuilding
Automating an outbuilding can be challenging for many reasons. This article assumes the network in your main building has a SmartThings hub as the primary controller.
SmartThings cloud architecture does not allow the use of two SmartThings hubs on the same account "location"  so unlike some other Home automation brands you can't just put a second SmartThings hub in the outbuilding and connect them together.
There are still multiple ways to automate an outbuilding that is out of range of the SmartThings network in your primary building.
- 1 CHALLENGES
- 2 DESIGN FACTORS
- 3 POSSIBLE SOLUTIONS
- 4 RESOURCES and FORUM THREADS
Typical Z wave/Zigbee/Bluetooth Home automation devices are designed assuming a distance of around 15 m between nodes. If it's clear line of sight on a clear day, you may get up to 50 m for zwave plus. However, at some locations an outbuilding like a barn or office may be farther away than that.
Humidity in the air, including rain or snow, can significantly degrade wireless signals. Z wave is particularly sensitive to this because it uses FSK. Zigbee and Wi-Fi tend to do a bit better.
Exterior walls are typically made of or include materials that degrade signal much more than interior walls. This might include brick, plaster lathing, siding, tile, insulation, even metal. Clear glass is often the easiest exterior material to get signal through.
A hop is the maximum distance a message can travel from one device to the next. Zwave and zigbee use mesh networks which allow a message to be relayed from one device to another around the network. This can significantly increase the total distance the message can travel. However, there are limitations on the total number of hops any one message can take.
For Z wave, a message is limited to four hops. Since it often takes three hops just to get a message from one building to another (interior device through window to exterior device on the wall of the same building, then across the yard to an exterior device of the outbuilding, then in through the window) it's unfortunately fairly easy to run out of zwave hops.
Zigbee home automation allows for 15 hops into the hub and another 15 out so it gives much more flexibility in route planning.
Wi-Fi doesn't use a relay method except access points, so there's no hop limit to run into.
When designing automation for an outbuilding, there are several factors to consider.
Do you just need schedules based on time and local events within the outbuilding, like a motion sensor? Or do you need to coordinate with events from the main building?
Does the outbuilding have mains power or do you need to run everything off a battery?
Does the outbuilding have good Internet connection, either through its own router or through Wi-Fi?
Cost can vary considerably depending on the devices that you select and whether you need to add additional power outlets in the yard or the outbuilding.
1. Just Another Room
One ST hub in the main building, regular end devices in the outbuilding, repeaters in the yard if needed. The set up looks exactly like the regular setup in the main building. You just have to find a good location for the outdoor repeaters.
The usual choices are either to put in wall receptacles outside on the exterior wall of each building with a clear line of sight to each other, or to put a power post with an in wall relay Midway across the yard. If you have a pool or pump with power already in the yard, that's a good place to put it. A Z wave lightbulb can also be a good repeater if your weather allows for it. (Zigbee bulbs are technically repeaters but appear to be more unreliable.)
You will need one set of repeaters for Zigbee and a different set of repeaters for Z wave so in some cases you may want to limit the devices in the outbuilding to only one of these two protocols.
If you have clear glass windows in each building, try to position repeating devices near them so you get maximum signal strength going into the outbuilding.
If the outbuilding is a metal shed, you're going to have problems. If you can use rubber weatherstripping around one of the doors or hatches, you may be able to get signal through there. You can also inset a clear glass or plastic port to allow signal through.
This setup has the advantage that you can use the same smartapp/routine to coordinate devices in both buildings. Also, the devices that you have in both buildings are likely to be similar.
This setup also has the further advantage that it should have very low power draw.
2. Two Separate ST Accounts, two separate ST networks.
If the outbuilding needs a lot of devices, like a four room office, or if you just want to stick with the setup that you already know, sometimes the simplest solution is just to set the outbuilding up as its own SmartThings account with its own SmartThings hub. The two hubs cannot communicate directly, but you can use IFTTT as a man in the middle by sending text or email notifications to each other's IFTTT accounts. You have to create your own rules and smartapps for each location independently. So there is some additional maintenance work compared to A. But your only additional cost is the second SmartThings hub and after that everything is pretty easy.
3. All WiFi all the time
If the outbuilding only needs a few devices, and in particular if it does not need batteryoperated sensors and can get by just with mains-powered motion sensors, you can just use Wi-Fi.
You can also put a harmony hub in the outbuilding if that helps at all. You should be able to initiate harmony activities from the SmartThings hub in the main building.
There are several mains powered Wi-Fi Motion sensors that have IFTTT channels, including one from WeMo and one from D-Link, and that will give you indirect coordination with SmartThings.
You can also use any cloud to cloud integration that relies on Wi-Fi to the end device.
Wi-Fi will give you much better range than Z wave or zigbee so you don't have to add additional repeaters.
This option is easy to set up, and the cost of mains-powered Wi-Fi devices has come down considerably in the last two years, although the energy use is still high.
So for a simple lights and motion sensors set up, this can be a good choice. You can also add an echo and any HVAC equipment that uses Wi-Fi for control, plus any devices the Harmony can control. And there are several brands of Wi-Fi pocket sockets that will work with SmartThings, including WeMo and iHome.
The two big device classes that are missing are locks and battery operated sensors. Wi-Fi uses a lot more power than Z wave or zigbee, so it is very rare to find battery operated wifi sensors. And some of the mains- powered ones, like those from Monnit, are very expensive, in the $200 range per sensor.
Connectsense does have a line of Wi-Fi sensors that include a mains-powered leak sensor, a mains-powered light sensor, and even a battery powered contact sensor. But again these tend to run about $150 each. They don't have their own IFTTT channel, but they do have a notification system which can send emails, so there is a limited indirect integration with SmartThings through IFTTT that way.
There are a couple of Wi-Fi only locks, but most of them have monthly fees and spotty reputations. So if you need a lock that can be controlled remotely on the outbuilding, it would probably be better to make an exception to the Wi-Fi only rule for the set up and choose any decent Bluetooth lock with a WiFi bridge and a remote app like bolt or August. It won't integrate with anything else, though.
4. The Crazy Fruit Salad Solution
Mix and match protocols selecting exactly what you need for each individual use case.
Kumostat wireless tags have a number of different battery operated sensors with extremely long range, even longer than Wi-Fi. The sensors cost about $40 each and you also need one of their bridge units at about $60. So this is not an inexpensive solution. But there is a good community built smartthings/Kumostat integration. And if all you want is to get sensor information from an outbuilding back to the main building, this can be a very good choice.
The wireless tags also have their own IFTTT channel, which can be used separately to integrate with a number of other systems including SmartThings.
You could even add the $99 harmony hub extender in the outbuilding and get trigger options from additional Z wave or zigbee sensors in the outbuilding that way. It would be cheaper than buying Wi-Fi sensors in most cases. Harmony doesn't do notifications, but it would be possible to have a battery-operated sensor in the outbuilding trigger a harmony activity that turned on a SmartThings-controlled light or siren in the main house.
So there are some people who have combined a Wi-Fi motion sensor, some wireless tag contact and temperature sensors, some zwave devices with local association, A couple of Wi-Fi plugs, and IR devices controlled by harmony and outfitted a barn or office outbuilding to do everything they want. Technical setup for each individual device is usually pretty easy. But coordinating it all can be challenging.
5. Go Commercial (zigbee only)
One network, one ST hub, zigbee devices only in the outbuilding, two zigbee pro repeaters with antennas to get signal from one building to the other.
If you really want to keep everything on one ST network, but you just can't get signal from one building to the other, some community members have purchased zigbee pro devices with outdoor antennas and use those only for the purpose of getting signal from one building to the other. These are only available for Zigbee, not zwave. And the technical set up can be difficult and fiddly. But it has been done successfully.
Any of these solutions may work, it just depends on the details of the specific use case.
RESOURCES and FORUM THREADS
Projects Category of the Forum where you can start your own project thread for help with any specific project 
Multiple ST hubs discussion 
Kumostat Wireless Tags Integration 
Using Zigbee Pro Repeaters with Antennas Outdoors 
FAQ: Are Smart Bulbs Repeaters? 
FAQ: Troubleshooting Connection to a Metal Outbuilding 
ConnectSense WiFi Sensors 
DLink WiFi Motion Sensor with IFTTT Channel 
GoControl Zwave Light Bulb 
Kumostat Wireless Tags 
SmartenIT Zigbee Relays for Outdoor Use 
iHome WiFi pocket socket 
WeMo WiFi pocket socket and wall switch