Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. General Discussion
  3. Why don't you write mysensors library for ESP8266 similar to the nRF one ?

Why don't you write mysensors library for ESP8266 similar to the nRF one ?

Scheduled Pinned Locked Moved General Discussion
23 Posts 11 Posters 8.4k Views 10 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ahmedadelhosniA Offline
    ahmedadelhosniA Offline
    ahmedadelhosni
    wrote on last edited by
    #1

    Hello all,

    I started using my sensors this month and found it to be great for creating a mesh network using the popular nRF module. Recently this year the ESP8266 is becoming more popular and supported by Nodemcu or even Arduino IDE. Thus I have some questions.

    • The ESP gateway which already exists lets you connect the ESP to nRF and use it as a gateway. But is there any plan to use only the ESP as a sensor node to replace the usage of the nRF with it ?

    I guess before replying to that question we need to answer also several question which I am not also fully aware of its answers. For example, the first question may be, which one could have smaller library code size ? Second, Which one has the lowest power consumption ? This is the most important question for me. I have always read the the ESP consumes a lot of power, but I guess also the Nano + nRF will do. Don't really know. Third, Does the ESP goes to sleep mode like the nano to save power, and how to wake up ?

    Using the SOC ESP alone will be really great. It connects to your wireless network, no repeater nodes maybe needed in most cases, and if need one you can add one node to be used as an access point as the ESP supports this. The ESP is very very tiny and has several inputs and outputs, one drawback as far as I remember that there is only one PWM pin unlike the Nano, but I am not interested in using PWM in home automation. Fourth, Can ESP communicate with each others if the wireless network is down ? Fifth, which is faster in communication ? ESP nodes communicating together through wireless network or nRF nodes ?

    Any ideas are most welcomed. Maye be I missing something important :D Thank you.

    1 Reply Last reply
    0
    • hekH Offline
      hekH Offline
      hek
      Admin
      wrote on last edited by
      #2

      The ESP might be new new cool kid on the block. But it isn't exactly suitable for low power operation.

      That's why we still clinging on the more low power radios like NRF24 and FR69.

      But you can use ESP8266 as as a sensor node (fully integrated with your favourite controller) if you download the development branch of the MySensor library which allows sensors attached to to the gateway itself.

      ahmedadelhosniA 1 Reply Last reply
      0
      • hekH hek

        The ESP might be new new cool kid on the block. But it isn't exactly suitable for low power operation.

        That's why we still clinging on the more low power radios like NRF24 and FR69.

        But you can use ESP8266 as as a sensor node (fully integrated with your favourite controller) if you download the development branch of the MySensor library which allows sensors attached to to the gateway itself.

        ahmedadelhosniA Offline
        ahmedadelhosniA Offline
        ahmedadelhosni
        wrote on last edited by
        #3

        @hek Thanks hek. I have already updated my arduino IDE and succeeded in falshing the ESP today, so still testing its stability compared to the ethernet sheild. Will try the ESP gateway soon.

        I am not a pro in saving power techniques for devices, but I googled now and found out this link from espressif (http://bbs.espressif.com/viewtopic.php?t=133) and the deep sleep mode is 10uA. On the other side, referring to this topic (http://forum.mysensors.org/topic/1069/power-consumption-nrf24l01) , the nRF consumes 50 uA. In the same post, one of the replies stated that "The NRF draws ~900nA when powered down, and ~15mA when awake/sending."

        Am I missing something here ? Thank you.

        1 Reply Last reply
        0
        • L Offline
          L Offline
          LastSamurai
          Hardware Contributor
          wrote on last edited by
          #4

          Sleep modes with the esp had some problems (at least about 2 months ago). Also I think in sleep mode the esp looses its wlan connection. Reconnecting to the WLAN takes much longer than the nrf needs for its network. Also messages are bigger I guess.

          ahmedadelhosniA 1 Reply Last reply
          0
          • L LastSamurai

            Sleep modes with the esp had some problems (at least about 2 months ago). Also I think in sleep mode the esp looses its wlan connection. Reconnecting to the WLAN takes much longer than the nrf needs for its network. Also messages are bigger I guess.

            ahmedadelhosniA Offline
            ahmedadelhosniA Offline
            ahmedadelhosni
            wrote on last edited by
            #5

            @LastSamurai You are right. According to the mentioned link from espressif, in Deep Sleep mode the Wlan connection is stopped. And yes the reconnection again could take seconds.

            1 Reply Last reply
            0
            • NeverDieN Offline
              NeverDieN Offline
              NeverDie
              Hero Member
              wrote on last edited by
              #6

              For non-battery applications, if you have good Wi-Fi coverage, then the ESP8266 is hard to beat and can function as an all-in-one. It's the wireless device that the official Arduino should have evolved into but never officially did.

              ahmedadelhosniA 1 Reply Last reply
              0
              • NeverDieN NeverDie

                For non-battery applications, if you have good Wi-Fi coverage, then the ESP8266 is hard to beat and can function as an all-in-one. It's the wireless device that the official Arduino should have evolved into but never officially did.

                ahmedadelhosniA Offline
                ahmedadelhosniA Offline
                ahmedadelhosni
                wrote on last edited by
                #7

                @NeverDie Good point indeed. I am still testing the ESP for a full day now by sending a UDP request every 15 mins and replying back, but actually after some hours I find no response. Don't really know where the problem comes from and still debugging. I used Arduino WifiUDP example. I did some changes to handle reconnecting if the connection was lost, and to auto reset after a number of failed retries. But it happened that I get no replies from the ESP and that's what I am still to investigating. Kind of off-topic :D

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  andriej
                  wrote on last edited by
                  #8

                  I was about to ask the same question - why there's no possibility of using NodeMCU ESP8266 with MySensors in official way, as it's the simple way to deploy sensor network in home :-) for most users.

                  I'd like to cover my 2nd location with sensor network, can't decide either to order nodemcu's or go with Arduino.
                  The worst part for me is that there's no clear instruction how to flash nano's with custom firmware, so they can be updated via OTA.

                  :-)

                  1 Reply Last reply
                  0
                  • A Offline
                    A Offline
                    Alex B Goode
                    wrote on last edited by
                    #9

                    I found the following info which is looking promising
                    ESP made easy

                    1 Reply Last reply
                    0
                    • jopebeJ Offline
                      jopebeJ Offline
                      jopebe
                      wrote on last edited by
                      #10

                      Im still wondering, why there is no possibility to make nodes (only!) with ESP 8266 instead of an arduino and the wellknown radios. You must only connect the voltage and the sensor(s) and you have finished! The are very cheap and can be flashed by IDE. Other projects do consider this facts, here it gives only some experimental stuff. It is for my opinion much easyer than soldering this radios. Dont understand!

                      1 Reply Last reply
                      0
                      • hekH Offline
                        hekH Offline
                        hek
                        Admin
                        wrote on last edited by hek
                        #11

                        @jopebe
                        This has been possible for the last 6 months or so...

                        1 Reply Last reply
                        0
                        • jopebeJ Offline
                          jopebeJ Offline
                          jopebe
                          wrote on last edited by
                          #12

                          Oh, im very sorry Cant find, give me a hint please.
                          By the way: Very great work all about MySensors!
                          Thank you.

                          1 Reply Last reply
                          1
                          • hekH Offline
                            hekH Offline
                            hek
                            Admin
                            wrote on last edited by
                            #13

                            Use the ESP Gateway sketch.
                            Remove the NRF-radio define. Present your sensors and start sending data like in any other example.

                            T 1 Reply Last reply
                            0
                            • jopebeJ Offline
                              jopebeJ Offline
                              jopebe
                              wrote on last edited by
                              #14

                              Thanks for the short instruction.
                              But Im afraid it is too short for me. Nothing else to change in the sketch? Do I realy need a ssid and a password? Im just a beginner and found no further information.
                              I`m sorry:

                              1 Reply Last reply
                              0
                              • hekH Offline
                                hekH Offline
                                hek
                                Admin
                                wrote on last edited by
                                #15

                                Yes, you need SSID/Password to connect to your local WLAN.

                                1 Reply Last reply
                                0
                                • hekH hek

                                  Use the ESP Gateway sketch.
                                  Remove the NRF-radio define. Present your sensors and start sending data like in any other example.

                                  T Offline
                                  T Offline
                                  Toyman
                                  wrote on last edited by Toyman
                                  #16

                                  @hek

                                  Can you elaborate on this a bit more? I have a "standard" mysensors setup with various nrf24-based nodes and a serial gw.
                                  How can I add an esp8266 node to this setup? I understand that I need to use the sketch and present the sensors as usual.
                                  But how the existing serial gw is going to "hear" the ESP node?
                                  Or I need an Ethernet GW to be able to add esp node?

                                  1 Reply Last reply
                                  0
                                  • hekH Offline
                                    hekH Offline
                                    hek
                                    Admin
                                    wrote on last edited by
                                    #17

                                    How to add another (esp) gateway depends on the controller you're using. It will not join your current serial gateway.

                                    T 1 Reply Last reply
                                    0
                                    • hekH hek

                                      How to add another (esp) gateway depends on the controller you're using. It will not join your current serial gateway.

                                      T Offline
                                      T Offline
                                      Toyman
                                      wrote on last edited by
                                      #18

                                      @hek Domoticz

                                      mfalkviddM 1 Reply Last reply
                                      0
                                      • T Toyman

                                        @hek Domoticz

                                        mfalkviddM Offline
                                        mfalkviddM Offline
                                        mfalkvidd
                                        Mod
                                        wrote on last edited by mfalkvidd
                                        #19

                                        @Toyman you add the new gateway just like you added your first. In Setup->Hardware. Just select ethernet or mqtt (depending on which variant you decide to run on your esp) instead of USB.

                                        1 Reply Last reply
                                        2
                                        • T Offline
                                          T Offline
                                          Toyman
                                          wrote on last edited by
                                          #20

                                          Got it, thx. Just to clarify: if I want eg 5 x esp8266 nodes, do I need to add them as 5 gateways, or I add one as a a gateway and other 4 connect to it?

                                          korttomaK 1 Reply Last reply
                                          1
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          23

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.1k

                                          Posts


                                          Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • MySensors
                                          • OpenHardware.io
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular