Introduction: Integrate Peanut Plug With SmartThings Hub

The aim of this tutorial is to help SmartThings Hub users set
up their Peanut Plug with their SmartThings Hub.

The Peanut Plug is a Zigbee based smart plug with power
monitoring capabilities. It can be plugged into a standard wall outlet and used to turn on and off your devices when hooked up to a smart-hub like Samsung’s SmartThings. Unfortunately, the SmartThings Hub doesn’t natively support the Peanut Plug out of the box. Luckily, a little bit of modification to the software will seamlessly bring the plug online and the procedure to get you there will hopefully be but a distant memory.

I picked up four of these on Black Friday 2018 for ~$10 each and it seems that the great price (most smart plugs range from $24-45) has remained at $10 as of December.

I imagine plenty of other SmartThings Hub users are going to have the same issues I had right out of the box due to the fantastic price.

This tutorial aims to take you from this “Thing” to a Peanut Plug with ON/OFF and (possibly) power monitoring functionality depending on the firmware release of the plug.

Step 1: Pairing

You will need to sync your Peanut Plug with the SmartThings Hub using your SmartThings application. There are plenty of tutorials on how to do this online so I will mull over this.

This is the same procedure you’d do with any other device. There are two buttons on the Peanut Plug; a large button for power and a smaller button with a radio signal symbol. hold the radio button for ~10 seconds and it should begin to flash when you release the button. Go into pairing mode with the SmartThings Application. The plug will show up as a “Thing” – go ahead and click on it to set it up. You will see a “Thing” and a shopping cart and not much else as it can’t do anything yet.

Step 2: Smart Things Groovy IDE

You will need to visit SmartThings Groovy IDE. This is the portal where we will change our Thing into a Peanut Plug!

Set up an account with SmartThings Groovy IDE. Use a desktop/laptop computer for this step as I found the mobile interface to lack options. Visit the SmartThings IDE webpage and scroll to the bottom, choosing Log In to get started. Use your Samsung or SmartThings Account (whichever one your hub is associated with). Select for the IDE to be linked to your hub if they ask.

Step 3: My Device Handlers

Go to “My Device Handlers,” and click on the “+Create New Device Handler”
button.

Choose “From Code” tab and paste the raw text code found here in the space below. (Thanks to parkmanwg for writing the code!)

For more info on the code used go here.

Choose Create to complete this step

Step 4: Create Peanut Plug Device

Now under Device Handlers, you should have a new device, the Peanut Plug.

Step 5: Thing to Peanut Plug

Now click on My Devices and scroll down to the hyperlink for
the Thing. Click on it!

Scroll to the bottom of the page and choose Edit

Step 6: Edit Thing

Scroll down to where it says Type*

Under Type* you will see your device listed as a Thing.

Click on the dropdown and choose Peanut Plug. For me, the Peanut Plug is the last option (it was not alphabetical). Choose Update to complete the action.

Now, in your application, you will see the Peanut Plug as adevice with on/off and power monitoring capabilities.

Step 7: The Next Pairing

In my anecdotal experience, subsequent Peanut Plug pairings
were identified as Peanut Plugs rather than Things. This is great news as, hopefully, you too will not need to go back into the IDE portal to reassign the Peanut Plug for each Peanut device.

You can now use the device like any other smart plug. I renamed each of mine to reflect each device plugged into the each Peanut. I have my Christmas Tree, two strings of C9 christmas lights, and a small tree all paired so that I can say, "Alexa, turn on the Christmas Magic" and all 4 turn on. My wife loves it!

Side note, there is a great deal of discussion about the power monitoring feature and how the firmware needs to be updated by another device. This tutorial did not cover it as I don’t have access to the other device to try it out, however, my new Peanut Plugs do seem to have this feature enabled. It isn’t really what I wanted the device for so I have not investigated the performance of this feature.

I hope you enjoyed this tutorial. Let me know if you have any constructive criticism in the comments.