Pi Outlet Relay Control Using Cayenne




Introduction: Pi Outlet Relay Control Using Cayenne

About: My name is Joao Duarte, and I am an IT Consultant, Electronics enthusiast,Maker and Gamer. I’m from the south of Portugal, and besides of the geek things, I also like fishing, travelling with my wife, sp…

Hey Guys!

My name is João Duarte, I'm an IT Consultant at full time and this is my first instructable :D

Here i'm describing how to build a box where you can plug devices, and with the aid of a Raspberry PI and Cayenne, you can control anything you like from anywhere.

Please let me know if the instructable (or my english) aren't clear enough so I can edit it.

Step 1: Materials That I Used.

  • Raspberry Pi Zero
  • Itead 2x Relay Module
  • 2 European Outlet
  • 6x Wood Frames for Enclosure ( Can’t describe sizes since I found these materials lost in my garage)
  • Jumper Wires
  • 1x Fuse
  • Power Cable
  • Bolts and Nuts

Step 2: Build the Enclosure.

This enclosure was built only using reclyced materials I found around.

  1. Assemble all the frames except the top one with screws.
  2. Drill two holes where you will fix the outlets
  3. Fix the Outlets
  4. Pimp it as you like xD ( I added some supports on the bottom and a puller on the top)

Step 3: Wire IT !

Follow the diagram attached in order to wire everything as it should.

I recommend some extra caution here since the relay will be used to turn on and off devices that uses 230V AC.

Don't forget to check everything before you plug it to the wall, and if you have any questions or doubts please message me before you try it!

Step 4: Build Your Cayenne Dashboard.

Here is where this project gets different from the ones you already saw using Outlets/Relays/Microcontrollers.

I used the Cayenne Dashboard application so I can control the status of my Relays anywhere I am.

A very simple example that I made, was using an Arduino and a DHT11.

I had the Arduino sending a temperature value to my Cayenne Dashboard, and everytime it reached a certain threshold value, it triggered an event to turn my Heater that was connected to my box to "On".

Pretty simple and amazing since you don't need to code anything!

Please go to www.cayenne-mydevices.com so you can get it running on your PI.

Step 5: See It Working!!!

IoT Builders Contest

Participated in the
IoT Builders Contest

1 Person Made This Project!


  • CNC and 3D Printing Contest

    CNC and 3D Printing Contest
  • Puzzles Challenge

    Puzzles Challenge
  • Rice & Grains Challenge

    Rice & Grains Challenge



6 years ago

Nice work my friend i build same box 2 months i will upload image when i back to home


6 years ago

Nicely done, João!

This is a great looking controller and your instructions were very good :)