<?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[New nodes, new problems :&#x2F; Motion sensor [Solved]]]></title><description><![CDATA[<p dir="auto">I have a new node, a motion sensor node with repeater.<br />
Sometimes, when another node change state and communicates through my new repeating node or if another node searching for a new parent, the new repeating node triggers the motion sensor.<br />
Another strange thing is, 3 times an hour the node triggers the motion.</p>
<p dir="auto">This is when i am not home.<br />
Check time stamp<br />
19:01 Motion Sensor TV 4 1 turned off<br />
19:01 Motion Sensor TV 4 1 turned on<br />
18:41 Motion Sensor TV 4 1 turned off<br />
18:41 Motion Sensor TV 4 1 turned on<br />
18:21 Motion Sensor TV 4 1 turned off<br />
18:21 Motion Sensor TV 4 1 turned on<br />
18:06 Väder changed to 2<br />
18:01 Motion Sensor TV 4 1 turned off<br />
18:01 Motion Sensor TV 4 1 turned on<br />
17:41 Motion Sensor TV 4 1 turned off<br />
17:41 Motion Sensor TV 4 1 turned on<br />
17:21 Motion Sensor TV 4 1 turned off<br />
17:21 Motion Sensor TV 4 1 turned on<br />
Just can't figure what makes it trigger on exact times.<br />
Even if i reset the node it triggers on same times.</p>
<p dir="auto">This is the sketch</p>
<pre><code>/**
 * The MySensors Arduino library handles the wireless radio link and protocol
 * between your home built sensors/actuators and HA controller of choice.
 * The sensors forms a self healing radio network with optional repeaters. Each
 * repeater and gateway builds a routing tables in EEPROM which keeps track of the
 * network topology allowing messages to be routed to nodes.
 *
 * Created by Henrik Ekblad &lt;henrik.ekblad@mysensors.org&gt;
 * Copyright (C) 2013-2015 Sensnology AB
 * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
 *
 * Documentation: http://www.mysensors.org
 * Support Forum: http://forum.mysensors.org
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * version 2 as published by the Free Software Foundation.
 *
 *******************************
 *
 * REVISION HISTORY
 * Version 1.0 - Henrik Ekblad
 * 
 * DESCRIPTION
 * Example sketch showing how to create a node thay repeates messages
 * from nodes far from gateway back to gateway. 
 * It is important that nodes that has enabled repeater mode calls  
 * process() frequently. Repeaters should never sleep. 
 */

// Enable debug prints to serial monitor
#define MY_DEBUG 

// Enable and select radio type attached
#define MY_RADIO_NRF24
//#define MY_RADIO_RFM69
#define MY_RF24_PA_LEVEL RF24_PA_MAX

// Enabled repeater feature for this node
#define MY_REPEATER_FEATURE
#define MY_NODE_ID 4
#define MY_PARENT_NODE_ID 0
#define MY_PARENT_NODE_IS_STATIC

#include &lt;SPI.h&gt;
#include &lt;MySensors.h&gt;

//unsigned long SLEEP_TIME = 120000; // Sleep time between reports (in milliseconds)
#define DIGITAL_INPUT_SENSOR 3   // The digital input you attached your motion sensor.  (Only 2 and 3 generates interrupt!)
#define CHILD_ID 1   // Id of the sensor child

boolean previousTripped = LOW;

// Initialize motion message
MyMessage msg(CHILD_ID, V_TRIPPED);

void setup() {
  pinMode(DIGITAL_INPUT_SENSOR, INPUT);      // sets the motion sensor digital pin as input  
}

void presentation()  
{  
  //Send the sensor node sketch version information to the gateway
  sendSketchInfo("Motion Sensor TV", "1.0");

  // Register all sensors to gw (they will be created as child devices)
  present(CHILD_ID, S_MOTION);
}

void loop() 
{
  boolean tripped = digitalRead(DIGITAL_INPUT_SENSOR) == HIGH;
  //Serial.println(tripped);
  // Sensor must be HIGH and not yet sent the status of the sensor
  if ((tripped == HIGH) &amp;&amp; (tripped != previousTripped) ) {     
    send(msg.set(tripped ? "1" : "0")); // Send tripped value to gw
    previousTripped = tripped;   
  }  
  
  // Is sensor low and not sent? Then send LOW to gateway
  if ((tripped == LOW) &amp;&amp; (tripped != previousTripped)) {    
      send(msg.set(tripped ? "1" : "0")); // Send tripped value to gw
      previousTripped = tripped;
  }
}
</code></pre>
<p dir="auto">Even tried this sketch but i get the same result.</p>
<pre><code>// Enable debug prints
#define MY_DEBUG

// Enable and select radio type attached
#define MY_RADIO_NRF24
//#define MY_RADIO_RFM69
#define MY_RF24_PA_LEVEL RF24_PA_MAX

#define MY_NODE_ID 4
#define MY_REPEATER_FEATURE
#define MY_PARENT_NODE_ID 0
#define MY_PARENT_NODE_IS_STATIC

#include &lt;SPI.h&gt;
#include &lt;MySensors.h&gt;

#define CHILD_ID 1   // Id of the sensor child
#define DIGITAL_INPUT_SENSOR 3   // The digital input you attached your motion sensor.  (Only 2 and 3 generates interrupt!)

int oldTripped = 0;
int tripped = 0;

// Initialize motion message
MyMessage msg(CHILD_ID, V_TRIPPED);

void setup()  
{  
  pinMode(DIGITAL_INPUT_SENSOR, INPUT);      // sets the motion sensor digital pin as input
}

void presentation()  {
  // Send the sketch version information to the gateway and Controller
  sendSketchInfo("Motion Sensor TV", "1.0");

  // Register all sensors to gw (they will be created as child devices)
  present(CHILD_ID, S_MOTION);
}

void loop()     
{
     
//Read digital motion value
tripped = digitalRead(DIGITAL_INPUT_SENSOR);

if (tripped != oldTripped){
  Serial.println("Motion");
  send(msg.set(tripped?"1":"0"));  // Send tripped value to gw
  oldTripped = tripped;
}}
</code></pre>
]]></description><link>https://forum.mysensors.org/topic/6593/new-nodes-new-problems-motion-sensor-solved</link><generator>RSS for Node</generator><lastBuildDate>Sun, 16 Aug 2026 20:13:34 GMT</lastBuildDate><atom:link href="https://forum.mysensors.org/topic/6593.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 02 Apr 2017 19:10:13 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to New nodes, new problems :&#x2F; Motion sensor [Solved] on Thu, 06 Apr 2017 08:35:30 GMT]]></title><description><![CDATA[<p dir="auto">I guess this thread should be in the hardware forum.<br />
But if someone find this thread i can share some pictures and the idea with this node.<br />
I built it as a USB-stick with a USB-connector on a prototype PCB.<br />
Not good looking but when i get my TV up on the wall you can't see it.<br />
I use it to turn on light in the bathroom at night if my kids visit the toilet.<br />
<img src="/assets/uploads/files/1491467717203-img_20170406_102320-resized.jpeg" alt="0_1491467736631_IMG_20170406_102320.jpg" class=" img-fluid img-markdown" /><br />
<img src="/assets/uploads/files/1491467726373-img_20170406_102342-resized.jpeg" alt="0_1491467746038_IMG_20170406_102342.jpg" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.mysensors.org/post/64056</link><guid isPermaLink="true">https://forum.mysensors.org/post/64056</guid><dc:creator><![CDATA[xydix]]></dc:creator><pubDate>Thu, 06 Apr 2017 08:35:30 GMT</pubDate></item><item><title><![CDATA[Reply to New nodes, new problems :&#x2F; Motion sensor [Solved] on Thu, 06 Apr 2017 07:23:21 GMT]]></title><description><![CDATA[<p dir="auto">Thank you <a class="plugin-mentions-user plugin-mentions-a" href="/user/martinhjelmare" aria-label="Profile: martinhjelmare">@<bdi>martinhjelmare</bdi></a> for that answer. It explains it. i Can confirm this is the issue.<br />
The pir i am using is this one, the mini pir.<br />
<a href="http://www.ebay.com/itm/121880058682?_trksid=p2057872.m2749.l2649&amp;ssPageName=STRK%3AMEBIDX%3AIT" rel="nofollow ugc">http://www.ebay.com/itm/121880058682?_trksid=p2057872.m2749.l2649&amp;ssPageName=STRK%3AMEBIDX%3AIT</a></p>
<p dir="auto">I tried another pir, the HC-SR501 (<a href="http://www.ebay.com/itm/201414880948?rmvSB=true" rel="nofollow ugc">http://www.ebay.com/itm/201414880948?rmvSB=true</a>)<br />
This pir is working ok with the node as it is.<br />
First i tried an 100uF capacitor as <a class="plugin-mentions-user plugin-mentions-a" href="/user/gohan" aria-label="Profile: gohan">@<bdi>gohan</bdi></a> suggested, but it didn't help.<br />
Now i tried an 470uF capacitor and it seems to be fine with the mini pir.</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/vladimir-dobrikov" aria-label="Profile: Vladimir-Dobrikov">@<bdi>Vladimir-Dobrikov</bdi></a> my radio already got an 100uF for the 3,3V circuit.<br />
Im am still testing but the node it seems fine for now.<br />
Thank you all for the help.</p>
]]></description><link>https://forum.mysensors.org/post/64053</link><guid isPermaLink="true">https://forum.mysensors.org/post/64053</guid><dc:creator><![CDATA[xydix]]></dc:creator><pubDate>Thu, 06 Apr 2017 07:23:21 GMT</pubDate></item><item><title><![CDATA[Reply to New nodes, new problems :&#x2F; Motion sensor [Solved] on Thu, 06 Apr 2017 06:24:36 GMT]]></title><description><![CDATA[<p dir="auto">I'd suggest to add capacitors: 47uF for radio and for PIR. Maybe this way power will be more smooth</p>
]]></description><link>https://forum.mysensors.org/post/64048</link><guid isPermaLink="true">https://forum.mysensors.org/post/64048</guid><dc:creator><![CDATA[Vladimir Dobrikov]]></dc:creator><pubDate>Thu, 06 Apr 2017 06:24:36 GMT</pubDate></item><item><title><![CDATA[Reply to New nodes, new problems :&#x2F; Motion sensor [Solved] on Mon, 03 Apr 2017 10:08:40 GMT]]></title><description><![CDATA[<p dir="auto">If that is the case then it could still be a power issue</p>
]]></description><link>https://forum.mysensors.org/post/63851</link><guid isPermaLink="true">https://forum.mysensors.org/post/63851</guid><dc:creator><![CDATA[gohan]]></dc:creator><pubDate>Mon, 03 Apr 2017 10:08:40 GMT</pubDate></item><item><title><![CDATA[Reply to New nodes, new problems :&#x2F; Motion sensor [Solved] on Mon, 03 Apr 2017 09:27:46 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/xydix" aria-label="Profile: xydix">@<bdi>xydix</bdi></a></p>
<p dir="auto">I also think it's the radio transmissions that causes the sensor to trigger. One thing that happens every 20 min by default is the gateway sends a discover request broadcast. This will force all repeaters to resend that broadcast. You can test to change the interval of this broadcast at the gateway and see if the false triggers timing follows.</p>
<p dir="auto">The setting is called <code>MY_TRANSPORT_DISCOVERY_INTERVAL_MS</code>. You can define this in the gateway sketch to override the default setting.</p>
]]></description><link>https://forum.mysensors.org/post/63850</link><guid isPermaLink="true">https://forum.mysensors.org/post/63850</guid><dc:creator><![CDATA[martinhjelmare]]></dc:creator><pubDate>Mon, 03 Apr 2017 09:27:46 GMT</pubDate></item><item><title><![CDATA[Reply to New nodes, new problems :&#x2F; Motion sensor [Solved] on Sun, 02 Apr 2017 22:04:05 GMT]]></title><description><![CDATA[<p dir="auto">I had that problem when use ESP8266 as active WiFi source near PIR sensor..</p>
]]></description><link>https://forum.mysensors.org/post/63830</link><guid isPermaLink="true">https://forum.mysensors.org/post/63830</guid><dc:creator><![CDATA[Vladimir Dobrikov]]></dc:creator><pubDate>Sun, 02 Apr 2017 22:04:05 GMT</pubDate></item><item><title><![CDATA[Reply to New nodes, new problems :&#x2F; Motion sensor [Solved] on Sun, 02 Apr 2017 20:53:48 GMT]]></title><description><![CDATA[<p dir="auto">you tell me if you notice some coincidences :D</p>
]]></description><link>https://forum.mysensors.org/post/63821</link><guid isPermaLink="true">https://forum.mysensors.org/post/63821</guid><dc:creator><![CDATA[gohan]]></dc:creator><pubDate>Sun, 02 Apr 2017 20:53:48 GMT</pubDate></item><item><title><![CDATA[Reply to New nodes, new problems :&#x2F; Motion sensor [Solved] on Sun, 02 Apr 2017 20:28:44 GMT]]></title><description><![CDATA[<p dir="auto">Just tried it but still same problem.<br />
I am suspecting hardware issues but always same time stamp makes me wonder.</p>
]]></description><link>https://forum.mysensors.org/post/63820</link><guid isPermaLink="true">https://forum.mysensors.org/post/63820</guid><dc:creator><![CDATA[xydix]]></dc:creator><pubDate>Sun, 02 Apr 2017 20:28:44 GMT</pubDate></item><item><title><![CDATA[Reply to New nodes, new problems :&#x2F; Motion sensor [Solved] on Sun, 02 Apr 2017 20:07:15 GMT]]></title><description><![CDATA[<p dir="auto">Power fluctuations during transmission can trigger pir sensor: try using a 47-100 uF capacitor to stabilize power</p>
]]></description><link>https://forum.mysensors.org/post/63817</link><guid isPermaLink="true">https://forum.mysensors.org/post/63817</guid><dc:creator><![CDATA[gohan]]></dc:creator><pubDate>Sun, 02 Apr 2017 20:07:15 GMT</pubDate></item></channel></rss>