<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[How to send message from one sensor to other or send message with different node and sensor ID?]]></title><description><![CDATA[<p dir="auto">Hello all,</p>
<p dir="auto">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</p>
<p dir="auto">OR</p>
<p dir="auto">How can I send message to domoticz from node ID 1 to open the valve on node ID 2?</p>
<p dir="auto">Thank You,<br />
Vaibhav</p>
]]></description><link>https://forum.mysensors.org/topic/5149/how-to-send-message-from-one-sensor-to-other-or-send-message-with-different-node-and-sensor-id</link><generator>RSS for Node</generator><lastBuildDate>Wed, 22 Apr 2026 08:35:11 GMT</lastBuildDate><atom:link href="https://forum.mysensors.org/topic/5149.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 20 Oct 2016 23:05:24 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to send message from one sensor to other or send message with different node and sensor ID? on Fri, 21 Oct 2016 00:49:07 GMT]]></title><description><![CDATA[<p dir="auto">Got it after some trial and error with getters and setters.</p>
<p dir="auto">In case someone needs. I did following.</p>
<pre><code>MyMessage msg();  //Create a blank MyMessage instance. Do this before void setup()
</code></pre>
<p dir="auto">then when you want to send the message. Create a message on the fly like following.</p>
<pre><code>1. msg.setType(2);
2. msg.setSensor(1);
3. msg.setDestination(2);
4. send(msg.set(1));
</code></pre>
<p dir="auto">This is what I am doing above:</p>
<ol>
<li>set message type ex. V_LIGHT is 2. Look at <a href="https://www.mysensors.org/download/serial_api_20" rel="nofollow ugc">API</a> for more</li>
<li>Set sensor child ID of the sensor you want to change status of</li>
<li>This is the destination node ID which has the sensor you are trying to reach</li>
<li>Send the message just like you would usually.</li>
</ol>
<p dir="auto">Hope this helps someone</p>
]]></description><link>https://forum.mysensors.org/post/50796</link><guid isPermaLink="true">https://forum.mysensors.org/post/50796</guid><dc:creator><![CDATA[palande.vaibhav]]></dc:creator><pubDate>Fri, 21 Oct 2016 00:49:07 GMT</pubDate></item></channel></rss>