Control ESP32 and ESP8266 GPIOs from Anywhere in the World

Поделиться
HTML-код
  • Опубликовано: 13 июл 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!

  • @peetariki342
    @peetariki342 4 года назад

    Thank a lot bro! I was waiting for this.

  • @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

  • @ibefilmin
    @ibefilmin Год назад +2

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

  • @karbalanetwork110
    @karbalanetwork110 3 года назад

    Thanks buddy for the push❤

  • @CrazyEngineerAmit
    @CrazyEngineerAmit 2 месяца назад +1

    Nice project 👍👍 it's working well

  • @woolfy02
    @woolfy02 Год назад

    Really cool 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?

  • @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!

  • @brunowolfpack6767
    @brunowolfpack6767 2 года назад

    Top ! Valeu ! Muito bom seu blog !

  • @ticmania2361
    @ticmania2361 4 года назад +1

    Muito bom. Parabéns pelo excelente trabalho.

  • @hectorquintero6594
    @hectorquintero6594 3 года назад

    Thank you very much
    This helped me a lot

  • @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

  • @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

  • @contactkiller7466
    @contactkiller7466 5 месяцев назад

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

  • @shakerileiwat4341
    @shakerileiwat4341 4 года назад

    Awesome project , love you man

  • @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

  • @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

  • @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?

  • @sirisaacnewtonsc
    @sirisaacnewtonsc 4 года назад

    Great video, thanks a lot for sharing your knowledge.

  • @yp4577
    @yp4577 Год назад

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

  • @penampal
    @penampal 11 месяцев назад

    Terimakasih banyak tuan 🎉🎉🎉

  • @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

  • @megatrong8161
    @megatrong8161 4 года назад

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

  • @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

  • @javierpallalorden
    @javierpallalorden 3 года назад

    Excellent

  • @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.

  • @ehsanerfanian8693
    @ehsanerfanian8693 2 года назад

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

  • @hattabunan
    @hattabunan Год назад

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

  • @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

  • @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 )

  • @tecnovlogger
    @tecnovlogger 4 года назад

    Great project

  • @rafaelestevao8140
    @rafaelestevao8140 Год назад

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

  • @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.. 💖

  • @sinazenaliy3044
    @sinazenaliy3044 3 года назад

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

  • @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

  • @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!

  • @atlaskaiser9951
    @atlaskaiser9951 2 года назад

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

  • @karaday
    @karaday 2 года назад

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

  • @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

  • @bazneshastegi_matlub
    @bazneshastegi_matlub Год назад

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

  • @NishantjonyJaiswal
    @NishantjonyJaiswal 4 года назад

    Very Nice.

  • @KPDMadhuka
    @KPDMadhuka 2 года назад

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

  • @felixzhu7064
    @felixzhu7064 3 года назад

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

  • @penampal
    @penampal 11 месяцев назад

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

  • @nikhilsahani2000
    @nikhilsahani2000 4 года назад

    awesome

  • @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.

  • @fvgoya
    @fvgoya 4 года назад

    Like before watch...

  • @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?

  • @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

  • @cameronlucas6004
    @cameronlucas6004 2 года назад

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

  • @jithin7822
    @jithin7822 4 года назад

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

  • @maxid87
    @maxid87 4 года назад +1

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

  • @tookieasd
    @tookieasd 14 дней назад

    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 ?

  • @falahoudinesaid6973
    @falahoudinesaid6973 3 года назад

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

  • @ahmedlz9495
    @ahmedlz9495 2 месяца назад

    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 ?

  • @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

  • @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?

  • @wei48221
    @wei48221 4 года назад

    Nice.

  • @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?

  • @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

  • @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.

  • @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

  • @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...

  • @Fixec
    @Fixec 4 года назад

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

  • @mrxfin
    @mrxfin 2 года назад

    Hi, any server side tutorial?

  • @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.

  • @Mystical-TEDDY_
    @Mystical-TEDDY_ Год назад +1

    Can this only work with HTTP websites and not HTTPS?

  • @JonCherba
    @JonCherba 2 года назад

    Will this work with an arduino mega as well?

  • @bukanultraman789
    @bukanultraman789 4 месяца назад

    How many led we can handle with this controller?

  • @piuselectronics5707
    @piuselectronics5707 3 года назад

    Can this work with I2C

  • @yojithkr17
    @yojithkr17 Год назад

    Will this work with esp01?

  • @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 :((

  • @AirmaxPneumaticsLTD
    @AirmaxPneumaticsLTD 4 года назад

    can i use Google firbass

  • @Fitboy_hubli
    @Fitboy_hubli 3 года назад

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

  • @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

  • @vasurangpariya8492
    @vasurangpariya8492 3 года назад

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

  • @comic-typ5919
    @comic-typ5919 6 месяцев назад

    wooah he IS rui santos D:

  • @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

  • @dienau6313
    @dienau6313 Год назад

    is there any webserver free in this project?

  • @Dhruvstar_4
    @Dhruvstar_4 7 месяцев назад

    Is this Port fowarding?

  • @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 !!!

  • @heikosoeder
    @heikosoeder 4 года назад

    Vpn and u can controll the relay too and save.

  • @Dwi.P4
    @Dwi.P4 10 месяцев назад

    Can use only esp8266 sir?

  • @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

  • @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.

  • @klausvonshnytke
    @klausvonshnytke 3 года назад +2

    I would use MQTT server for this project.

    • @maazkhan5846
      @maazkhan5846 Год назад

      Hey do you have a playlist where I can learn mqtt in detail

    • @klausvonshnytke
      @klausvonshnytke Год назад

      @@maazkhan5846 Hi. Sorry, I don't have any links handy. I was just googling for details as I needed to learn something. MQTT is fairly easy to setup and work with

  • @peachville4383
    @peachville4383 4 года назад

    Can anything be done about the huge delay time between request and action?

    • @raybright5805
      @raybright5805 4 года назад

      Some host sites may not want too many transactions & will close you down

    • @peachville4383
      @peachville4383 4 года назад

      @@raybright5805 damn web police....lmao

    • @RuiSantosdotme
      @RuiSantosdotme  4 года назад

      You can lower the request delay, but I would personally leave it at least 5 seconds interval (specially if you have many boards connected to your server).

    • @blogactivities5462
      @blogactivities5462 2 года назад

      read my comment

  • @jak12345612
    @jak12345612 4 года назад

    Can you solve ,How to use Wifimanager + webserver .

    • @RuiSantosdotme
      @RuiSantosdotme  4 года назад +1

      Unfortunately I don't have any tutorials on that exact subject...

  • @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;

  • @carlos.galhano
    @carlos.galhano Год назад

    Como posso saber o SSD e o IP?