Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By Gotham
#80699 Hello! Is my first first time i want to make something with esp8266 and i am very rookie.

"First of all, sorry for my poor English :( "

I want to make something simple (i think).

I want to make a "device" that i can switch a button via phone app from far. Not the same wifi lan. But i dont know what i must buy. I search for esp8266 and i see many many modules etc.

With some words i want:
[list=]
A device to connect in my wifi
One app (i make with appinventor or blynk), with one button*
One relay (when i puss button from my app, relay close the circuit)[/list]

* I dont want the circuit is ON/OFF. I want to close the circuit while i hold the button. If i touch up the button or close the app, the circuit opens again to default position.

==============================================================
PS. I want to make this for one reason, if its allready something please tell me. I have a garage door with a remote control. But i want to open/close from far and i want to add something straight in door circuit. So i want to make the above device and leave in my home that is in area of garage door. So if i press the button of my app, the esp8266 active relay and close the circuit in my remote control switch (like i press it), and the door will open.

Look in skitch

[img]Snip20190221_1.png[/img]
You do not have the required permissions to view the files attached to this post.
User avatar
By DIRR70
#81386 Hello Gotham,

What you need as code is all what is explained in the example ESP8266WebServer->HelloServer. This web Server can have two methods like "/open" and "/close" where you can "digitalWrite" your corresponding pins on and off.

But your main problem is elsewhere. First, you want to connect with your mobile over the internet a device within your local network. This is getting blocked by your router (WAN to LAN), because otherwise all your money would have gone to hackers already ;) So you need to open a port in your router to let the request pass. Very dangerous thing and you need to know what you are doing!

If possible, I strongly would recommend not to do it that way and instead run an AP on your ESP and connect your mobile with that AP...

Also you will have problems to realize functions like "ESP does something AS LONG as I press the button". That would mean you need to do one request after another and each request will turn your relais on only for a very short time and if another request comes in fast enough the relais keeps on. This "dead man's handle" principle will also be the only way to realize an automatic stop if your App gets closed or disconnected...