<?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[Push V_Text value update from Domoticz to MySensors node]]></title><description><![CDATA[<p dir="auto">Hi, I am currently working on a 433Mhz gateway. It is a mysensors node that has a 433Mhz sender and receiver. It presents two S_INFO/V_TEXT children: the sender and the receiver. The idea is that the receiver receives a message via 433Mhz and sends the code as text to the controller. The controller decides what to do and then sends back a text with the answer code to the node. The node than takes that code and sends it via 433Mhz.<br />
My problem at the moment is that no message seems to get send to the node when I update the text value in domoticz. Does anyone have an idea why? I saw other people sending messages from the controller to a node.</p>
<p dir="auto">Here is my code:</p>
<pre><code>
// define radio stuff
#define MY_RADIO_NRF24
#define MY_BAUD_RATE 9600
#define MY_DEBUG    // Enables debug messages in the serial log
//#define MY_NODE_ID 13

// add signing stuff
//#define MY_SIGNING_SOFT // Enables software signing
//#define MY_SIGNING_REQUEST_SIGNATURES // Always request signing from gateway
//#define MY_SIGNING_SOFT_RANDOMSEED_PIN 7 // floating pin for randomness
//#define MY_DEBUG_VERBOSE_SIGNING

#include &lt;EEPROM.h&gt;
#include &lt;SPI.h&gt;
#include &lt;MyConfig.h&gt;
#include &lt;MySensors.h&gt;
#include &lt;Vcc.h&gt;
#include &lt;RCSwitch.h&gt;

const long RECEIVER_PIN = 0;
const long SENDER_PIN = 7;
const long DEBOUNCE = 500;
const long CHILD_RECEIVER = 0;
const long CHILD_SENDER = 1;


RCSwitch wirelessSwitch = RCSwitch();


void presentation()
{
  sendSketchInfo("433 Wireless Gateway", "29062017");

  present(CHILD_RECEIVER, S_INFO); // able to receive text
  present(CHILD_SENDER, S_INFO); // able to send text
}

void setup() {
  wirelessSwitch.enableReceive(RECEIVER_PIN); // Receiver on interrupt 0 =&gt; that is pin #2
  wirelessSwitch.enableTransmit(SENDER_PIN);  // Sender on pin 7
  Serial.println("Started listening on pin 2 for incoming 433Mhz messages");
}

void loop() {
  if (wirelessSwitch.available()) {
  	// for testing
    //output(wirelessSwitch.getReceivedValue(), wirelessSwitch.getReceivedBitlength(), wirelessSwitch.getReceivedDelay(), wirelessSwitch.getReceivedRawdata(),wirelessSwitch.getReceivedProtocol());

    unsigned long received_val = wirelessSwitch.getReceivedValue();

    Serial.print("Received 433Mhz message: ");
    Serial.println(received_val);

    send(MyMessage(CHILD_RECEIVER, V_TEXT).set(received_val));

    // software debounce
    wait(DEBOUNCE);
    wirelessSwitch.resetAvailable();
  }
}

void receive(const MyMessage &amp;message) {
  Serial.print("Sensor: "); Serial.print(message.sensor); Serial.print(", Message: "); Serial.println(message.getString()); 
  if (message.type == V_TEXT) { 
    if (message.sensor == CHILD_SENDER) {
      Serial.println("Sending message via 433Mhz");
      char * messageContent = strdup(message.getString());
      wirelessSwitch.send(messageContent);
    }
  }
}
</code></pre>
<p dir="auto">On the domoticz side I have a piece of lua code (using dzVents) that just copies the receiver value to the sender</p>
<pre><code>return {
        active = true,
        on = {
            '433Receiver'
        },
        execute = function(domoticz, sensor)

            domoticz.log("Received from gateway " .. sensor.state)
            -- check sensor values 
            domoticz.devices['433Sender'].updateText(sensor.state)
        end
    }
</code></pre>
<p dir="auto">and its working in the domoticz ui... Is this a domoticz error or am I missing something in my code?</p>
]]></description><link>https://forum.mysensors.org/topic/7087/push-v_text-value-update-from-domoticz-to-mysensors-node</link><generator>RSS for Node</generator><lastBuildDate>Fri, 16 Oct 2026 05:37:03 GMT</lastBuildDate><atom:link href="https://forum.mysensors.org/topic/7087.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 30 Jun 2017 20:24:48 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Push V_Text value update from Domoticz to MySensors node on Sun, 02 Jul 2017 11:28:20 GMT]]></title><description><![CDATA[<p dir="auto">I already have (in a github issue). Didn't get any answer yet. I am currently trying to simply use some other type of sensor (as I just need to send an integer) but none of them have really worked yet.</p>
]]></description><link>https://forum.mysensors.org/post/70281</link><guid isPermaLink="true">https://forum.mysensors.org/post/70281</guid><dc:creator><![CDATA[LastSamurai]]></dc:creator><pubDate>Sun, 02 Jul 2017 11:28:20 GMT</pubDate></item><item><title><![CDATA[Reply to Push V_Text value update from Domoticz to MySensors node on Sun, 02 Jul 2017 08:00:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/lastsamurai" aria-label="Profile: LastSamurai">@<bdi>LastSamurai</bdi></a> well, you could always ask /discuss on the domoticz forum</p>
]]></description><link>https://forum.mysensors.org/post/70255</link><guid isPermaLink="true">https://forum.mysensors.org/post/70255</guid><dc:creator><![CDATA[Yveaux]]></dc:creator><pubDate>Sun, 02 Jul 2017 08:00:02 GMT</pubDate></item><item><title><![CDATA[Reply to Push V_Text value update from Domoticz to MySensors node on Sat, 01 Jul 2017 21:20:17 GMT]]></title><description><![CDATA[<p dir="auto">Well thats bad :( Thanks for the help though! I hope domoticz adds this feature soon</p>
]]></description><link>https://forum.mysensors.org/post/70240</link><guid isPermaLink="true">https://forum.mysensors.org/post/70240</guid><dc:creator><![CDATA[LastSamurai]]></dc:creator><pubDate>Sat, 01 Jul 2017 21:20:17 GMT</pubDate></item><item><title><![CDATA[Reply to Push V_Text value update from Domoticz to MySensors node on Sat, 01 Jul 2017 06:33:10 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/lastsamurai" aria-label="Profile: LastSamurai">@<bdi>LastSamurai</bdi></a> I ran into the same issue lately. IIRR it is an issue with Domoticz: V_TEXT can only be sent by a node to Domoticz. Domoticz will not send an updated text back to a node...<br />
A very lame workaround could be to trigger Domoticz to send something to the node (e.g. V_STATUS) which triggers the node to request the latest V_TEXT from Domoticz :hankey:</p>
]]></description><link>https://forum.mysensors.org/post/70180</link><guid isPermaLink="true">https://forum.mysensors.org/post/70180</guid><dc:creator><![CDATA[Yveaux]]></dc:creator><pubDate>Sat, 01 Jul 2017 06:33:10 GMT</pubDate></item><item><title><![CDATA[Reply to Push V_Text value update from Domoticz to MySensors node on Fri, 30 Jun 2017 20:36:36 GMT]]></title><description><![CDATA[<p dir="auto">PS part of the problem might be that the value gets updated in the normal domoticz ui but in the hardware tab in the details of the gateway I still see no value at all for the sender child. Does anyone know if I am missing some code in my lua perhaps, or if this is a bug in domoticz or the mysensors integration?</p>
]]></description><link>https://forum.mysensors.org/post/70174</link><guid isPermaLink="true">https://forum.mysensors.org/post/70174</guid><dc:creator><![CDATA[LastSamurai]]></dc:creator><pubDate>Fri, 30 Jun 2017 20:36:36 GMT</pubDate></item></channel></rss>