Relay Board for Garage

Hey guys, so i'm busy with a project, using a Wemos D1m= mini and a 5V relay with my garage to be able to actuate the garage opening and closing with my phone via Blynk. Everything is working 100% except for the fact that, as soon as I give my relay power, my garage automatically actuates, so to put this issue into perspective: What happens if there is loadsheading, and when the power comes on, the garage randomly opens. Obviously I will get notified, but what is the use of all of this, if the garage will randomly open and/or close when power is supplied for the first time?

Anyways, I guess i'm asking if anyone can maybe give me a little advice as to how to solve this issue.

Thanks a million!!!!

Hello atraverso2001,
Welcome to the Arduino fora. I and the other people here want to help you but to do that we need certain bits of information. Without the correct information it is difficult or impossible to give you the help and advice you need. To help us to help you please read General guidance andHow to use this forum and provide the information asked for. Being new here you might think this is asking too much or having rules for the sake of rules, that is not the case. If you don’t follow the guidelines all that happens is there is a long exchange of message while we try to get you to tell us what we need in order to help you, this is frustrating for you and frustrating for us.

Common mistakes for people posting here the first time:
Code problems:
Not posting any code while expecting us to work out what is wrong with your code; we are not telepathic and can only find problems in code we can see.
Posting a snippet of code in the belief that the problem is in the code snippet. It is almost always the case that the problem is not where you think it is but elsewhere in the code, hence we need all the code.
Not correctly formatting code. Before posting code use Tools / auto format at the top of the IDE, or use control T. Once you’ve done that use edit / copy for forum.
Posting code without code tags (</>), these are explained in the instructions linked to above. Using code tags makes the code easier to read. Not using code tags means some of the code gets interpreted as HTML with the result that it is displayed with smiley faces and other stuff that should not be there.
Asking for complete code; we are not here to write code for you, we are here to help you if you get stuck writing code yourself. If you really want someone to write code for you please click on ‘report to moderator’ and ask them to move this to ‘Gigs and Collaborations’ and indicate how much you are willing to pay.

Schematics:
The language of electronics is a schematic or circuit diagram. Long descriptions of what is connected to what are generally useless. A schematic is a drawing of what connects to what, please make one and photograph it. We don’t mind if it’s hand drawn, scruffy and does not use the correct symbols. We do mind if you don’t at least try to post a schematic. Please read How to post an image

Questions:
Not being clear about what is being asked, for example not asking a question at all or asking a vague question like ‘please help’ or some such thing.

About us:
Those of us answering questions have a wide variety of backgrounds and electronics knowledge, some though working in electronics, some through electronics as a hobby, some both. Most of us are not trained as teachers so probably miss the finer points of how to teach and explain things effectively. We are not, with the odd exception, employees or representatives of Arduino.
Please also remember we are volunteers doing this for free in our spare time and are more inclined to help people who make it easy for us to provide help by providing the information we ask for.

About you:
We only know about you what you tell us; we need to know your level of experience with electronics or microcontrollers, if we don’t know then we can’t tailor our answer to your level of knowledge. We also don’t know if you have problems with English or language or communications in general unless you tell us. We can be sympathetic about problems we know about, but if you don’t tell us we don’t know.

Thank you.

The correct logic level must be given to the relay input as soon as possible in the setup() section of the code.
Correct level could mean different things for different relay boards.
That's why we need all the details, links to parts, code, and a wiring diagram.

Sometimes you must first set the pin to INPUT_PULLUP before you set the pin to OUTPUT.

pinMode(relayPin, INPUT_PULLUP);
pinMode(relayPin, OUTPUT);

Leo..