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. Controllers
  3. Domoticz
  4. getting data from sensor to sensor

getting data from sensor to sensor

Scheduled Pinned Locked Moved Domoticz
domoticz gettingdata
7 Posts 4 Posters 106 Views 4 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.
  • R Offline
    R Offline
    Robert Król
    wrote on last edited by
    #1

    Hi
    I have few sensors and gateway conected todomoticz server on RPi, id like to make new node - display node.
    It means it will be LCD dispaly conected to arduino with some switches do change data.
    But i dont know how idea how get data from other, nodes, how can i ask gateway about it? is it possible?
    for example how i can ask about value of 2nd child in 5th node?

    Boots33B 1 Reply Last reply
    0
    • R Robert Król

      Hi
      I have few sensors and gateway conected todomoticz server on RPi, id like to make new node - display node.
      It means it will be LCD dispaly conected to arduino with some switches do change data.
      But i dont know how idea how get data from other, nodes, how can i ask gateway about it? is it possible?
      for example how i can ask about value of 2nd child in 5th node?

      Boots33B Offline
      Boots33B Offline
      Boots33
      Hero Member
      wrote on last edited by
      #2

      @Robert-Król Yes that is certainly possible, Have a look at requesting data on the api page. You can request data from any node on your Mysensors network.

      1 Reply Last reply
      0
      • R Offline
        R Offline
        Robert Król
        wrote on last edited by
        #3

        unfortunatelly is not wrote enough clear for me :(
        I still cant get data from other node....
        For example in my network i have meters (node 5, node 7 - temperature, node 10 humidity, etc) and big display (node 40), how can i ask from node 40 about value from node 5, 7, 10??
        how can i do "display_txt = node5.tempearure"

        BearWithBeardB 1 Reply Last reply
        0
        • R Robert Król

          unfortunatelly is not wrote enough clear for me :(
          I still cant get data from other node....
          For example in my network i have meters (node 5, node 7 - temperature, node 10 humidity, etc) and big display (node 40), how can i ask from node 40 about value from node 5, 7, 10??
          how can i do "display_txt = node5.tempearure"

          BearWithBeardB Offline
          BearWithBeardB Offline
          BearWithBeard
          wrote on last edited by BearWithBeard
          #4

          If you want to request sensor values directly from other nodes, they all can't be sleeping, because they would have to handle the incoming request. Since you're using an LCD display on the requesting node, I assume that it will always be powered, right?

          In this case, I'd suggest to send all the sensor values your're interested in both to the GW and to the LCD node. The sensor nodes can go back to sleep after taking and sending the new measurements and the LCD node will be able to display the new values as soon as they've been sent to it.

          On the sensor nodes (5, 7, 10, etc):

          #define LCD_NODE_ID 40
          void loop() 
          {
              send(msgTemp.set(temp)); // Send to GW
              send(msgTemp.set(temp).setDestination(LCD_NODE_ID)); // Send to LCD node
          }
          

          Now you have to listen for incoming messages on the LCD node:

          #define KITCHEN_NODE_ID 5
          #define BEDROOM_NODE_ID 7
          bool receivedNewSensorValues = false;
          
          void receive(const MyMessage &msg) 
          {
              // Set a flag so that you can update the LCD when needed
              receivedNewSensorValues = true;
          
              // Receiving temperature from kitchen node
              if (msg.getSender() == KITCHEN_NODE_ID && msg.getType() == V_TEMP)
              {
                  kitchenTemp = msg.getFloat();
              }
          
              // Receiving humidity from kitchen node
              if (...) {}
          
              // Receiving temperature from bedroom node
              if (...) {}
          }
          
          void loop() 
          {
              if (receivedNewSensorValues)
              {
                  // Update LCD
              }
          }
          
          1 Reply Last reply
          1
          • boumB Offline
            boumB Offline
            boum
            wrote on last edited by
            #5

            Just an opinion about this issue. If you don't want to modify your sensor code and keep it "generic", you should move the logic and communication to the controller. Domoticz (or any other controller) already receives the data. It can conditionally send it to the LCD node.
            Having the code on the gateway or on nodes makes sense if you want it to work when the controller/gateway are out of reach.

            R 1 Reply Last reply
            1
            • R Offline
              R Offline
              Robert Król
              wrote on last edited by
              #6

              Great, atm i can send data from my sensors to gw and display node. But what about asking from lcd note to data from other node (always powered)?
              In my network i have some ESP nodes which send data to domoticz, id like to some of this data on my dispaly node.

              1 Reply Last reply
              1
              • boumB boum

                Just an opinion about this issue. If you don't want to modify your sensor code and keep it "generic", you should move the logic and communication to the controller. Domoticz (or any other controller) already receives the data. It can conditionally send it to the LCD node.
                Having the code on the gateway or on nodes makes sense if you want it to work when the controller/gateway are out of reach.

                R Offline
                R Offline
                Robert Król
                wrote on last edited by
                #7

                @boum I did it in this way from some time, but it looks less elegant. I have to make many virtual devices in domoticz, devices which send data to my lcd node. It works, but i think sending data directly to lcd will work better (or not... :))
                The best solution would be ask directly domoticz (gw) about data sending from other node, but propably its not work in that way

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


                20

                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