I had previously completed a similar project using Blynk, so I thought it would be good to upgrade my project and try Cayenne.
In this project, we will use an ESP8266 with Cayenne to control a Garage Door Opener. I also use OpenHab Home Automation and included MQTT to be useful with that.
I haven’t been able to get the Fake “light” to indicate if the Garage Door is open just yet.
What’s Connected
ESP8266
Relay
DHT22/AM2303 Temperature & Humidity Sensor
GL5537 Light Sensor
Active Buzzer
Triggers & Alerts
I use a trigger to create the same functionality as a momentary switch would.
Thanks for sharing this project with us. You’ll probably be excited to hear, if you hadn’t gathered it already from this community, that we’ll be launching an MQTT API in the next month or so, so you should soon be able to do even that part through Cayenne as well.
This looks great. I’m doing something similar but didn’t have somewhere to connect the relay, so have done something to record and replay RF codes (the focus is on replaying codes all the time). You can record your garage codes (to a file), then replay them as needed. Info is on the project here: GitHub - sillyfrog/RFreplayESP: Record and replay RF433Mhz signals on an ESP8266, using the Arduino IDE.
Maybe useful for others in the same situation looking to do something similar.
Cheers!
Great work, thanks for sharing with us. Just a question: how can you menage the 5V relay with the esp8266 NodeMCU that have only 3v3? I can’t see this connection from the photos you posted.
I have this one “tinxi® NodeMCU Lua WIFI Internet Development Board”(this is the uk amazon link, https://goo.gl/44m9lv ) that have Vin pin like yours (as I can see in the first photo of your project) but I supposed it can be used only as IN and not OUT. I was wrong?
It should be connected to the USB 5v. The easiest way to be sure is hook up a multi-meter and see if it reads 5vdc. I would say you should be fine to use it though.
Hey, thank you for putting this together. This was my first project of DIY programming. To keep things simple I left out MQTT, the buzzer, humidity sensors, etc… But I did add in a 3rd channel to trigger our gate open/close. Would like to improve it some and eventually work with Siri / Ok Google and/or bypass the web as a backup in case internet is down. I can check status with a camera, but that’s also not ideal.
I can’t find the libraries you used. so I can’t configure my NodeMCU v3. I thought I found them but it errors out.
you are missing the extra item for the buzzer. the N thing
This site doesn’t seem to support the nodemcu so you can’t setup your account easily.
I found thread here on how to add the unsupported NodeMCU but when I added a relay it screwed up my NodeMCU so now it boots up, connects, and then crashes. Since it doesn’t stay connected I can’t seem to fix it. Says it is offline.
There are a bunch of project on here but it seems odd I can’t configure my devices to use the “project”. Instead it seems like a manual process using directions on another site? I’d think I could clone your project and push it to my device.
int lightPin = 0; //define a pin for Photo resistor
(The ESP8266 only has one Analog pin 0)
Oddly, it looks like my website was stripping out “0” from some of the entries such as the lightPin. I’ve gone in and edited that. Which sketch are you using: MQTT or non-MQTT? I can get you a link to the actual sketch.
Which libraries do you have installed and which can’t you find, I will help you track them the missing libraries.
When I originally created this project, Cayenne required the Blynk library, but it looks like Cayenne now has their own.
I’ll see if I have an extra ESP8266 around so I can create a new version of the sketch using the Cayenne Arduino library.
It should still work with the Blynk Libraries, as my sketch is still running on that ESP8266 controlling the garage door.
Can you post a closeup picture of how your relay is wired?
Some of the relays have options for Normally Open and Normally Closed.
Sounds like you are very close to getting this working!
// Generally, you should use "unsigned long" for variables that hold time
unsigned long previousMillis = 0;
unsigned long lastTempUpdate = 0;
const long interval = 5000;