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



  • 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 πŸ˜„ Thank you.


  • Admin

    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.



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


  • Hardware Contributor

    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.



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


  • Hero Member

    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.



  • @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 πŸ˜„



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



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



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


  • Admin

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



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


  • Admin

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



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


  • Admin

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



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


  • Admin

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



  • @hek Domoticz


  • Mod

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



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


  • Hero Member

    @Toyman

    Yes, you add them as 5 gateways.



  • @korttoma said:

    as 5 gateways.

    Hello everybody, sorry to step in and to resume an hold thread, but I was reading it and I'm not sure if the initial question was answered, so I will try to rephrase that adding my contribution.

    Rf nodes communicate between them using a mesh network and using the best route between them to send messages. Now, I suppose the question was: can I create a node using Wifi transport and not RF ? Of course using ESP8266 and not Arduino+RF.
    Ok, it's clear the ESP can be used as a gateway, and it's also clear we can add sensors to that gateway. But I imagine this is not the solution. Gateways rely on the Access Point they connect to (SSID and PW). If the AP is momentary not available, sensors will go offline. And Wifi connection to AP usually drops, so that's not a rulable solutions to implement nodes.

    I'm evaluating a similar solution: creating a mess network of sensors using ESP8266. I've looked around the web, and found that a few works are going on on mesh network using the ESP, but none are a definite solution. Expressif has published a a Mesh SDK, (https://espressif.com/sites/default/files/documentation/30a-esp8266_mesh_user_guide_en.pdf), but it doesn't seem to address completely the problem, or by the way could not find sample installations. Another library (https://github.com/Coopdis/easyMesh) has been developed, but development seems now stopped, and the main problem is that each ESP in the mesh publish his different SSID, while a single SSID for all the mesh would be desirable.

    All that said, I would like to understand if you're going to investigate using the ESP8266 as a node (not a gateway). That would probably require using a low-level network communication between ESP, but I'm not a network expert, so can't really say.

    It would be really interesting. It would allow to create a complete mesh network of sensors/actuators using only ESP

    Thanks for attention.

    Antonio



  • @antlomb
    My personal opinion: when inititial euforia about ESP8266 has ended, people started to realize that the chip is actually not that reliable for solid tasks like home automation.
    Besides, it has huge problems with deep sleep and even if they are fixed, the module reboots on every wake-up consuming a lot on start up


Log in to reply
 

Suggested Topics

  • 4
  • 3
  • 8
  • 20
  • 9
  • 17

8
Online

11.4k
Users

11.1k
Topics

112.7k
Posts