Getting HE to control SmartThings hub devices (Tutorial)

I haven't seen this method discussed here so forgive me if this is already widely known. Anyhow, for those unaware here's an easy way to get HE to speak to ST in order to control individual devices on ST through the HE hub (and dashboard). Not only is this great for ST itself, you can also use ST as a middle-man to work with other hubs not available via HE itself (e.g. RM Pro, Harmony, etc.) Before I begin, there's some pros and cons to this method:

Pros:

  • You never have to interact with ST after this is configured.
  • You can use HE exclusively to control ANY ST device.
  • You don't have to worry about syncing between hubs if you use HE exclusively.
  • This is NOT IFTTT based -- HE speaks directly to ST so less latency.
  • Absolutely no custom code on HE needed -- it uses Rule Machine.

Cons:

  • Requires a bit of configuration on both hubs for each device you want to control
  • Any device you configure obviously won't take advantage of local processing (internet access is required)

Prerequisites:

  • ST hub must have webcore installed
  • Rule Machine must be installed on HE
  • A virtual device must be manually created on HE hub for each ST device you wish to control

Steps on ST hub:

  1. Login to webcore for your ST hub and create a new piston.
  2. Create an IF statement.
  3. Select virtual device and choose IFTTT (The actual IFTTT service WON'T be used)
  4. The comparison should be set to 'execute'
  5. Choose a value to use. It can be anything but ideally you want to make it logical because it'll be used at the end of a URL. I chose '[device]on' or '[device]off', depending on what I'm configuring.
  6. You'll now see a URL underneath "Use this URL in IFTTT maker's channel". Copy this URL and save it to a notepad for later.
  7. Hit save in webcore and now create a THEN statement.
  8. 'With' should be the device you wish to control and 'DO' is obviously the action you wish to perform. Click save.
  9. You can now optionally create an 'ELSE' statement. For example, if you have a switch to create you can configure one URL to turn on the device and another URL to turn off the device. Simply repeat steps above to do so, otherwise click save to finish the piston.
  10. Copy the URL into your browser and verify it works. Assuming you copied the right URL, you'll get a message that says "Received event [cmd]". Your device should now be controlled via that URL. ST configuration is done so now it's time to configure HE.

Steps on HE:

  1. Create a virtual switch and title it the same as ST device (it doesn't have to be the same but it'll make sense from a logical standpoint at least).
  2. Go to 'apps' and select Rule Machine. If you don't see it, you may need to install it from the built-in apps section.
  3. Configure rule machine conditions/rules to use your virtual switch you just created in step 1.
  4. Under 'Actions for true' scroll down to 'Set mode, send HTTP request'.
  5. Leave 'Set the mode' alone. Scroll down to 'Send HTTP request'. Copy the URL you copied from ST step 6 and paste it into this section.
  6. OPTIONAL: If you created two commands (e.g. on and off) you can now do the same for a false action. In doing this, the device will turn on and off depending on the state of your virtual switch. If you don't do this, be sure to configure the virtual switch to automatically turn off (else it'll always be on).
  7. Click done in Rule Machine. Now go to your virtual switch and test it out. If you followed the directions correctly, your HE virtual switch now controls the ST device. You're done! :smiley:

I'm using this method while I slowly migrate from ST to HE and it's working great so far. I hope this helps someone else in a similar situation.

4 Likes