How to connect QUIP300 to Domoticz

  • Dear all,

    I would like to ask for your kind support with this PIR. Currently i'm using Arduino UNO (few relays ) as a gateway to Domoticz system installed on my QNAP ( connected via USB cable) . Everything works perfect.

    Now i found that i have old security system which is unused. And there are 4 PIR as on the attached photo.
    alt text
    Is the any chance to conect to my controler(DOMOTICZ) ?
    (ESP8266 Arduino Uno, Raspberry PiOW) ?
    Thanks in advance for any suggestion!

    Best regards.

  • Mod

    if you find the digital output pin you can use a nano or a mini pro with the motion sensor sketch

  • Hardware Contributor

    Hello, be careful as it's powered with 12V and if I believe the doc in Google results min voltage is 8V do it will fry your Arduino.
    There's a relay output on the top right that you could use but it's probably 12V. What's more interesting is the LED connector below the relay output, you should check what voltage you have there when the PIR is triggered.

  • Thank you Nca78 & gohan.
    Sensor is working very well conected to Wemos D1 mini under Domoticz control. Not i'm testing with 9V battery .
    I faced some problems with conection to Arduino . Basic sketch for motion sensor not working for my setup.
    Any clues how to modify my current sketch ? (for relays)

    Thank you.

  • Mod

    I can't see your sketch. What problem are you having exactly?

  • Hello Gohan ,

    Here is my sketch. Arduino is conected via uSB cable to my QNAP.
    And there is few relays conected to Arduino. I would like to avoid wireless conection.

    Now i would like to add PIRs to this sketch.

    // Enable debug prints to serial monitor
    #define MY_DEBUG 
    // Enable and select radio type attached
    //#define MY_RADIO_NRF24
    //#define MY_RADIO_RFM69
    // Set LOW transmit power level as default, if you have an amplified NRF-module and
    // power your radio separately with a good regulator you can turn up PA level. 
    //#define MY_RF24_PA_LEVEL RF24_PA_LOW
    // Enable serial gateway
    // Define a lower baud rate for Arduino's running on 8 MHz (Arduino Pro Mini 3.3V & SenseBender)
    #if F_CPU == 8000000L
    #define MY_BAUD_RATE 38400
    // Flash leds on rx/tx/err
    // Set blinking period
    // #define MY_DEFAULT_LED_BLINK_PERIOD 300
    // Inverses the behavior of leds
    // Enable inclusion mode
    // Enable Inclusion mode button on gateway
    // Inverses behavior of inclusion button (if using external pullup)
    // Set inclusion mode duration (in seconds)
    // Digital pin used for inclusion mode button
    // Uncomment to override default HW configurations
    //#define MY_DEFAULT_ERR_LED_PIN 4  // Error led pin
    //#define MY_DEFAULT_RX_LED_PIN  6  // Receive led pin
    //#define MY_DEFAULT_TX_LED_PIN  5  // the PCB, on board LED
    #include <SPI.h>
    #include <MySensors.h>  
    #include <Bounce2.h>
    // Enable repeater functionality for this node
    #define RELAY_1  4  // Arduino Digital I/O pin number for first relay (second on pin+1 etc)
    #define NUMBER_OF_RELAYS 1 // Total number of attached relays
    #define RELAY_ON 1  // GPIO value to write to turn on attached relay
    #define RELAY_OFF 0 // GPIO value to write to turn off attached relay
    #define BUTTON_PIN A1
    void before() { 
      for (int sensor=1, pin=RELAY_1; sensor<=NUMBER_OF_RELAYS;sensor++, pin++) {
        // Then set relay pins in output mode
        pinMode(pin, OUTPUT);   
        // Set relay to last known state (using eeprom storage) 
        digitalWrite(pin, loadState(sensor)?RELAY_ON:RELAY_OFF);
    Bounce debouncer = Bounce();
    void setup() { 
      // Setup locally attached sensors
       // Setup the button.
      // After setting up the button, setup debouncer.
    void presentation()  
      // Send the sketch version information to the gateway and Controller
      sendSketchInfo("Relay", "1.0");
      for (int sensor=1, pin=RELAY_1; sensor<=NUMBER_OF_RELAYS;sensor++, pin++) {
        // Register all sensors to gw (they will be created as child devices)
        present(sensor, S_LIGHT);
    MyMessage msg(1, V_LIGHT);
    void loop() { 
      // Send locally attached sensor data here 
      if (debouncer.update()) {
        // Get the update value.
        int value =;
        // Send in the new value.
        if(value == LOW){
             saveState(1, !loadState(1));
             digitalWrite(RELAY_1, loadState(1)?RELAY_ON:RELAY_OFF);
    void receive(const MyMessage &message) {
      // We only expect one type of message from controller. But we better check anyway.
      if (message.type==V_LIGHT) {
         // Change relay state
         digitalWrite(message.sensor-1+RELAY_1, message.getBool()?RELAY_ON:RELAY_OFF);
         // Store state in eeprom
         saveState(message.sensor, message.getBool());
         // Write some debug info
         Serial.print("Incoming change for sensor:");
         Serial.print(", New status: ");

    How to make it ? I'm newbie - sorry.


  • Mod

    Just copy the code from motion sensor sketch, assign a child ID to the pir sensor, present it and in code just check pin status with digitalread() and send value changed from last send

  • Hey gohan, thanks - basic sketch will do the job.
    I faced another problem. Now i've conected one of the PIR via WemosD1 mini with ESP Easy.0_1497208049084_DSC_0864.JPG
    And works very well.
    But i would like to connect 3 more sensors.
    Power supply for PIR and Wemos is different and there is only one GND pin .
    Any idea how to make it?

  • Mod

    3 more sensor to the same wemos?

  • Yes. Possible?

  • Mod

    With mysensors it is possible, with esp easy I don't know.

  • I can swich to MySensors- no problem.

  • Hi Gohan, please see my set up i more details.
    Each of PIR is conected to old/not used alarm control panel.
    Now it is used as power supply. I've just ordered Arduino Nano + nRF24L01 to conect all motion sensors. I would like to use one of free port to power my node (thru voltage step down : 12V->5V)
    How should i conect sensors to node?

  • Mod

    Do you want to put the nano in that panel?

  • Hi, panel will be use as a power supply only.

  • Mod

    Ok, but if you put the nano in that location you will have the yellow cables coming back from the PIR sensors and you would have to use those to connect to digital pins of the arduino, the problem is that you need to check what is the voltage that most likely will be over 5V and you would need to find a way to lower it.

  • Yellow cable is connected to PIR's relay. And this cable i'm going to conect to digital input of arduino.
    Second cable from PIR's relay will be connnected to arduino's GND pin. ( not shown on this photo).
    There is no voltage on PIR's relay ( works as simple switch).
    Is my understanding correct ?

  • Mod

    If it is just a relay ok, I thought you were using the output of the pir sensor, but always check before connecting to the Arduino

  • So how to connect 4 PIRs to one node to be able to see in Domoticz which was acivated ?

  • Mod

    Connect each one on a different digital pin and create a different child id for each pir sensor and present all of them, it is just replicating 4 times the code of the motion sensor sketch.

Log in to reply





Looks like your connection to MySensors Forum was lost, please wait while we try to reconnect.