My Garage Door Opener

Sorry, my mistake.

The hardware is as follows:
esp12 controlling a relay via the virtual button.
The relay connects in parallel with the wall mounted push switch which opens and closes the gate. So either wall mounted push switch or blynk virtual button (ledPin5) can open and close the gate.
The code is as follows
indent preformatted text by 4 spacesCode for button

#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[] =“xxxxxxxxxxxxxxxxxxxxxxxx”;

int ledPin4=4; // assign widget LED to tie with gpio pin 4

int ledPin5=5; // assign widget LED to tie with gpio pin 5

// ======================================================

void setup()
{

Serial.begin(115200);
Blynk.begin(auth, “xxxxxxxxxxxxx”, “xxxxxxxxxxxxxxxxxxxxx”);

pinMode (ledPin4,OUTPUT); // assign ledPin4 as output
pinMode (ledPin5,OUTPUT); // assign ledPin5 as output

}

void loop()
{
Blynk.run();

int led4value = digitalRead (ledPin4); // note digitalRead used although this is output pin.
if (led4value==HIGH){ // if value is HIGH, turn ON virtual LED 4
Blynk.virtualWrite (ledPin4,HIGH); // note syntax is Blynk.virtualWrite
}
else {
Blynk.virtualWrite (ledPin4,LOW);
}

int led5value = digitalRead (ledPin5); // note digitalRead used although this is output pin.
if (led5value==HIGH){ // if value is HIGH, turn ON virtual LED 5
Blynk.virtualWrite (ledPin5,HIGH); // note syntax is Blynk.virtualWrite
}
else {
Blynk.virtualWrite (ledPin5,LOW);
}

Note ledPin4 is not used at all.

Recent changes I made:

  1. Updated to IOS9.3.2 on iphone 6s
  2. Updated to blynk v2.3

Symptoms:

  1. Gate does not open/close when I push virtual button but it’s ok when I push the wall mounted switch. This symptom happens a lot after software upgrade.
  2. Occasionally, gate only open/close after a long delay of approx 10 secs. This symptom is not frequent though. Most of the time, there is no response.

Prior to software upgrade, it was working fine.
Thanks

Hi Dmitriy,
Has this LED bug been fixed?
I’ve downloaded the latest library and app for IOS.
Although it is working, the app keeps blinking ‘ESP8266 is offline’ approx every 3 seconds. I have tried with another ESP and it has the same issue. I downloaded a different program and does not see this blinking issue. My other ESP running a different program also does not have this issue.
Apart from this blinking, the rest seems ok. Both my programs are posted above on Apr 26.
Any ideas?
Thanks.

We don’t have LED issue. LCD is fixed but not yet deployed (it was server side bug). @favstuff I can’t read your code, please use formatting. </>

Also it is better to create separate topic with your problem description as I already lost context.

Sorry, should be LCD. I will post new topic

This project is great! congratulations!
I’ve already set up and it works.
But I wanted to change something. I’m using email notification for my garage door. How do I send alert email only after 5 minutes? As if I forget to close the door.
Can you modify this?

@Andre_Giovanni This is a 3+ year old topic. I think you are on your own for any editing :stuck_out_tongue_winking_eye:

Check out the Documentation and search this forum for other timed email examples. Start experimenting and, if needed, create your own topic with full details of what you are doing, have done and what issues you are running into.

Thanks.

1 Like