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.8k 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
    • H Offline
      H 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
        • H Offline
          H 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

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            18

            Online

            12.0k

            Users

            11.2k

            Topics

            113.4k

            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