motion detection for unlock screen

Post your questions and help other users.

Moderator: Martin

Post Reply
minourm
Posts: 2
Joined: 12 Oct 2018 09:37

motion detection for unlock screen

Post by minourm » 12 Oct 2018 20:04

Hi,

I am new with automagic and I am building a picture frame with an old tablet.
I want to save energy, so the screen should not be on all the time, only when people are around.
I use the app "motion dectetor" which triggers a broadcast that automagic can receive.
I have made a flow that has the motion detector as trigger.
Than the condition is asked. Is the screen on.
If no - than light the screen, pause for 5 minutes, lock the screen.

Now I want to add the answer yes for the condition - set the pause timer to its begining.
When a movement is detected during the pause the flow should be set back to the beginning of the pause.
So that after five minutes without motion the screen will lock. But if there is movement the screen will stay on.

I tried to use the pause action also on the yes condition but it does not work. With this i get numerous instances of pause.

I there a way to achive this. I am thankfull for any suggestion.

Greetings Minorum

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: motion detection for unlock screen

Post by Desmanto » 13 Oct 2018 06:16

It is very similar to my screen saver flow. Just replace the touch of the UI element with your broadcast. Change the sleep to 5 minutes. Adjust other parameter accordingly.
viewtopic.php?f=3&t=6963
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

minourm
Posts: 2
Joined: 12 Oct 2018 09:37

Re: motion detection for unlock screen

Post by minourm » 20 Oct 2018 06:04

Thank you.
I took a while but I worked it out.
I did not know the execution policy. But with the stop setting there it works fine.

:D

Post Reply