ESP8266 node mcu sensor sending messages directly to broker



  • Hi there,

    I have several ESP8266 node's which i have successfully used, but I'm wondering if it's possible to set them up to communicate directly with my mqtt broker over wifi rather than adding the radio and going via a gateway??

    I have found many sketches with will allow connecting to online services, but I haven't been able to find one which does the above.

    I realise that it would mean combining various elements of sketches together, but I'm sure that someone has already done this so I'm hoping they would be able to share their sketch with me.

    I would like to build stand alone temp and motion sensor which reports directly to the mqtt broker over wifi. Any help would be much appreciated.



  • Hi,

    I can't remember the exact project name, but I think there is a group working on adding basic sensors to the ESP2866, and is accessable via web UI. This is similar to what I am talking about; hope it helps. You might be able to set up a script to report the data you want directly to an MQTT server.

    I don't think there is anything MySensors related to what you are asking (currently) as all sensors communicate via Radio (NRF or RFM) directly to the Gateway.


  • Admin

    @Matt-Pitts said:

    I'm wondering if it's possible to set them up to communicate directly with my mqtt broker over wifi rather than adding the radio and going via a gateway??

    Yes, this MQTT gateway supports this:
    https://github.com/mysensors/Arduino/tree/development/libraries/MySensors/examples/GatewayESP8266MQTTClient

    Just remove the #define MY_RADIO_NRF24


Log in to reply
 

Suggested Topics

  • 8
  • 1
  • 8
  • 6
  • 1
  • 26
  • 3
  • 22

125
Online

10.2k
Users

10.7k
Topics

109.5k
Posts