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. Troubleshooting
  3. How to send message from one sensor to other or send message with different node and sensor ID?

How to send message from one sensor to other or send message with different node and sensor ID?

Scheduled Pinned Locked Moved Troubleshooting
2 Posts 1 Posters 1.1k Views 2 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.
  • palande.vaibhavP Offline
    palande.vaibhavP Offline
    palande.vaibhav
    wrote on last edited by
    #1

    Hello all,

    I have pH sensor on node ID 1 and valve that controls pH on node ID 2. Now when the pH level falls below some value I want to open the valve. How can I send message from one node to other to open the valve

    OR

    How can I send message to domoticz from node ID 1 to open the valve on node ID 2?

    Thank You,
    Vaibhav

    palande.vaibhavP 1 Reply Last reply
    0
    • palande.vaibhavP palande.vaibhav

      Hello all,

      I have pH sensor on node ID 1 and valve that controls pH on node ID 2. Now when the pH level falls below some value I want to open the valve. How can I send message from one node to other to open the valve

      OR

      How can I send message to domoticz from node ID 1 to open the valve on node ID 2?

      Thank You,
      Vaibhav

      palande.vaibhavP Offline
      palande.vaibhavP Offline
      palande.vaibhav
      wrote on last edited by palande.vaibhav
      #2

      Got it after some trial and error with getters and setters.

      In case someone needs. I did following.

      MyMessage msg();  //Create a blank MyMessage instance. Do this before void setup()
      

      then when you want to send the message. Create a message on the fly like following.

      1. msg.setType(2);
      2. msg.setSensor(1);
      3. msg.setDestination(2);
      4. send(msg.set(1));
      

      This is what I am doing above:

      1. set message type ex. V_LIGHT is 2. Look at API for more
      2. Set sensor child ID of the sensor you want to change status of
      3. This is the destination node ID which has the sensor you are trying to reach
      4. Send the message just like you would usually.

      Hope this helps someone

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


      15

      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