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. Hardware
  3. How to connect QUIP300 to Domoticz

How to connect QUIP300 to Domoticz

Scheduled Pinned Locked Moved Hardware
31 Posts 3 Posters 6.8k Views 3 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.
  • gohanG Offline
    gohanG Offline
    gohan
    Mod
    wrote on last edited by
    #22

    it depends, you could also wire it to the 5V and detect when the digital pin goes high you have movement.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mckenzi
      wrote on last edited by
      #23

      THank you Gohan. Now everything is more clearer. :-) Will try today to wire everything.

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mckenzi
        wrote on last edited by
        #24

        Hi GOHAN,

        Finally i've build my serial gateway ( Arduino UNO + nRF24) + node (Arduino Nano + nRF24) but i failed with PIR conection to my NODE. How should i connect PIR's relay to Nano ? ( digital input + GND ) ?
        Now i know that relay is normally closed ( 0, 1 state, no power on it)
        I was trying to connect this way and it was working for few second ( i saw in the serial monitor , 1 , 0) but after some time NODE was sending weird data to GW.
        How connect it corectlly and how to mod the sketch for more sensors? (4 pcs). ```
        This is the way ?

        #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
        #define DIGITAL_INPUT_SENSOR 4   // The digital input you attached your motion sensor.  (Only 2 and 3 generates interrupt!)
        #define CHILD_ID 2   // Id of the sensor child```
        1 Reply Last reply
        0
        • gohanG Offline
          gohanG Offline
          gohan
          Mod
          wrote on last edited by
          #25

          IF the pir sensor has a normally closed relay you need to use the 5v output of the arduino to one pin of the relay and the other to the digital input and use the code to send TRIPPED true message when pin goes LOW and TRIPPED false when pin is high

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mckenzi
            wrote on last edited by
            #26

            Hi Gohan,

            This is the way i should follow ?:

            	// Read digital motion value
            	
              if(digitalRead(DIGITAL_INPUT_SENSOR) == HIGH){
                tripped = true;
              } else {
                tripped = false;
              }
            

            Not so easy to set :-)

            1 Reply Last reply
            0
            • gohanG Offline
              gohanG Offline
              gohan
              Mod
              wrote on last edited by
              #27

              actually the opposite, then you need to send the tripped value. Pls check the logic with the relay on the sensor

              1 Reply Last reply
              0
              • M Offline
                M Offline
                mckenzi
                wrote on last edited by
                #28

                If my understanding is correct it works as follows:
                (HIGH : when relay is closed, connected to digital pin & 5V VCC)
                1- HIGH->TRUE-> msg.set 1
                2- LOW->FALSE->msg.set 0

                It works but it's very unstable. Sometimes working sometimes not.
                Is it necessary to add some resistors to this circuit?

                1 Reply Last reply
                0
                • gohanG Offline
                  gohanG Offline
                  gohan
                  Mod
                  wrote on last edited by
                  #29

                  In this case you need to debug where problem is, if it is the relay not closing, the arduino not getting the pin change or message send failed. Also pls post all the code you are using.

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    mckenzi
                    wrote on last edited by
                    #30

                    Relay is working correctly, checked with multimeter. Now i'm study about debugging.
                    Below is the code i'm using (4 PIRs).
                    Problem with sleep mode?

                    
                    // Enable debug prints
                    // #define MY_DEBUG
                    
                    // Enable and select radio type attached
                    #define MY_RADIO_NRF24
                    //#define MY_RADIO_RFM69
                    
                    #include <MySensors.h>
                    #define MY_NODE_ID AUTO
                    unsigned long SLEEP_TIME = 5000 ; // 120000 Sleep time between reports (in milliseconds)
                    #define DIGITAL_INPUT_SENSOR1 2   // The digital input you attached your motion sensor.  (Only 2 and 3 generates interrupt!)
                    #define DIGITAL_INPUT_SENSOR2 3   // The digital input you attached your motion sensor.  (Only 2 and 3 generates interrupt!)
                    #define DIGITAL_INPUT_SENSOR3 4   // The digital input you attached your motion sensor.  (Only 2 and 3 generates interrupt!)
                    #define DIGITAL_INPUT_SENSOR4 5   // The digital input you attached your motion sensor.  (Only 2 and 3 generates interrupt!)
                    
                    #define CHILD_ID_PIR1 21   // Id of the sensor child
                    #define CHILD_ID_PIR2 22   // Id of the sensor child
                    #define CHILD_ID_PIR3 23   // Id of the sensor child
                    #define CHILD_ID_PIR4 24   // Id of the sensor child
                    
                    // Enable repeater functionality for this node
                    #define MY_REPEATER_FEATURE
                    
                    // Initialize motion message
                    MyMessage msg1(CHILD_ID_PIR1, V_TRIPPED);
                    MyMessage msg2(CHILD_ID_PIR2, V_TRIPPED);
                    MyMessage msg3(CHILD_ID_PIR3, V_TRIPPED);
                    MyMessage msg4(CHILD_ID_PIR4, V_TRIPPED);
                    
                    void setup()
                    {
                      pinMode(DIGITAL_INPUT_SENSOR1, INPUT);      // sets the motion sensor digital pin as input
                      pinMode(DIGITAL_INPUT_SENSOR2, INPUT);      // sets the motion sensor digital pin as input
                      pinMode(DIGITAL_INPUT_SENSOR3, INPUT);      // sets the motion sensor digital pin as input
                      pinMode(DIGITAL_INPUT_SENSOR4, INPUT);      // sets the motion sensor digital pin as input
                     }
                    
                    void presentation()
                    {
                      // Send the sketch version information to the gateway and Controller
                      sendSketchInfo("PIR Sensor", "0.1");
                    
                      // Register all sensors to gw (they will be created as child devices)
                      present(CHILD_ID_PIR1, S_MOTION);
                      present(CHILD_ID_PIR2, S_MOTION);
                      present(CHILD_ID_PIR3, S_MOTION);
                      present(CHILD_ID_PIR4, S_MOTION);
                    }
                    
                    void loop()
                    {
                    // Read digital motion value (PIR1)
                      bool tripped1 = digitalRead(DIGITAL_INPUT_SENSOR1) == HIGH;
                      if(digitalRead(DIGITAL_INPUT_SENSOR1) == HIGH)
                        tripped1 = true;
                       else 
                        tripped1 = false;
                    // Read digital motion value (PIR2)
                      bool tripped2 = digitalRead(DIGITAL_INPUT_SENSOR2) == HIGH;
                      if(digitalRead(DIGITAL_INPUT_SENSOR2) == HIGH)
                        tripped2 = true;
                       else 
                        tripped2 = false;
                    // Read digital motion value (PIR3)
                       bool tripped3 = digitalRead(DIGITAL_INPUT_SENSOR3) == HIGH;    
                       if(digitalRead(DIGITAL_INPUT_SENSOR3) == HIGH)
                        tripped3 = true;
                       else 
                        tripped3 = false;
                    // Read digital motion value (PIR4)
                      bool tripped4 = digitalRead(DIGITAL_INPUT_SENSOR4) == HIGH;
                      if(digitalRead(DIGITAL_INPUT_SENSOR4) == HIGH)
                        tripped4 = true;
                       else 
                        tripped4 = false;
                      
                    
                      
                      Serial.println(tripped1);
                      send(msg1.set(tripped1?"1":"0"));  // Send tripped value to gw
                      
                      Serial.println(tripped2);
                      send(msg2.set(tripped2?"1":"0"));  // Send tripped value to gw
                    
                      Serial.println(tripped3);
                      send(msg3.set(tripped3?"1":"0"));  // Send tripped value to gw
                      
                      Serial.println(tripped4);
                      send(msg4.set(tripped4?"1":"0"));  // Send tripped value to gw
                      
                    // Sleep until interrupt comes in on motion sensor. Send update every two minute.
                      sleep(digitalPinToInterrupt(DIGITAL_INPUT_SENSOR1), CHANGE, SLEEP_TIME);
                        sleep(digitalPinToInterrupt(DIGITAL_INPUT_SENSOR2), CHANGE, SLEEP_TIME);
                          sleep(digitalPinToInterrupt(DIGITAL_INPUT_SENSOR3), CHANGE, SLEEP_TIME);
                            sleep(digitalPinToInterrupt(DIGITAL_INPUT_SENSOR4), CHANGE, SLEEP_TIME);
                    
                    
                    }
                    
                    1 Reply Last reply
                    0
                    • gohanG Offline
                      gohanG Offline
                      gohan
                      Mod
                      wrote on last edited by
                      #31

                      You can use only 2 interrupts on pin 2 and 3, calling 4 sleep functions is useless

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


                      16

                      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