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 Dual Nano Switch (ZW132) with Energy Reading user guide.


SmartThings Hub Instructions for creating your own Device Handler:

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


Special thanks to Erocm123 for providing the custom device handler that we used to modified for Dual Nano Switch w/ Energy Reading to be used with his Metering Switch Child Device custom device handler.


First install the Metering Switch Child Device custom device handler.

  1. Login to Web IDE (login here: https://graph.api.smartthings.com/)
  2. Click on "My Location" tab
  3. Select your gateway.
  4. Click on the "My Device Handlers" link on the top menu 
  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://github.com/erocm123/SmartThingsPublic/blob/master/devicetypes/erocm123/metering-switch-child-device.src/metering-switch-child-device.groovy), 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"


There is no further need to do anything with this device handler, it will work as long as it is in your device handler list and work together with the custom device handler installed over your Dual Nano Switch.




Follow the steps below to install the custom device handler over your Dual Nano Switch:

  1. Login to Web IDE (login here: https://graph.api.smartthings.com/)
  2. Click on "My Location" tab
  3. Select your gateway.
  4. Click on the "My Device Handlers" link on the top menu 
  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/6059005046), 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 Dual Nano Switch with Energy Reading by going to "My Devices" page in the IDE
  11. Find your Dual Nano Switch with Energy Reading.
  12. Go to the bottom of the page for the current Dual Nano Switch with Energy Reading 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 Inc Dual Nano Switch w/ Energy Reading).
  14. Click on "Update"
  15. Save Changes