So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By Chaotik
#64266 Hi all,

I'm sorry if this question has been asked before but I am a newbie and I'm not sure what to search for in order to see if it has been covered.

I actually have a working setup using a NodeMCU and Blynk to open and close my garage door. However, I haven't been using it since I have an issue. When the NodeMCU is powered off then back on (power failure for example), the relay that is connected to it gets triggered which opens the door.
Of course, I can't take that chance since I don't want the door to open by itself when I'm not around.

What can I do to resolve this ?

This is my sketch :

#define BLYNK_PRINT Serial // Comment this out to disable prints and save space
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "my Blynk token";

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "my wifi ssid";
char pass[] = "my password";

void setup()
{
Serial.begin(9600);
Blynk.begin(auth, ssid, pass);
}

void loop()
{
Blynk.run();
}