Control ESP32 and ESP8266 GPIOs from Anywhere in the World

Поділитися
Вставка
  • Опубліковано 11 лип 2024
  • For complete project details (schematics + source code), visit ► RandomNerdTutorials.com/contr...
    Hosting Account + Free Domain Name ► RandomNerdTutorials.com/blueh...
    Learn how to control your ESP32 or ESP8266 GPIOs from anywhere in the world. This can be very useful to control a relay, a thermostat, or any device remotely. This project is also very versatile, through your cloud dashboard you can easily control more outputs (without uploading new code to your board) and you can even connect multiple boards to your server.
    RELATED PROJECTS:
    Gauges for Cloud Weather Station: RandomNerdTutorials.com/cloud...
    Charts/Plots to Display Sensor Readings: RandomNerdTutorials.com/visua...
    Tables to Display Sensor Readings: RandomNerdTutorials.com/esp32...
    Send Email Notification with PHP: RandomNerdTutorials.com/esp32...
    Like my page on Facebook:
    / randomnerdtutorials
    Follow me on twitter:
    / ruisantosdotme
    Subscribe for more projects like this!
    bit.ly/subscribeRNT
    #ESP32 #ESP8266 #Arduino
  • Наука та технологія

КОМЕНТАРІ • 174

  • @RuiSantosdotme
    @RuiSantosdotme  4 роки тому +12

    You can find the complete project details (schematics + full source code) on my blog ► RandomNerdTutorials.com/control-esp32-esp8266-gpios-from-anywhere/
    For this project, you'll need a hosting account with PHP and MySQL. You can use any hosting provider. I recommend using Bluehost and you can use this link to setup a Hosting Account + Free Domain Name ► RandomNerdTutorials.com/bluehost/

    • @ugopiazza5391
      @ugopiazza5391 4 роки тому +2

      Thanks great video!! Please make a video that show how we can see a esp32cam video streaming in a webserver from anywere
      Thank you sm

    • @AndersJackson
      @AndersJackson 4 роки тому

      Would have used XMPP or MQTT or other message service instead of polling the web server.
      Nicer api to program to. :-)
      XMPP are also better as it has protocols to handle many sources/users to handle the device. And yes, XMPP are secure, so you don't need to handle that in your software.
      Anyways, a cool project.

    • @RuiSantosdotme
      @RuiSantosdotme  4 роки тому +2

      @@AndersJackson I know and in the future, I'll show a very similar project with MQTT in the cloud (running your own broker). I know that a lot of my readers/viewers already have hosting accounts that have PHP+MySQL and with that setup that's only way of controlling the ESP outputs.

    • @RuiSantosdotme
      @RuiSantosdotme  4 роки тому +1

      @@ugopiazza5391 Thanks for the project suggestion! I definitely have something like that planned

    • @patjohn775
      @patjohn775 3 роки тому

      If you were going to setup a wifi relay device for your dad that needs controlled from internet (not local) what would you use? Blynk and auto connect? That’s what looks populat

  • @Excalibur32
    @Excalibur32 Рік тому +3

    This is precisely the type of tutorial I was looking for. Thank you so much.

  • @Southghost5997
    @Southghost5997 2 місяці тому

    Always enjoy your tutorials!

  • @PeterMisovicProfile
    @PeterMisovicProfile 3 роки тому

    Thank you for your videos, worth to follow!

  • @karbalanetwork110
    @karbalanetwork110 3 роки тому

    Thanks buddy for the push❤

  • @peetariki342
    @peetariki342 4 роки тому

    Thank a lot bro! I was waiting for this.

  • @ibefilmin
    @ibefilmin Рік тому +2

    Exactly what I needed to know. I owe you one Mr Santos!

  • @CrazyEngineerAmit
    @CrazyEngineerAmit Місяць тому +1

    Nice project 👍👍 it's working well

  • @woolfy02
    @woolfy02 Рік тому

    Really cool project!

  • @stevemiller995
    @stevemiller995 4 роки тому +7

    Happy to see your new posting. Thank You. I have watched "all" your videos and have studied your examples prtaining to the ESP8266 and/or ESP32. I knew little before I found your videos. Now, I have a remote weather station web server in my chicken coop... and am working towards bigger things with far more data to manage, transmit, manage some more, view and control the Arduino "pins" or "settings" remotely. I would not be where I am without your help. Glad to see this new post.

    • @RuiSantosdotme
      @RuiSantosdotme  4 роки тому +3

      I'm glad you found it helpful Steve! Thanks for following my projects

    • @aofddofa6661
      @aofddofa6661 4 роки тому

      @@RuiSantosdotme me too ... exact story >> no i can remotely start my engine :)
      thanks to you Rui

  • @RickB3n
    @RickB3n 4 роки тому +1

    Great tutorial, thank you. After i created my website with WordPress, i have another four empty mysql database form my hosting. And your project is perfect for this. Greetings from your italian fan.

    • @RuiSantosdotme
      @RuiSantosdotme  4 роки тому

      Thanks for following! I'm glad you found an application using this project!

  • @colinrogers9927
    @colinrogers9927 3 роки тому +1

    This is really cool. I would like to learn how to use this same technique to turn on and off a small servo motor. Do you have any tutorials on that?

  • @mareksukup9592
    @mareksukup9592 4 роки тому

    Nice!!!! Thank you for this example project

    • @RuiSantosdotme
      @RuiSantosdotme  4 роки тому

      You're welcome! Thanks for watching, I'm glad you found it helpful

  • @hectorquintero6594
    @hectorquintero6594 3 роки тому

    Thank you very much
    This helped me a lot

  • @contactkiller7466
    @contactkiller7466 5 місяців тому

    Amazing explanation that you have gave in the video this is really helpful for me

  • @r.muruganr.murugan1101
    @r.muruganr.murugan1101 2 роки тому

    It is very good project it is working fine same like you can upload esp8266-01 with atmega328 same like database webserver from anywhere thank you for your good project

  • @brunowolfpack6767
    @brunowolfpack6767 2 роки тому

    Top ! Valeu ! Muito bom seu blog !

  • @shakerileiwat4341
    @shakerileiwat4341 4 роки тому

    Awesome project , love you man

  • @ticmania2361
    @ticmania2361 4 роки тому +1

    Muito bom. Parabéns pelo excelente trabalho.

  • @AhmedElWakil7
    @AhmedElWakil7 3 роки тому +1

    thank you for this video i was highly waited for
    i have question regarding can i combine this method with the local server u did in other videos? so it will be a lot faster on local network & can be remotely controlled
    thank you in advance

  • @cizainnocent8392
    @cizainnocent8392 2 роки тому

    This is a nice project. Thank you so much.
    Could do you please make it simple by using one ESP board and fixed pins to control Relays from anywhere over the internet?

  • @FilmFactry
    @FilmFactry 4 роки тому +3

    Such great stuff. It amazes me how cheap these things are and how useful. I'm using several on a Robot project!

    • @RuiSantosdotme
      @RuiSantosdotme  4 роки тому +1

      I feel the same, there are endless of possibilities with these inexpensive sensors and boards.

    • @Mystical-TEDDY_
      @Mystical-TEDDY_ Рік тому

      same here lol

  • @sirisaacnewtonsc
    @sirisaacnewtonsc 4 роки тому

    Great video, thanks a lot for sharing your knowledge.

  • @Minecraftg080
    @Minecraftg080 3 роки тому

    Thank you for this video!! What if I want to change it to a momentary switch instead of a toggle switch?

  • @PenuDjira
    @PenuDjira 2 роки тому

    Oh Brother. Thank you So Much

  • @penampal
    @penampal 11 місяців тому

    Terimakasih banyak tuan 🎉🎉🎉

  • @yp4577
    @yp4577 Рік тому

    Very cool project. Does it also work with the ESP32 camera module?

  • @megatrong8161
    @megatrong8161 4 роки тому

    Great detail video! Does this works for only local? Using ip address...thanks

  • @hattabunan
    @hattabunan Рік тому

    nice video sir,
    regarding your video
    Can the tutorial be implemented on stepper motors too? Thank You

  • @yawarsaeed6499
    @yawarsaeed6499 4 роки тому +1

    Thanks for sharing such an awesome project. Can you please add Physical Push Button Switches to the existing project with Status feedback in order to use the same functionality in absence of internet connectivity. Awaiting your earliest response.

  • @IOTechBugs
    @IOTechBugs 4 роки тому +1

    We can use mqtt also right.. more robust and reliable way for peer to peer communication

  • @GizmoGuy620
    @GizmoGuy620 2 роки тому

    Great project! I was wondering if I can access the ESP8266 remotely away from my home WIFI network? Possibly as a server with it's own IP? Any help in this area would be helpful.

  • @rafaelestevao8140
    @rafaelestevao8140 Рік тому

    Good afternoon!
    Can you put a physical button and the state of the button change on the site, in this project?

  • @sinazenaliy3044
    @sinazenaliy3044 3 роки тому

    Hi, I had a question. Do you know a resource for html training that uses esp? Thanks

  • @javierpallalorden
    @javierpallalorden 3 роки тому

    Excellent

  • @tecnovlogger
    @tecnovlogger 4 роки тому

    Great project

  • @ehsanerfanian8693
    @ehsanerfanian8693 2 роки тому

    you are really awesome :)))))))

  • @rasmusjansson751
    @rasmusjansson751 5 місяців тому

    Great project man! I know it was some time ago you did this, but I have a small issue. Everything works, BUT it taking my ESP-board 45-60min to "see" that the JSON have been changed. If I go to the web-page an look at the string I get for example {"4":"0","2":"0"}, then on the "output control page server " I change the button to "ON", then go to the web-page the ESP-board looking to again, and the string itself updates directly to {"4":"1","2":"0"}, but also having an eye to the seriell monitor and that one keep repeating the "JSON object = {"4":"0","2":"0"}
    " for like 60min and then from nowhere it change to "JSON object = {"4":"1","2":"0","53":"0"}" and turn on my led
    . It seems not doing this randomly, but mirror the button position, but it takes 60min. Any thoughts what the issue could be?

  • @karaday
    @karaday 2 роки тому

    does this same method of a get requests every second is followed by Big Giants like ewelink, sonoff switches?

  • @angelarmandoolveragonzalez8124

    Hello, I really like your videos and they have helped me a lot. I have learned a lot with your videos. But could you make one using an ultrasonic sensor, an ESP8266 and some distance away that triggers an alarm and pops up an alert or something please. it would help me a lot

  • @atlaskaiser9951
    @atlaskaiser9951 2 роки тому

    in minute 1:47 what software did you use to display that schematic?

  • @petechnology2775
    @petechnology2775 3 роки тому +1

    Good morning sir,
    I very glad to see this project,
    I perform this project and it ran very well,
    But sir can you make this same project with two way communication,
    Plz sir make same project with two way communication,(physical button remote side feed back from )

  • @bazneshastegi_matlub
    @bazneshastegi_matlub Рік тому

    Dear rui
    I have a question
    why after too many pages in english in your site
    you use tts ?

  • @amir_eshaqy
    @amir_eshaqy 2 роки тому

    Can the recorded image from (esp32-cam) be displayed globally? Like this video where outputs can be controlled from anywhere in the world
    thank you

  • @Hennesii
    @Hennesii 4 роки тому +1

    Hi! I am trying to control an ESP8266 based modified car, from my PC. I want the car to connect to the building Wifi and I want to connect to the car from my PC via IP address or Mac address. is this possible? Could you help me please? I'm new to arduino

  • @penampal
    @penampal 11 місяців тому

    Thankyou sir. i want to change button size. which part of .php can I edit?

  • @Noobgirl9
    @Noobgirl9 3 роки тому

    Your explanation is the best in the world. I learn alot from you. Many people in youtube just copy paste without explanation. Thank you. Wish to see and learn more from you.. 💖

  • @mas11ful
    @mas11ful 5 місяців тому

    I have a patent on a train car,. I want to control the motor from my IPhone and want to see speed and current on the display. I also want to be able to load the webpage directly from the esp32. Will your book show how to do this?

  • @KPDMadhuka
    @KPDMadhuka 2 роки тому

    Thanks Rui, please explain how to add SSL encrypted web address as the server name

  • @tookieasd
    @tookieasd 12 днів тому

    Hi 😊. it works the other way around, when turned ON on website it means its turned off on my esp where can i change it ?

  • @felixzhu7064
    @felixzhu7064 3 роки тому

    Can you build smart timer using ESP8266 with the interval that can be control over internet?

  • @iiitantech5635
    @iiitantech5635 3 роки тому +1

    Can we use esp32cam like this. I want connect esp32cam for live streaming and photos from anywhere. Like this I want to make a html page for live streaming and capture pic. Please make a video and create a html page and write mysql script and connect esp32cam with web.

  • @cameronlucas6004
    @cameronlucas6004 2 роки тому

    I would like to send messages to a display. Is this possible using the same idea in video?

  • @ahmedlz9495
    @ahmedlz9495 Місяць тому

    what if i only need a push botton that means the LED will only lit when i hit the push bottom...do i still need the database ?

  • @petechnology8382
    @petechnology8382 3 роки тому +1

    Plz sir make same project for two communication,
    Means control light from computer as well as from physical button with live status

  • @f0xvibes
    @f0xvibes Рік тому

    is it posible to shutdown the wlan access point, after a gpio was switch one time? i dont want the wlan beeing visible after gpio was switched. it would also be usefull for me if the AP is only visible for 30 seconds after reboot esp, when no gpio switched it should power of the AP. Is this all possible with esp?

  • @Mystical-TEDDY_
    @Mystical-TEDDY_ Рік тому +1

    Can this only work with HTTP websites and not HTTPS?

  • @jithin7822
    @jithin7822 4 роки тому

    Can u tell me how to view the video from esp32 cam board from anywhere in the world...

  • @NishantjonyJaiswal
    @NishantjonyJaiswal 4 роки тому

    Very Nice.

  • @johnpauldavid9626
    @johnpauldavid9626 3 роки тому

    Hi! Can i ask if how many module can handle esp 32 is?

  • @khalillachraf5175
    @khalillachraf5175 Рік тому

    Amazing work could make code for ttgo t call esp32 sim 800l with GPRS please and thank you

  • @MadeniTurkey
    @MadeniTurkey 4 роки тому

    Hello Ruis great video, greetings from Belgium, is it possible to make a video
    with the ESP32Cam with video and remote control of devices like relay or lights
    so you can see remotely if the device works like a garage-door opening on your remote camera at the same time

    • @RuiSantosdotme
      @RuiSantosdotme  4 роки тому +2

      I have something like that planned, but I still need to complete some parts of that project. Thanks for the suggestion!

  • @yawarabbas9228
    @yawarabbas9228 Рік тому

    Plz guide me I want to control my office AC from my home so before going to office I can on it and when I reached office it already cooled down the office room.

  • @sandryseibert
    @sandryseibert 3 роки тому

    Something really annoying is happening on my controller. For some reason it's turning ON and OFF without me doing anything. Currently I'm just playing with it on a local network, I have not mapped the port to the internet, so something on my network is frequently accessing the ON or OFF link, or the ESP32 is doing that alone.

  • @computerhouse9979
    @computerhouse9979 2 роки тому

    Sir how to control this from any way if I'm far from my network is not working so what setting we used to operate from any way

  • @falahoudinesaid6973
    @falahoudinesaid6973 3 роки тому

    Nice project but sir this can i controle any whare am i ?? Or just local area ?

  • @JonCherba
    @JonCherba 2 роки тому

    Will this work with an arduino mega as well?

  • @nikhilsahani2000
    @nikhilsahani2000 4 роки тому

    awesome

  • @yojithkr17
    @yojithkr17 Рік тому

    Will this work with esp01?

  • @bukanultraman789
    @bukanultraman789 4 місяці тому

    How many led we can handle with this controller?

  • @mrxfin
    @mrxfin 2 роки тому

    Hi, any server side tutorial?

  • @negrowoki6590
    @negrowoki6590 3 роки тому +4

    Thanks for this video... I have a question... Is there any way to control the ESP8266 via internet without using DB, i.e connect the web page to the board directly?

    • @jeevannikam8977
      @jeevannikam8977 2 роки тому

      you can use AWS things and shadows, it provides you the direct connection in between nodeMCU and your app.

  • @Fixec
    @Fixec 4 роки тому

    Can you show us how to make multi user server please. With private devices

  • @wei48221
    @wei48221 4 роки тому

    Nice.

  • @Dhruvstar_4
    @Dhruvstar_4 7 місяців тому

    How did everyone make the website?

  • @dwalden74
    @dwalden74 3 роки тому

    What is the difference between WiFi.softAP() and WiFi.begin()? The Arduino ESP examples all use WiFi.begin(), but only WiFi.softAP() works for me :((

  • @piuselectronics5707
    @piuselectronics5707 3 роки тому

    Can this work with I2C

  • @dienau6313
    @dienau6313 Рік тому

    is there any webserver free in this project?

  • @AirmaxPneumaticsLTD
    @AirmaxPneumaticsLTD 4 роки тому

    can i use Google firbass

  • @maxid87
    @maxid87 4 роки тому +1

    Sounds like M2M protocols like MQTT would be a better fit than using http get requests

  • @Dwi.P4
    @Dwi.P4 10 місяців тому

    Can use only esp8266 sir?

  • @Dhruvstar_4
    @Dhruvstar_4 7 місяців тому

    Is this Port fowarding?

  • @quickfixengineeringltd8035
    @quickfixengineeringltd8035 3 роки тому

    Hello.
    Please answer this quickly.
    Can't I use google drive to create the database. Anyone can show me how to do that

  • @LUCKY007725
    @LUCKY007725 3 роки тому

    Nice job
    Why not to make an app which can connect to devices instead of using domain name...
    And also can we make the view looks like blynk app...

  • @vasurangpariya8492
    @vasurangpariya8492 3 роки тому

    How can i control my projects over internet without blynk or any app

  • @rodo19724
    @rodo19724 2 роки тому

    Seasons greetings from Argentina !!. I need help. I used your project ESP32-web-server-microsd-card, i made a web page , all files are on the SD, and Would like to send, from a text area + a "send" button, and send a string to the esp32, and then, sp32 will receive that string , just that, text area or form, and a send button, receive the string on the esp32, and do something with that string, like """if string== ''lights out" do something. I hope you understand.v Thank you !!!

  • @Mystical-TEDDY_
    @Mystical-TEDDY_ Рік тому +1

    @RuiSantosdotme I pasted in all of the php files and replaced the value in "esp-database.php" with the values of my Database but Instead of "esp-outputs.php" displaying, it just says "Connection failed: No such file or directory". I was looking at the code of that file and when I removed the initial php code block, the html portion of it showed. So IK it has something to do with that. Idk if there's any other bits of code I'm missing or if there is something p with my database. If anyone else knows whatsup some help would be appreciated

    • @Mystical-TEDDY_
      @Mystical-TEDDY_ Рік тому +1

      I was using InfinityFree for teh hosting and I read that they don't allow Javascript on the back end so I think that had something to do with it

  • @fvgoya
    @fvgoya 4 роки тому

    Like before watch...

  • @ABCshake
    @ABCshake Рік тому

    Paying for hosting and a domain name can be expensive. Using port forwarding using ngrok or using a cloud solution with blynk would be a cheaper option.

  • @comic-typ5919
    @comic-typ5919 6 місяців тому

    wooah he IS rui santos D:

  • @RaptorRotorHead
    @RaptorRotorHead 2 роки тому +1

    If you have your own Web server and write scripts one does not need iot cloud, is that a fair statement?

    • @noweare1
      @noweare1 Рік тому

      Yes, you mean the esp32 acting as a server ?

    • @RaptorRotorHead
      @RaptorRotorHead Рік тому

      @@noweare1 desp transmits to the wireless in my house and that transmits to my server where I have scripts running that can decode information and display it on a web page that can be read on any phone that runs a web browser

  • @carlos.galhano
    @carlos.galhano Рік тому

    Como posso saber o SSD e o IP?

  • @yojithkr17
    @yojithkr17 Рік тому

    Does ESP8266 need internet connection?

  • @osamadz5884
    @osamadz5884 4 роки тому

    Great work dude

    • @ozzloy
      @ozzloy 4 роки тому +1

      looks like fritzing

    • @osamadz5884
      @osamadz5884 4 роки тому

      @@ozzloy ok ty

    • @RuiSantosdotme
      @RuiSantosdotme  4 роки тому

      Yes, I've used Fritzing and for the project overview I've used Photoshop + Powerpoint

    • @osamadz5884
      @osamadz5884 4 роки тому

      @@RuiSantosdotme ok ty

  • @Fitboy_hubli
    @Fitboy_hubli 3 роки тому

    Dear sir, Make a flight controller from with esp32 development board to controller drone from wifi.

  • @Mystical-TEDDY_
    @Mystical-TEDDY_ Рік тому +1

    Some please help! I keep getting this error message in my ESP32's Serial Monitor
    Parsing input failed!
    HTTP Response code: 400
    400 The plain HTTP request was sent to HTTPS port
    400 Bad Request
    The plain HTTP request was sent to HTTPS port
    openresty
    I made sure all of the files are correct and every variable is set how its supposed to. I am however using 000webhost for the webserver. Does anyone know why specifically this is happening?

    • @Mystical-TEDDY_
      @Mystical-TEDDY_ Рік тому

      It looks like it not meant to be used on an https site? But is this really only limited to that? I can't find any information on this topic.

  • @heikosoeder
    @heikosoeder 4 роки тому

    Vpn and u can controll the relay too and save.

  • @carlos.galhano
    @carlos.galhano Рік тому

    Era interessante um projeto mais prático, por exemplo o que refere sobre temperatura e humidade. Era melhor do que colocar um simples led a ligar. E já agora, fazer os vídeos com mais calma para quem está nos primeiros passos, pois é difícil acompanhar.

  • @nilesh168
    @nilesh168 11 місяців тому

    very informative project. I tried this but i am not able to control led as mentioned. I tried hardcoding led and state still it is not going through. I am using ESP8266 only one board. i tried board with 0,1,2 all options still not able to control led.

    • @nilesh168
      @nilesh168 11 місяців тому

      i got the issue. Digitalwrite needs integer input and it is taking number from input as we add more led. Issue is if i pass only number to digitalwrite it is not taking respective D2 or D4 as per code. i tried to hardcode D2 and D4 as int and passed to digitalwrite it worked. Now how i can convert input from database 2 4 and pass to digitalwrite as D2/D4

    • @nilesh168
      @nilesh168 11 місяців тому

      No need to concat D with number. Use below standard for nodemcu static const uint8_t D0 = 16;
      static const uint8_t D1 = 5;
      static const uint8_t D2 = 4;
      static const uint8_t D3 = 0;
      static const uint8_t D4 = 2;
      static const uint8_t D5 = 14;
      static const uint8_t D6 = 12;
      static const uint8_t D7 = 13;
      static const uint8_t D8 = 15;
      static const uint8_t D9 = 3;
      static const uint8_t D10 = 1;

  • @kingarttychannel6805
    @kingarttychannel6805 Рік тому

    help me need to add button - ESP32/ESP8266 Web Server HTTP Authentication (Username and Password Protected)