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. Q about requesting values from another node

Q about requesting values from another node

Scheduled Pinned Locked Moved Development
2 Posts 2 Posters 1.1k Views 1 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.
  • Z Offline
    Z Offline
    Zeph
    Hero Member
    wrote on last edited by
    #1

    There's a part of the vers 1.4 protocol that I do not understand.

    I recall some discussion to the effect that a node wanting to display, say, temperature could just ask another node measuring temperature for its values. And in the API docs I find:

    Requests a variable value from gateway or some other sensor in the radio network. Make sure to add callback-method in begin-method to handle request responses. If you send this request to some other sensor-node you must handle the reply message yourself in the destination node.
    
       void request(uint8_t childSensorId, uint8_t variableType, uint8_t destination);
           childSensorId - The unique child id for the different sensors connected to this Arduino. 0-254.
           variableType - The variableType to fetch.
           destination - The nodeId of other node to request data from in radio network. Default is gateway.
    

    I can see how this call within the display node could get routed to the temperature measuring node ("destination" of the request), given the parameters passed. And the latter could respond as usual to a request.

    What I don't see is how temperature node's response is routed back to the requesting node. Does the temperarture measruring node have to be written to look at the Sender field in the request, and make a send to that? Is there an example sketch?

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

      @Zeph said:

      Does the temperarture measruring node have to be written to look at the Sender field in the request, and make a send to that?

      Yes.

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


      22

      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