logo elektroda
logo elektroda
X
logo elektroda

[Solved] ESP8266 ESP-01 WIFI module with 4 Relays: How do I find the IP and port and get the module up and ru

piloszkotosz 1035 8
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 20377706
    piloszkotosz
    Level 8  
    Hello
    I recently purchased a module with four wirelessly controlled relays.
    I'm trying to get this thing working and I can't get it to work.
    I have watched some videos on YT, installed some software for the iphone and I can not manage.
    Can someone help me figure it out? How to find, what is the IP no. of this WIFI module and the port no. (e.g. 8080)


    ESP8266 ESP-01 WIFI module with 4 Relays: How do I find the IP and port and get the module up and ru , does this help anything.
  • ADVERTISEMENT
  • #2 20377955
    kaczakat
    Level 34  
    And how is it supposed to connect to WIFI if you don't give it a password? Typically, you run such a module, it sets up an AP, you connect to it with your phone, you enter the IP number 1 of this network with a web browser, typically 192.168.4.1, but in the phone you can check what IP you have, you set the network parameters, save and reset, when the AP disappears, you look for the number it got in the local network on the router.
    If you set yourself a new AP on another phone and connect the module to it, it will be the only connected device, easier to find, if Android does the router then you can see what clients are connected.
    If you have a USB UART converter then you can connect to the pins on the pin strip and read the messages at startup, when the ESP module connects to the network then the soft usually tells you what IP it got, or that it puts the AP because it doesn't know where to connect.
    Helpful post? Buy me a coffee.
  • #3 20378024
    piloszkotosz
    Level 8  
    Thanks for your willingness to help

    I managed to partially comprehend. I came across a rather clear video from YT:

    https://www.youtube.com/watch?v=Po9trhobKRc

    I downloaded the WiFi Controller from the video, and ESP2Relay...

    In the WiFi Controller program I set the commands in HEX:


    ESP8266 ESP-01 WIFI module with 4 Relays: How do I find the IP and port and get the module up and ru


    assigned to 8 buttons (ON x 4, OFF x 4)

    I can remotely control the relays from this application. I have not yet mastered the control from ESP2Relay...
    but I think I will. In the application I specified IP 192.168.4.1 and port 8080, and that was enough to work. No passwords needed so far, but if I'm right it's for the fact that the module probably connects directly to the phone and not the router. Just will it be possible to control this from outside the house outside the range of the phone or the home WIFI network ?
  • ADVERTISEMENT
  • #4 20378081
    kaczakat
    Level 34  
    In this configuration you won't be able to control from outside the house. If you connect to your home network it's not necessarily either, you need to have an external IP, you need to assign some IP to the module in the router so it doesn't get random ones, forward the ports, in the application give the external IP and the port forwarded to the ESP to 8080 (can be the same as there is one module).
    For now, as long as the phone and ESP can see each other over WIFI it will work.
    Blynks, SUple, SMART DGM or other ioTYs work with external servers, there must be code in the module that allows you to pair with such a service, the device is constantly logged into the server in the world, so is the phone, when the phone sends some command it to the server, from the server it is read by the device and this works even without an external IP.
    Helpful post? Buy me a coffee.
  • #5 20378105
    piloszkotosz
    Level 8  
    Thanks kaczakat

    That means I will have to brush up on my knowledge, reading, research, and so that it is possible to control "from the outside". For the time being, there is some HI fun to be had. Greetings.
  • ADVERTISEMENT
  • #6 20379078
    piloszkotosz
    Level 8  
    I will still ask on another issue.

    If I set up my own home server on another computer, with the appropriate knowledge, can you control similar devices from the outside via the Internet without having to use apps from android and the cloud ?

    I have never made a server, but there is a lot on YT on this topic and on the Internet. With the right commitment to the topic I could probably figure it out.

    Whether, for example, to install an android emulator on the Win (I have read that there are) and with the help of a remote desktop connect to the computer and so try ?

    How best to figure it out ?
  • ADVERTISEMENT
  • Helpful post
    #7 20379421
    kaczakat
    Level 34  
    If you want to do anything at home to control from outside then start with an external IP, the advantage is that even if there is no internet the devices at home will get along with each other. You can have your server done on a purchased virtual VPS server, you don't worry about exposing your home network or power consumption, for $13/year you get e.g.
    ESP8266 ESP-01 WIFI module with 4 Relays: How do I find the IP and port and get the module up and ru
    For fun I threw Blynk in there, on an Android phone the last version of the application that allows you to point your server, it can no longer be downloaded from Google PLAY, on ESP a program written in Arduino and it works.
    If you have a NAS drive, you can install your home ThingSpeak, install docker, download the finished image, run it as a virtual computer, it's fun for 1 hour in total to grasp once you've more or less assimilated a few tutorials. The phone app allows you to type in a server from your finger, so it doesn't have to be the one. Although the home one is more poor, at least such a ready-made one, you can just install it from the freshest sources (not on NAS, here only docker images), the image for the docker can be and 8 years old.
    Also you can buy yourself a Rasberry for 200 (1000 now?) or a Fujitsu S720 terminal for 72 PLN with shipping. Rasberry consumes only 0.5-5W, and the terminal with 20W, but there are better ones for 2-3 hundred, more inside, and less consumption.
    On the terminal also you can throw some Linux, docker and do the same as on the NAS, the possibilities are greater, because you decide what you upload, but must buzz the other device.
    Got servers are paid, you get free coins to start (Blynk), the ability to do a few channels (Thingspeak), and you have to pay for more, they are not amounts that would justify building your own server, unless someone is doing it as a hobby for fun anyway.
    You also don't need any server in total, ESP can be a web server with websockets, you log in to its IP, the control panel opens:
    ESP8266 ESP-01 WIFI module with 4 Relays: How do I find the IP and port and get the module up and ru
    you can control buttons, sliders, watch the data coming from ESP, you can redirect the port having an external IP.
    Of course nothing will "do itself", you have to write it yourself, C C++ HTML js css, upload to ESP.
    Or use ready-made solutions.
    Helpful post? Buy me a coffee.
  • #8 20379517
    piloszkotosz
    Level 8  
    Thanks a lot for your willingness to help
    I'm going to start reading the tutorials on the subject. It is important to keep trying. Greetings.
  • #9 20380894
    piloszkotosz
    Level 8  
    Thanks a lot for your willingness to help
    I'm going to start reading the tutorials on the subject. It is important to keep trying. Greetings.

Topic summary

The discussion revolves around configuring the ESP8266 ESP-01 WiFi module with four relays. The user seeks assistance in finding the module's IP address and port number to establish a connection. Initial guidance suggests connecting to the module's access point (AP) at IP 192.168.4.1 and using port 8080, which allows control of the relays via a mobile application. However, controlling the module from outside the home network requires additional steps, such as setting up port forwarding and using an external IP. The conversation also touches on the possibility of creating a home server to manage the device remotely without relying on cloud services or third-party applications.
Summary generated by the language model.
ADVERTISEMENT