Send Sensor data from SmartThings to Spruce

Contents

This is the updated Smartapp instructions for the 2023 SmartThings platform changes

What is the Spruce Sensor Smartapp

This Smartapp sends data from Spruce sensors that are connected to a SmartThings hub to the Spruce cloud for use with the Spruce Gen2 Controller and app.

The existing Spruce Connect Smartapp currently provides this service as well as creating a Spruce controller device in SmartThings. It will be discontinued as part of the upcoming SmartThings platform change.

The previous Smartapp and Devices used Groovy code and were utilized through the SmartThings Groovy IDE. These will be removed as outlined in the SmartThings announcements referenced in the next section.

The new Smartapp is hosted by Spruce, but can still be added to your SmartThings account as outlined in the directions below.

Update to the SmartThings platform

This Smartapp will replace the previous Spruce Connector because SmartThings will no longer support the Groovy device handlers or Smartapps as referenced here: The end of groovy has arrived

On September 30, 2022 SmartThings will start terminating the use of legacy technology and transition to new technology they call SmartThings Edge, Schema, and more. They have additional details in the FAQ.

SmartThings Platform Transition FAQ

This Smartapp is required after SmartThings discontinues the previous Groovy device handlers and Smartapps. Until that time, the previous Spruce Connect Smartapp should be used because this Smartapp is only compatible with the new device edge drivers.

How to add the SmartApp to your account

  1. Request your Spruce access token before proceeding. Spruce Gen2 Controller and account is required.
  2. Login to the new SmartThings developer account using your existing login credentials
  3. Create a New Project
  4. Select Automation for the SmartThings App
  5. Enter a name for the project
    Spruce Sensor Connect
    and Create Project
  6. Select Register App
  7. Select WebHook Endpoint
  8. Enter the Target URL
    • https://api.spruceirrigation.com/v2/sensor_smartapp
  9. Go to the Next page
  10. Enter the following information
    • App Display Name:
      Spruce Sensor Connect
    • Description:
      Send Sensor Data to Spruce
    • Check the box for: r:devices:*
  11. Go to the Next page
  12. Custom Parameters
    • Name:
      accessToken
      Value: *your Spruce access token*
  13. Save
  14. Go to project overview, you do not need the Client ID and Secret
  15. Click the Verify App Registration
  16. Deploy to Test

Enable Developer Mode in the SmartThings App

Follow these steps to enable developer mode in your SmartThings app.

  1. In the SmartThings menu, go to the Menu button in the lower right corner.
  2. Press the Gear in the upper right corner
  3. Scroll down to About SmartThings and long-press it
  4. The developer options will show up just below the About SmartThings
  5. Turn on the Developer mode
  6. Close and re-open the app

https://developer-preview.smartthings.com/docs/devices/test-your-device/#enable-developer-mode-in-the-smartthings-app

Use the App

The new Smartapp will not show up in the SmartThings app until the developer mode is enabled. To use the new SmartApp:

  1. Go to Automations
  2. At the top of the screen select the Compass icon
  3. Scroll down to find the app Spruce Sensor Connect
  4. Select the Sensors that will send data to the Spruce cloud
  5. Press Done and then Allow
  6. The sensors will now be added to the Spruce account and send Temperature and Soil data to the Spruce app.

Was this article helpful?

Related Articles