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. Development
  3. ESP8266 as Node via MQTT

ESP8266 as Node via MQTT

Scheduled Pinned Locked Moved Development
4 Posts 2 Posters 1.6k Views 3 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.
  • B Offline
    B Offline
    blacksheepinc
    wrote on last edited by
    #1

    Hello!

    I would like to ask for some help!
    My idea is to have ESPs nodes with connected sensors or with relays around the house. They would communicate with Mycontroller running on orangepi.
    I managed to do so, I used the Mqttgatewayclient sketch, undefined the radio part.
    It works like charm, but as soon as I activate another node, it will have the same nodeID(0) as the first node even though I defined the MY_NODEID 2.
    So the controller doesn't know what to do, it mixes the data from the 2 (or more) nodes.

    Probably gateways always will be nodeid 0. What do you think where can I modify the source code to use the defined nodeid when sending or receiving messages via mqtt?

    Thank you!
    Mark

    mfalkviddM 1 Reply Last reply
    0
    • B blacksheepinc

      Hello!

      I would like to ask for some help!
      My idea is to have ESPs nodes with connected sensors or with relays around the house. They would communicate with Mycontroller running on orangepi.
      I managed to do so, I used the Mqttgatewayclient sketch, undefined the radio part.
      It works like charm, but as soon as I activate another node, it will have the same nodeID(0) as the first node even though I defined the MY_NODEID 2.
      So the controller doesn't know what to do, it mixes the data from the 2 (or more) nodes.

      Probably gateways always will be nodeid 0. What do you think where can I modify the source code to use the defined nodeid when sending or receiving messages via mqtt?

      Thank you!
      Mark

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

      @blacksheepinc it should be possible to use the mqtt prefix to distinguish between different nodes. No need to modify the library code.

      See https://forum.mysensors.org/topic/5255/esp8266-mqtt-gateway-and-setting-node_id for details

      B 1 Reply Last reply
      1
      • mfalkviddM mfalkvidd

        @blacksheepinc it should be possible to use the mqtt prefix to distinguish between different nodes. No need to modify the library code.

        See https://forum.mysensors.org/topic/5255/esp8266-mqtt-gateway-and-setting-node_id for details

        B Offline
        B Offline
        blacksheepinc
        wrote on last edited by
        #3

        @mfalkvidd
        Yeah, I see it now. It works, thanks!
        But as for curiosity, would it be too difficult to modify as I mentioned?
        I will try to mimic mysensors message api with a simple esp pub/sub library to have more control for my need soon.

        BR
        Mark

        mfalkviddM 1 Reply Last reply
        0
        • B blacksheepinc

          @mfalkvidd
          Yeah, I see it now. It works, thanks!
          But as for curiosity, would it be too difficult to modify as I mentioned?
          I will try to mimic mysensors message api with a simple esp pub/sub library to have more control for my need soon.

          BR
          Mark

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

          @blacksheepinc said in ESP8266 as Node via MQTT:

          would it be too difficult to modify as I mentioned?

          I don't know

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


          29

          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