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. Is this possible? MQTT & Node request...

Is this possible? MQTT & Node request...

Scheduled Pinned Locked Moved Development
5 Posts 3 Posters 1.5k 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.
  • Mark SwiftM Offline
    Mark SwiftM Offline
    Mark Swift
    wrote on last edited by
    #1

    Evening all,

    I'm currently using the MQTT client on an ESP8266. I have a number of sensors deployed using a mixture of Nano's and Mini's.

    I'd like to know if this is possible:

    Node 1 - Rain Sensor (Digital input) / Soil Sensor (Digital Input) / Light Sensor

    Node 2 (Sleeps and wakes every 10 minutes) - Relay

    I'd like Node 2 to wake and check either the values of node 1, or alternatively check a source such as NodeRED for the values. Based on the values open / close the relay.

    Currently I have the MQTT client connected to Mosquitto.

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

      Yes, it is possible to send a request-message to any node (see api).

      But your Node1 have to answer Node2's requests-messages manually in its incomingMessage-method. As The MySensors library doesn't keep any last state by itself.

      1 Reply Last reply
      0
      • Mark SwiftM Offline
        Mark SwiftM Offline
        Mark Swift
        wrote on last edited by
        #3

        Hello @hek

        Thank you for the reply, and the amazing MySensors.

        Do you think I could have Node2 request some kind of status from NodeRed for example, rather than the Node directly?

        Cheers,

        Mark

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

          Sure, if NodeRed can keep the state and answer req-messages. I don't know the full capabilities of NodeRed.

          1 Reply Last reply
          0
          • Mark SwiftM Mark Swift

            Hello @hek

            Thank you for the reply, and the amazing MySensors.

            Do you think I could have Node2 request some kind of status from NodeRed for example, rather than the Node directly?

            Cheers,

            Mark

            noelgeorgiN Offline
            noelgeorgiN Offline
            noelgeorgi
            wrote on last edited by
            #5

            @Mark-Swift check this for node-to-node communication http://forum.mysensors.org/topic/3467/basic-setup-network/2 as @hek said setup a database in nodered to save the values received from node-1 and you could request that from node-2

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


            16

            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