Trouble with motion rule: zwave, expire, aeotec multisensor 6

I have also this multisensor 6 but not really troubles.
The sensor is not the fastest but is okay for me so far.

I guess you have the wrong parameter, “detect time end” is the time how long the sensor will ignore motion.
There is another parameter where you can set the time until it will send an “OFF” signal.
So in my rule no need for expiry or anything else, just a simple “ON” (depending on luminosity) and “OFF”.

That is in the proxy Item definition.

No, I meant a parameter:

Just seen that this the parameter @Curtis mentioned above :roll_eyes:

1 Like

I’ve done the same config with the two parameters.

But as I wrote before, sometimes it is working perfect, sometimes not. No OFF is received by teh z-wave switch item related to this channel.

Philio PIR is more relyable here.

Yes I’m not that confident with rules just yet so most of my rules are split so I can get my head around them a bit easier.

Yes my proxy item is reset using the expire binding so that is not included in my rule

Switch Swi_MSensor_Motion_Proxy "Proxy" { expire="1m,command=OFF" }

If you could post your working rule here when you get chance that would be really helpful thanks as I can test :+1:t2:

@Bruce_Osborne is correct, I don’t do anything with the off command of the sensor as my proxy does that for me. When the sensor sends the ON command that is the only trigger I require. With parameter 3 set to 15 sec it should send the ON command every 15 seconds if I’m constantly moving in front of it. Or at least that is what I assume.

Thanks all for helping me with this.

I have altered this ruleto suit my home using Hue lights Aeotec MultiSensor 6 (with default settings) and have absolutely no issues with motion detection for lighting`

I don’t have this device, but I am familiar with many others and what you describe does not sound correct. With this parameter set to 15, the sensor will not send OFF until 15s after it stops detecting motion. I agree with what @chris4789 is suggesting and this is how all my motion automation works. There is no need for timers or expire, since the sensor takes care of this for you.

Have you tried removing expire and setting parameter 3 to the time you want the light to stay on?

Should your sensor remain continuously triggered, the light will always timeout with your existing rule.

Considering different logic:
When motion start detected,turn on light. Set timer off/cancel.
When motion end detected, begin timer.

I agree yes I could make it simpler and have the sensor do the expire job but I would have more control my way. For instance what if I want a switch in the OpenHAB UI to turn off motion detection so the manual light switch then acts normally. Doing it in the parameter would essentially hard code the ability so I could not switch it off once set.

As it stands the sensor sends an on command then an off command after 15 seconds.

I don’t follow you. To disable the automation, just add a proxy Item to the rule that turns the light on and off with motion. If the proxy Item is on, then do nothing, similar to what you have now.

Doh, yep I had a think about my message after I sent it and yes I could do what you suggest. I’ll try thanks. I’ll adjust my rule, will remove the expire and increase parameter the 3 to my prefered expire time.

1 Like

That’s what you think, but we cannot see it.
With the rules sending commands, your events.log should provide an excellent evidence trail of what is sensed, what your rules are doing and when.
A snippet of a dance session would be good.

I have 2 of the same sensors.
The OFF command is sent 15secs AFTER the movement stopped, not 15 secs after the movement.
That’s why a fixed expire won’t work in this case.

To use a fixed expire the timeout has to set to a very small value (e.g. 1 sec).

2 Likes

Try something this…

rule "Sensor motion changed"
when
    Item Swi_MSensor_Motion changed
then
    if (Swi_MSensor_Motion_Disable.state == OFF) {
        Swi_Light.sendCommand(Swi_MSensor_Motion.state.toString)
    }
end

Swi_MSensor_Motion_Disable is the proxy Item for disabling the rule.

:grin: Don’t suppose a video would be helpful too. While dancing and creating some logs I noticed @Spaceman_Spiff post…

This makes soooo much more sense now!!! Understanding this will help me a lot. So I need to look into a different method.

You could do something radical like begin the timing when the motion stops …

This isn’t hard folks, just requires logic.

Let me add a bit more detail;

When motion goes ON, turn the light ON.
You don’t need any timing here - if you got motion, you want the light on.
If the timer is running, cancel it.
That is possible with expire - you postUpdate your expiring Item to its “finished” value. There’s no off command, so your light-off rule is not triggered.

When motion goes OFF, now you want to begin timing by poking your expiring Item.

OK, here is one of mine with 3 sensors. Be sure you have the Expire addon installed.
Items:

Switch BasementTimer { expire="2m,command=OFF" }
Switch basement_light "Basement Light [%s]" <light> (basement) { channel="zwave:device:16ddbcdbd38:node12:switch_binary" }
Switch basement_motion_top "Basement Motion Top [%s]" <motion> (basement) { channel="zwave:device:16ddbcdbd38:node13:alarm_motion" } 
Switch basement_motion_bottom "Basement Motion Bottom [%s]" <motion> (basement) { channel="zwave:device:16ddbcdbd38:node14:alarm_motion" }
Switch basement_motion_pap "Basement Motion Papillon [%s]" <motion> (basement){ channel="zwave:device:16ddbcdbd38:node11:sensor_binary" }

Rules:

rule "Basement Motion Top"
when
    Item basement_motion_top changed from OFF to ON
then
    basement_light.sendCommand(ON)
    // start or reset Timer
    BasementTimer.sendCommand(ON)
end

rule "Basement Motion Bottom"
when
    Item basement_motion_bottom changed from OFF to ON
then
    basement_light.sendCommand(ON)
    // start or reset Timer
    BasementTimer.sendCommand(ON)
end

rule "Basement Motion Pap"
when
    Item basement_motion_pap changed from OFF to ON
then
    basement_light.sendCommand(ON)
    // start or reset Timer
    BasementTimer.sendCommand(ON)
end

rule "Basement Light Off"
when
    Item BasementTimer changed from ON to OFF
then
    basement_light.sendCommand(OFF)
end

I did one rule for each sensor because, to me, it seemed to be more consistent than putting all the sensors in the same rule.

1 Like

Great, thanks for posting this our rules are similar so at least I know what I was doing was correct… well that is if the sensor worked as I assumed.

I’ve studied your detail for about and hour and I am really struggling to understand the idea. Sorry I’m only a beginner really.

What timer, my proxy? my head hurts :thinking:

1 Like

So set that timer for the OFF command to 5 seconds, for instance. If you want to be precise, then set the timer for 55 seconds instead of a minute, to compensate.