About This Project
Hi. This is my first time using Cayenne and my first project made with it. I made my Raspberry Pi (3) control a LED desk lamp through a relay.
This doesn’t have to be with a lamp. It can be with pretty much anything electrical.
EDIT: I should also note that working with high voltages can be deadly. Make sure you wire everything with the power OFF. Also, make sure your wires aren’t touching anything flammable and don’t short with each other. Please be responsible!
- Raspberry Pi 3
- 2 Relay Module
- Some wires
- Cayenne app
Connection picture: http://imgur.com/a/vtjSU
- GND on raspberry pi <> GND on relay
- 5v on raspberrey pi <> VCC on relay
- GPIO13 on raspberry pi <> IN1 on relay
- COM on relay <> 1 hotwire from 120VAC
- NO or NC on relay <> 1 wire from lamp
- Other hotwire from 120VAC <> other wire from lamp
You can plug one wire from the lamp into NC or NO (Normally Closed, Normally Open). It doesn’t really matter. All it means is you have to check the invert switch in the settings of the Cayenne app. In my case, I plugged it into normally closed (as in it is always on) because the screw got stripped for my NO gate :/.
Triggers & Alerts
No triggers or Alerts were needed.
Scheduling is not needed.
Photos of the Project
My Final Thoughts
I had a fun experience using Cayenne. There is so much potential that is possible. If I could add one thing, it would be the ability to run python commands from Cayenne. I can’t wait to see what they come up with in the future.