Wiring experts and coding hero’s I need your help!

Right, but it looks like based on that diagram that the direction was to hook the motion sensor inline in some way with the Relay. Do we have a method to integrate the Motion sensor without it being inline with the relay and power, Does Qubino support that.

This is why i made my ponit about them being sepreate.

If the motion sensor is completely independent from the Switch and can be seen as such then the stuff i provided should work. If it has to be wired in with the relay though that would certainly cause issues with creaing functions in HE in general.

Even with the GE Motion Sensor swtich i have i had to disable it's ability for the motion sensor to control the switch. It caused bad behaviors when trying to do this same thing. I had to set it to be completely manual.

The motion sensor needs to be completly independent of the power and relay. The command for the relay to turn on needs to be from Hubitat, and not the relay device. The flows would be

  1. Motion is detected and sends the active flag to HE
  2. HE see the motion senor goes active and then send the on command to the relay

He is using a dual relay, so technically the PIR and switch are separated. I just suggested to wire both outputs to the light together so that either relay would turn on the light.

The problem (assuming it is wired up right) is that if the power to an input is switched on, and you tell the relay to turn off from the hub it fights it and turns back on again. Which doesn't make any sense, you would think they would have provided a way for that work, otherwise what is the point of having a switch attached to it.

Possibly removing the motion sensor output would work better, then you just get the state of the motion sensor and can control the load with the switch and hub. I think originally OP wanted to have the motion sensor directly control the light without rules on the hub. In this case only the output tired to the switch would be connected to the light, but if the relay still fights being turned off when the switch is on it still won't work.

image

I think the logic of using the smart lighting app is maybe the way forward. I also think that the qubino is faulty as i cant switch it on and off now with the physical switch might have blown when it was having issues.

I've gone back to the aeotec and can switch the relay on and off however the moment i introduce the switched live from the pir into s2 the relay seems to start acting up. I reckon theres some sort of interference on the switched live from the pir that the switch cant cope with. I've ordered a fibaro dual relay to see if thats any better.

@jtp10181 I did want to have it so that the sensor was the controlling device however at this point i'll take anything!

What happens if you don't connect the PIR to the light and just connect it ton the switch imput. Can it stll detect motion and send it to HE, Does that mean sthe switch will work as expected?

Thats what I was getting at with my diagram up above. Motion only connect to the IN1 and then OUT1 is not connected to anything. Switch goes to IN2 and OUT2 goes to light. That could solve the issue but you will need RL or rules to trigger the light for motion.

Something I suspect is that it may not know how to deal with a motion sensor. I think it should work, but maybe there is something in the mode for that input that isn't compatible with a motion sensor device. What are the switch modes set to.

When looking at the manual it appers to have 5 modes. 0 for Unidentified, 1 for traditional switch, 2 for 3 way switch mode, 3 for Momentar button, and 4 for automatic mode. Do we know how it is set?

That same part of the documenation sais it is only compatiable with 3 switches: Standard toggle, momenatry Push, and the wall swipe panel for the nano.

The image above isn't exactly complete for a wiring diagram. There are a few connections missing.

Is this a ZQ139 or ZW140

Honestly i think with the amount of a pain this is being and the cost of the aeotec nano i would look at just putting a GE Jasco motion switch in it's place. It will end up being cheaper in the long run then trying to retro fit this to work

I was assuming this is an outdoor light with a motion sensor on it. He possibly has said that somewhere but I cannot find it. The motion sensor supposedly just opens/closes a circuit so it basically is a switch. To me it sounds like either something is not being explained correctly, or it is not wired properly. Without having either of these devices to test though I cannot be certain if it normal device behavior or not.

Here was an older post with a picture of a regular Nano that was wired up: Aeotec nano switch logic with pir and switch

That image is of a Aeotec Nano ZW139 i believe that is for a single load. If that is what the OP is using there is no way to seperate the Motion sensor from the switch and so they would be possibly fighting each other. So if that is the device we are trying to use right now that won't work to seperate the motion and the switch control.

That was the original plan was using the single, and I explained in a PM convo why it would not work well. Was switched to a Dual, its in the PM convo I sent @mavrrick58 a screenshot of.

I'm back! So to answer a few questions, this is a separate indoor pir sensor, the physical switch is also separate. I'm using a 2 relay unit and are trying to get signals from both the switch and the sensor.

we have progress!!!!!!!!!

Mainly for reference in case anyone else is doing this set up, the aeotec dual relay and the fibaro dual relay will not work. the aeotec cant get the switching right and fibaro cant see the sensor signal for some reason.

I've gone back to the quibino and managed to get the physical switch turning the light on and off and also the sensor signal into s2. so we now have both signals :slight_smile:

At this point i'm happy to have lights again via a switch.......no to try make it smart. Trying to keep it simple by just having the lights turn on using the pir via rl as suggested but its not working, any suggestions?

If you click on activate on that screen does it turn on. Can you turn it off from that screen by clicking the turn off button.

yeah if i click the state button it turns the lights on

So the light you are trying to control is on a different smart device from the PIR and switch? Now I am very confused. Or what is going on here? What is Switch 1 vs Switch 2 on the relay?
What is the Bedroom 5 - bathroom lights?
What is connected to the output of the relay 1 and 2?

haha sorry!

Ok so bed 5 is the module, i have the physical switch connected to s1, pir to s2 then the lights connected to output 1.

The device has two outputs, so switching the parent device possibly is switching both.
I would add just the S1 as the "light".

You could actually rename the S1 and S2 to be what they are, it will help it make more sense. The parent device could be named something like "Bedroom 5 Bath Lights Relay". Child devices could be named as the switch and the motion for that, whatever names you want.

To start with, put S1 as the device to control, S2 is the means to activate.

Turn on both logging options on RL. At least info logging on the device (parent and childs).

Try it out and screenshot the logs, post logs output.

ok, so using the activate seems to turn on both relays however when just s2 triggers it just turns on one relay output (2) for some reason even though the module is selected to turn on which i would guess as it turns both on via activate that it would do just that but it doesn't.

I was going to bridge output 1 and 2 but I've walked up and down the stairs about 100 times now. Ended up writing this

IF (Qubino 2 Relay Module - Switch 2(off) is on(F) [FALSE]) THEN :scissors:
On: Qubino 2 Relay Module - Switch 1 :scissors:
ELSE :scissors:
Off: Qubino 2 Relay Module - Switch 1 :scissors:
END-IF

which has worked without using RL and its not too bad speed wise either!! I'll need a day or so to test to make sure but its all heading in the right direction thanks to everyone's input

That basically what I suggested to setup in RL, but it sounds like you have abandoned that, so, ok.

I would strongly suggest you look at Enbrighten Z-Wave Plus Smart Motion Sensor Light Switch, On/Off, Vacancy / Occupancy Sensor, Includes White and Lt. Almond, Zwave Hub Required, Works with SmartThings, Wink, and Alexa, 26931 https://a.co/d/3kRTd5h

This zwave plus switch includes a motion sensor and can be set to trigger based on occupancy, or vacancy, or manually from the hub. Thr sensor is near 180 degree detection from the switch. I honestly feel like this was overcomplicated. I wouldn't urge anyone to go the route this thread did to accomplish this unless there is no other option.

@jtp10181 that’s what I tried but RL wouldn’t turn on both relays for some reason.

@mavrrick58 you’re right that would be much easier but it’s not available in this country. The ge sensor that was suggested is basically what I’ve been able to do here.

After test I need to update the code so that when output 1 is on the sensor doesn’t take over. Once I work out how to do that it should be near to working perfectly

If that is true then all you need to do to accomplish this ask is setup the rule in RM as i stated above and then setup the room lighting app as I said above.

I really would advise against trying to use the PIR sensor as a directly controlling device. If you do you take away the ability of HE to have any input on what is happening and are completely at the mercy of what the abilities of the Qubino device is you are integrating with. Honestly at that point i am not sure what you are gaining with it being integrated with HE. Well other than simply being able to turn it on/off from HE.

That said does the Qubino have the ability to change the control options based on the other switch input. If not this won't work.