How to connect QUIP300 to Domoticz
-
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)
0_1497042712762_GatewaySerialWired.inoThank you.
-
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 MY_GATEWAY_SERIAL // 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 #endif // Flash leds on rx/tx/err // #define MY_LEDS_BLINKING_FEATURE // Set blinking period // #define MY_DEFAULT_LED_BLINK_PERIOD 300 // Inverses the behavior of leds // #define MY_WITH_LEDS_BLINKING_INVERSE // Enable inclusion mode #define MY_INCLUSION_MODE_FEATURE // Enable Inclusion mode button on gateway #define MY_INCLUSION_BUTTON_FEATURE // Inverses behavior of inclusion button (if using external pullup) //#define MY_INCLUSION_BUTTON_EXTERNAL_PULLUP // Set inclusion mode duration (in seconds) #define MY_INCLUSION_MODE_DURATION 60 // Digital pin used for inclusion mode button #define MY_INCLUSION_MODE_BUTTON_PIN 3 // 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 MY_REPEATER_FEATURE #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 delay(10000); // Setup the button. pinMode(BUTTON_PIN, INPUT_PULLUP); // After setting up the button, setup debouncer. debouncer.attach(BUTTON_PIN); debouncer.interval(5); //presentation(); } 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 = debouncer.read(); // Send in the new value. if(value == LOW){ saveState(1, !loadState(1)); digitalWrite(RELAY_1, loadState(1)?RELAY_ON:RELAY_OFF); send(msg.set(loadState(1))); } } } 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(message.sensor); Serial.print(", New status: "); Serial.println(message.getBool()); } }How to make it ? I'm newbie - sorry.
Regards.
-
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.
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? -
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? -
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 ?