This page lists the groovy code and installation instructions to install a custom device handler over your SmartThings hub and form part of the larger Nano Shutter user guide.


Does not work with SmartThings Connect, custom device handler will only work with SmartThings Classic.


Special thanks to:

  • SmartThings for the basic code base and API
  • Erocm123 for his development of the editable preference page


Update to code on 2/7/2019:

  • Added basic Open, Close, and Stop command for Nano Shutter.
  • Changed Open/Close toggle into a single switch over the interface
  • Open/Close status follows Nano Shutter status
  • Added Parameter settings to "Def refresh()" on line 170

    - Line 173 - Parameter 85, set default mode to External Switch Operation Mode 1 (S1 = UP, S2 = DOWN)
    - Line 174 - Parameter 80, set the default mode to report Basic Report upon status change
    - Line 175 - Parameter 120, commented out, can be used to set S1 external switch mode
    - Line 177 - Parameter 121, commented out, can be used to set S2 external switch mode
    - Line 179 - Parameter 35, set the default mode to 30 seconds UP/DOWN calibration. Can change scaled configuration value to desired value


Update to Code on 9/20/19:

  • Added easier method to edit parameter settings in the preference page.
    • Once the preference page is saved, click on the "Configure" button to send the changes.


SmartThings Hub Instructions for creating your own Device Handler:

http://docs.smartthings.com/en/latest/device-type-developers-guide/quick-start.html


Follow the steps below:

  1. Login to Web IDE (login here: https://graph.api.smartthings.com/)
  2. Click on "Locations"
  3. Select your SmartThings Home Automation gateway that you want to put the device handler in
  4. You may need to login again, if not, continue to step 5.
  5. Create a new Device Handler by  clicking on "New Device Handler" button in the upper-right  corner. (Green Button)
  6. Click on "From Code."
  7. Copy Erocm1231 code from text file in this link (https://aeotec.freshdesk.com/helpdesk/attachments/6092492473), and paste it into the code section.
  8. Click on "Save", then wait for the spinning wheel to disappear before continuing.
  9. Click on "Publish" -> "Publish for me"
  10. Install it on your Nano Shutter by going to "My Devices" page in the IDE
  11. Find your Nano Shutter.
  12. Go to the bottom of the page for the current Nano Shutter and click on "Edit."
  13. Find the "Type" field and select your device handler. (should be located at the bottom of the list as Aeotec Nano Shutter).
  14. Click on "Update"
  15. Save Changes