logo elektroda
logo elektroda
X
logo elektroda

Collaboration of three and more ESP32 or other modules with each other - how?

marek003 1521 8
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 20430540
    marek003
    Level 40  
    Hello
    I am searching and cannot find it. Or I don't know how to search.
    If any colleague could guide me it would be nice. Maybe there are some examples.
    I do not insist rigidly on the use of a particular tile.

    On the one hand a simple thing on the other hand I do not know how to bite.

    What I want to do (example):

    5 pieces of digital sensors [high/low state] in a couple of places in the house. They can be based on esp01 each and are to be used as wireless* transmitters.

    The receiver can be an ESP32 or anything else which will signal with individual 5 LEDs the activation of the respective sensor.

    Such receivers which I want to have two, i.e. to show the same thing in two other rooms.

    And now the most important thing: I don't want any http pages, no phone apps etc. I want these modules to only work together eventually using a router to form a network - but if the router could be dispensed with then that would be even better.

    *Then, if it works, it would be useful to have communication the other way round, i.e. after pressing a switch in the receiver, a diode would eventually light up in the respective sensor.

    Can anyone advise me how to handle this from the software side?
  • ADVERTISEMENT
  • Helpful post
    #2 20430581
    khoam
    Level 42  
    It seems that ESP-NOW is the best fit here. Link
    Example tutorials:
    https://randomnerdtutorials.com/esp-now-esp32-arduino-ide/
    https://randomnerdtutorials.com/esp-now-esp8266-nodemcu-arduino-ide/

    Added after 49 [seconds]:


    marek003 wrote:
    I want these modules to work exclusively with each other eventually using a router that would form the network - but if the router could be dispensed with that would be even better.

    Without router and without TCP/IP.
  • ADVERTISEMENT
  • #3 20430694
    marek003
    Level 40  
    Thank you very much :)
    I was looking for just such a thing. I'll get home and test it.

    I thought that something TCP/IP protocols will have to be created, and here such a curiosity :)
    By the MAC


    Aby the way (for me to learn later) maybe you know of another example with TCP/IP protocols (using the network) This is more for my own knowledge for later winter evenings :) .
  • #5 20430815
    marek003
    Level 40  
    Thank you very much
    It promises to be a pleasant evening. :)

    By the way:
    One-way communication on the MAC I have already grasped - simple.
    Great page with examples - admittedly I use the "Translation Page" but it only translates the description and the codes remain unchanged which is very positive :) .
  • ADVERTISEMENT
  • #6 20430947
    TvWidget
    Level 38  
    You have not written whether you want the sensors to be battery-powered or mains-powered.
  • #7 20432125
    marek003
    Level 40  
    TvWidget wrote:
    You didn't write if the sensors are to be powered by battery or mains.

    And does it matter on the rules of cooperation between the modules?

    Of course it would be nice if it was based on the ESP-01 because it probably needs the least amount of current, but ultimately in my project the main sensors will be Iduino ST1148 or LM393 sound sensors (with digital output) and they will draw some current in continuous operation, so without a power supply I can not do without.

    My "project" (much said :) ) is an aid for a hearing impaired person (not always wearing a hearing aid). Intercom bell, doorbell, telephone (landline), kettle - I want these sounds to be signalled by flashing ultra-bright LEDs in the room where the person is. That's the whole device. I could do without these sound sensors, but then I would have to interfere with the devices and I would prefer to avoid that, besides it is hard to interfere with a kettle on a gas cooker :) . We'll see how this works.

    The second project which will be similar is a fire warning "system". Here there will be more sensors and here I would really like a sensor (smoke/temperature) with wireless messaging that can be battery powered for a longer period of time. But I will come back to this after the first project is completed.
  • ADVERTISEMENT
  • #8 20432143
    kaczakat
    Level 34  
    A kettle on a gas cooker simply let that person change to an electric one, boiling water takes 2 minutes and is not more expensive than gas if you add the efficiency of heating on a burner of about 40%, boiling water until you remember to turn it off, or replacing burnt kettles from time to time. At my family's place I had to break down the resistance, but eventually got the hang of it.
    You can buy a smoke detector from Action, just be careful to choose the one powered by 3V, a fellow forum member made himself a notification on his phone, periodically the battery status, and by the way you can send to other ESPs in the flat so that everyone starts flashing and vibrating with something. I didn't pay attention to this power supply and took the 9V ones, already given a free battery landed right in the bin, maybe they have this idea of free disposal, my 9V one paid for normally has been working OK for a couple of weeks now, both models are around £20 each.
    Helpful post? Buy me a coffee.
  • #9 20432182
    TvWidget
    Level 38  
    marek003 wrote:
    TvWidget wrote:
    You have not written whether the sensors are to be powered by battery or mains adapter.

    And does it matter on the rules of cooperation between the modules?

    Transmitting data over WiFi consumes a lot of power. Batteries need to have sufficient capacity and current capacity. There are other more energy-efficient methods of radio communication. E.g. sensors with a BLE interface powered by a small watch battery work for many months. The ESP32 also has BLE but is more suitable as a receiving gateway due to its current consumption.

Topic summary

The discussion revolves around the collaboration of multiple ESP32 or ESP8266 modules for a home automation project involving digital sensors. The user seeks a solution for wireless communication between five digital sensors (using ESP-01) and two receivers (ESP32) to signal sensor activation through LEDs, without relying on HTTP pages or mobile apps. ESP-NOW is recommended as a suitable protocol for direct communication without a router, while ESP-WIFI-MESH is suggested for scenarios requiring TCP/IP. The user also considers power consumption, indicating a preference for low-power solutions, and discusses the potential use of sound sensors for signaling various household alerts. Additional considerations include the power supply for the sensors and the feasibility of using battery-powered devices versus mains-powered options.
Summary generated by the language model.
ADVERTISEMENT