Motion detection with different motion duration


#23

Sorry, This might be better

It just seems to never trigger the 10mins stay on. But the light will stay on as long as its detecting motion. So I just stay in the kitching moving around the lights stay on. But as soon as I leave, to check the logs, off it goes.


18/10/2020, 13:39:06 +286ms
+77ms	║39:6 = INACTIVE at 60 sec
18/10/2020, 13:38:07 +44ms
+386ms	║38:7 = ACTIVE (ON)
18/10/2020, 13:37:57 +35ms
+1472ms	║37:58 = INACTIVE at 75 sec
18/10/2020, 13:37:38 +115ms
+175ms	║37:38 = INACTIVE at 60 sec
18/10/2020, 13:36:38 +582ms
+1739ms	║36:40 = ACTIVE (ON)

ST Logs for the Motion Sensor

b3d64edc-069e-4175-a321-5875021b069d 13:39:06: debug Kitchen Motion reset to no motion after 60 seconds
b3d64edc-069e-4175-a321-5875021b069d 13:38:07: debug Kitchen Motion Parse returned: [name:motion, value:active, descriptionText:Kitchen Motion detected motion]
b3d64edc-069e-4175-a321-5875021b069d 13:38:06: debug Kitchen Motion detected motion
b3d64edc-069e-4175-a321-5875021b069d 13:38:06: debug Kitchen Motion Parsing: read attr - raw: 7EC30104060800001801, dni: 7EC3, endpoint: 01, cluster: 0406, size: 8, attrId: 0000, result: success, encoding: 18, value: 01
b3d64edc-069e-4175-a321-5875021b069d 13:38:06: debug Kitchen Motion Parsing: read attr - raw: 7EC30104060800001801, dni: 7EC3, endpoint: 01, cluster: 0406, size: 8, attrId: 0000, result: success, encoding: 18, value: 01
b3d64edc-069e-4175-a321-5875021b069d 13:36:38: debug Kitchen Motion Parse returned: [name:motion, value:active, descriptionText:Kitchen Motion detected motion]
b3d64edc-069e-4175-a321-5875021b069d 13:36:38: debug Kitchen Motion detected motion
b3d64edc-069e-4175-a321-5875021b069d 13:36:38: debug Kitchen Motion Parsing: read attr - raw: 7EC30104060800001801, dni: 7EC3, endpoint: 01, cluster: 0406, size: 8, attrId: 0000, result: success, encoding: 18, value: 01

#24

You will need to capture at least 13 minutes worth of logs…
(or 12 minutes after the room has cleared)


Note to self:

This piston likely requires variables.
(I forgot to “disable” the sensor at the 75 sec mark)

I am a bit tied up at the moment, so it may take me 12 hours or so to be able to add this to your piston.


#25

Oh yeah, no worries, take your time. :slight_smile:

Anyway, here are the 14m of logs , kitchen needed a tidy up anyway HAHA

18/10/2020, 14:02:34 +287ms
+1799ms	║2:36 = INACTIVE at 75 sec
18/10/2020, 14:02:15 +857ms
+88ms	║2:15 = INACTIVE at 60 sec
18/10/2020, 14:01:15 +615ms
+120ms	║1:15 = ACTIVE (ON)
18/10/2020, 14:01:10 +901ms
+73ms	║1:10 = INACTIVE at 60 sec
18/10/2020, 14:00:03 +872ms
+143ms	║0:4 = ACTIVE (ON)
18/10/2020, 13:59:57 +97ms
+88ms	║59:57 = INACTIVE at 60 sec
18/10/2020, 13:58:57 +221ms
+131ms	║58:57 = ACTIVE (ON)
18/10/2020, 13:58:55 +93ms
+84ms	║58:55 = INACTIVE at 60 sec
18/10/2020, 13:57:55 +670ms
+120ms	║57:55 = ACTIVE (ON)
18/10/2020, 13:57:54 +819ms
+80ms	║57:54 = INACTIVE at 60 sec
18/10/2020, 13:56:52 +306ms
+145ms	║56:52 = ACTIVE (ON)
18/10/2020, 13:56:51 +910ms
+95ms	║56:51 = INACTIVE at 60 sec
18/10/2020, 13:55:51 +177ms
+143ms	║55:51 = ACTIVE (ON)
18/10/2020, 13:55:50 +138ms
+81ms	║55:50 = INACTIVE at 60 sec
18/10/2020, 13:54:50 +696ms
+145ms	║54:50 = ACTIVE (ON)
18/10/2020, 13:54:50 +370ms
+81ms	║54:50 = INACTIVE at 60 sec
18/10/2020, 13:53:49 +864ms
+215ms	║53:50 = ACTIVE (ON)
18/10/2020, 13:53:47 +126ms
+80ms	║53:47 = INACTIVE at 60 sec
18/10/2020, 13:52:47 +784ms
+998ms	║52:48 = ACTIVE (ON)
18/10/2020, 13:52:38 +65ms
+322ms	║52:38 = INACTIVE at 75 sec
18/10/2020, 13:52:19 +176ms
+71ms	║52:19 = INACTIVE at 60 sec
18/10/2020, 13:51:19 +182ms
+357ms	║51:19 = ACTIVE (ON)
18/10/2020, 13:50:23 +58ms
+2827ms	║50:25 = INACTIVE at 75 sec
18/10/2020, 13:50:03 +983ms
+76ms	║50:4 = INACTIVE at 60 sec
18/10/2020, 13:49:00 +344ms
+146ms	║49:0 = ACTIVE (ON)
18/10/2020, 13:48:57 +261ms
+71ms	║48:57 = INACTIVE at 60 sec
18/10/2020, 13:47:57 +541ms
+393ms	║47:57 = ACTIVE (ON)

As you can see, no mater how long I stay in there, it just never initiates the 10min timer


#26

I actually found one of your earlier posts on the same theme with variables. Im testing this now


#27

Yes, that is the general concept, but I think that example will fail with your particular motion sensor.

Even if you were doing a 1 hour marathon jumping-jack-session, your motion sensor will turn inactive every 60 seconds. (IE: 60 times that hour)

I will try to whip you up something tomorrow that takes that into account.


#28

If you have the time that would be great, but in the meantime i’m going to continue playing around. Have to learn somehow lol. I’m just going to keep updating my comments, to tell you where I got with it. But please, just ignore it till you have the time to look at it.

Yeah, I kind of thought this would be an issue and I’m trying to work that out.

I actually got the smart home solver guys Piston from his channel and Im trying to make that work now.

0vbr is the code for it.

Ill let you know how I get on and again, please just ignore my notes here till you get a bit of time for it lol. Enjoy your Sunday, or wherever you are :slight_smile:


#29

Tomorrow came early, LOL

Here is an improved version of my earlier piston, with a counter to keep track.
(as you will see in the logs)

This one is also untested, but it looks solid to me…
Please pause your other “Kitchen Motion” pistons when testing this one.

Note, the count will +1 at each “active”, and reset back to 0 once the room has been clear for 10 min


You could turn Logs completely off, and you will still get basic info at every event…
but if we have to troubleshoot, my first question will likely be for the Full logs., LOL.


#30

Sorry for the late response!

I’ve been neck deep in email server issues :frowning:

I’m in the office right now, Ill test this when I get home and let you know!

Thanks mate, always appreciate your help :slight_smile:


#31

Again, sorry for the slow responses. This email servers been killing me. BUT, finally fixed.

So just testing this now and it seems to work. If I duck in and out, it turns off pretty quickly. If I stay in there for a while its on a lot longer.

21/10/2020, 20:05:26 +177ms
+82ms	║5:26 = INACTIVE at 60 sec = #2
21/10/2020, 20:04:26 +448ms
+179ms	║4:26 = ACTIVE (ON) = #2

Short duration. Ill get the logs for the longer one tomorrow.

I’m going to keep testing over the next few days and ill let you know. But thanks so much for just taking the time to help me out with this. I really appreciate all the effort and information you have given me.

Mean a lot :slight_smile: