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.
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.)
A "zwave extender" was sometimes used in the early generations of Z wave when not all devices ran at the maximum power allowed by the specification, but starting with the fourth generation of zwave any ordinary repeating device would do at least as much as the single purpose extender devices did. And with the fifth generation, Z wave plus, the ordinary devices had significantly longer range than the old Z wave extenders. So the extenders are no longer needed. Instead, choose any zwave plus mains-powered device as the repeater.
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 there are obstructions such as trees or cars in the yard, you may be able to get a clear path by putting the repeater near a clear glass window one or two floors up in the main building.
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, but the range is just too far to communicate with the SmartThings hub in the primary building, 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 the " just another room" approach. But your only additional cost is the second SmartThings hub and after that everything is pretty easy.
At the present time, SmartThings does not expose multiple locations to either IFTTT or echo, which is why you have to set up two separate SmartThings accounts. If you just have them set up as two locations on one SmartThings account, IFTTT will only have access to the devices from one of them, and you won't be able to pick which one. The same problem occurs with echo devices. SmartThings has [said they hope to change this in the future], but for now you need to set up a separate account for each hub if you want to use these outside services.
3. One ST Account, two ST hubs, two separate ST locations, Hue Bridge as a Man in the Middle.
Alternatively you can set up the second hub in the outbuilding as a second "location" on the same SmartThings account. You still have to have separate devices and separate smartapps, but you can switch from one location to the other in the SmartThings mobile app without having to log out and in again.
And if you have a V2 hub, as of 2017 the "superLAN connect" feature will add a single Hue bridge to both locations. This will allow you to use The hue bridge as a "man in the middle" between your two locations, although you will have to use an actual physical bulb, not a virtual device. But if you have a $15 hue white bulb attached to the bridge you could have one hub turn that light on and have the other hub use that light turning on as a trigger for some other event. So instead of using IFTTT to communicate between the two hubs, you can do it with the hue bulbs.
Both these methods will work, so it's just a matter of preference as to which you use. Using the Hue bridge may have a little less lag, but requires dedicating actual physical devices as the go-betweens. Using IFTTT won't require physical devices, but may have some additional lag.
Using the hue bridge is particularly good if your desire is to have sensors in the outbuilding trigger lights and sirens in the main building. Hue lights can be triggered directly and the siren in the main building can be set to "follow" the Hue light.
4. One ST account, Two SmartThings Hubs, Two SmartThings Locations, Linked by WebCore Proxies
One ST account, one ST hub in the main building and a second ST hub in the outbuilding, each with its own devices and virtual proxies for devices in the other building. Each hub is seen as its own "location" in the SmartThings account. This will require Ethernet access in the outbuilding.
As of July 2017, webcore allows a piston (rule) for one location to trigger a piston for a different location. The two locations are still completely separate as far as the SmartThings mobile app goes, so you will only see the physical devices that belong to one hub on each things list. You can switch from one location to the other without having to sign out of the mobile app. But you could create a virtual device to act as a proxy for physical devices that belong to the other hub and use a web core piston to keep everything in sync.
Set up for the webcore method is going to be quite complex because of the need to create proxy virtual devices and pistons to manage those proxies.
Also, because each hub is its own location, at the present time you will not be able to use both directly with some third-party services, including Amazon echo, Google Home, and IFTTT, as these are only able to access one SmartThings location per account, so it will require additional proxy device efforts.
the author of webcore has said that this would be inefficient and have multiple delays. This was tested by a community member, who saw added delays of about an additional two to three seconds on the devices belonging to the second hub.
The advantages are that, using webcore, you will be able to have a single piston (rule) which includes devices in both buildings, accessed by proxy. So while it's not as clean as option one above, it gives you almost the same outcome. Also, energy draw should be quite low as the only additional device you are adding is the second hub.
The disadvantages are that there will be some additional lag and set up and maintenance is going to be very complicated because of the need for both proxy devices and shadow pistons to operate the proxies.
Still, it is an option that some people may want to look at, particularly those who are already using webcore.
Deciding between the two hub Hue/IFTTTT method and the webcore proxy method will probably come down to whether you need a lot of rules that include devices from both locations.
Setting up each hub as its own smartthings account is a very simple solution if you just want automation in the outbuilding and don't typically need to coordinate it with rules for the main building.
Setting up each up as a separate location on the same SmartThings account and using IFTTT or a Phillips hue bridge as the "man in the middle" will be pretty easy and won't require any particular coding skills. If you only have a few things that you want to coordinate, such as having a motion sensor in the outbuilding trigger a siren or light notification in the main building, then using IFTTT or the hue bridge will be pretty simple to set up and maintain.
If you have a lot of rules where you want to combine some devices from the main building and some devices from the outbuilding, you should probably look at the web core proxy method even though setup and maintenance is much more complicated.
There are also methods using other protocols detailed in the other sections of this article.
5. 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. And all the devices will appear on your single location things list.
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. Leviton also has a new line of Wi-Fi devices including light switches which work well with SmartThings.
DLink has a mainspowered WIFi motion sensor that has an IFTTT channel.
You can also [make your own mainspowered WiFi contact sensor for about $10].
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 used to have a line of Wi-Fi sensors, but has now discontinued most of them except a leak sensor. 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.
6. 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 $50. ( One bridge unit can handle up to 40 of their sensors.) 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.
7. 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.
8. Samsung Connect Home WiFi System
The Samsung connect home Wi-Fi system does have multiple hub units, but only one of them will act as a home automation hub. The others can act as repeaters for zigbee and Zwave, but as far as range and signal strength, it's no different than just using another plug-in device. The fact that the Wi-Fi can reach from one of these unit to another doesn't change the range of the Z wave and zigbee radios. So if you aren't able to solve the problem with just another repeater, it's unlikely that this particular system will help to reach an outbuilding. You can use it as your second hub as in any of the solutions above, but other than giving you another Wi-Fi router, it doesn't add anything special.
9. Information for landlords of multiunit complexes
If you are a landlord looking for solutions for multi unit housing like an apartment building where each unit has their own hub, look instead on the quick browse lists under project reports for the "second home" list and you can find a number of landlord discussions. There is even one community member who runs a 200 unit complex. His company has created their own umbrella software for managing that, which they may license to other people for a fee. In any case, you can read more about landlord issues in the threads on that list.
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 
Leviton WiFi light switches and pocket sockets 
SmartenIT Zigbee Relays for Outdoor Use 
iHome WiFi pocket socket 
WeMo WiFi pocket socket and wall switch