For users using SmartThings Hub, HEM G2 may require custom device type support until SmartThings adds native compatibility with the sensor.


Developer Alex Ruffell has created a custom device type for HEM G2 and published it to Github for the public to use it. (https://github.com/alexruffell)


SmartThings Hub Instructions for creating your own Device Handler:

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


HEM Gen2 Github code by ClassicGOD

https://github.com/ClassicGOD/SmartThingsPublic/blob/master/devicetypes/classicgod/aeotec-hem-gen5.src/aeotec-hem-g2.groovy

 

Follow the steps below:

  1. Login to Web IDE (https://graph.api.smartthings.com/) and click on the "My Device Types" link on the top menu
  2. Click on "My Locations" at the top menu.
  3. Select your SmartThings hub gateway
  4. Now click on "My Device Handlers" 
  5. Create a new Device Handler by clicking on "New Device Handler" button in the upper-right corner.
  6. Click on "From Code."
  7. Copy ClassicGODs' code from Github (https://github.com/ClassicGOD/SmartThingsPublic/blob/master/devicetypes/classicgod/aeotec-hem-gen5.src/aeotec-hem-g2.groovy), and paste it into the code section.

    (PRO-Tip) When copy any pasting code, click on the "Raw" button on github, then press "CTRL+a" then "CTRL+c" to copy all of the code. Then click on the code section in SmartThings IDE and press "CTRL + v"

  8. Click on "Save", then wait for the spinning wheel to finish.
  9. Click on Publish -> Publish for me.
  10. Install it on your HEM G2 by going to "My Devices" page in the IDE
  11. Find your HEM G2.
  12. Go to the bottom of the page for the current HEM G2 and click on "Edit."
  13. Find the "Type" field and select your device handler. (Scroll to the bottom and select "Aeotec HEM G2")
  14. Click on "Update"
  15. Save Changes