Read the statement by Michael Teeuw here.
sleep and wake tv with motion
-
Re: [Motion Detection with RaspiCam](Non-Module version)
i have setup motion running and mm as well.My mirror is a LGtv .I edit motion.conf like:# Command to be executed when an event starts. (default: none) # An event starts at first motion detected after a period of no motion defined by event_gap on_event_start vcgencmd display_power 1 # Command to be executed when an event ends after a period of no motion # (default: none). The period of no motion is defined by option event_gap. on_event_end vcgencmd display_power 0that works pretty well sleeping and waking my mirror.My problem is that “vcgencmd display_power 0” doesnt blank my screen and so my tv goes into that horrible screensaver mode with the cube…
But then playing around i noticed that giving/opt/vc/bin/tvservice -pat the Lxterminal instead of waking up my hdmi screen goes to a blank state and its like turned off!!!I thought thats nice plus typing:
/opt/vc/bin/tvservice -p && sudo chvt 6 && sudo chvt 7it wakes up allright.So my linux noob thinking said lets put those commands at motion.
# Command to be executed when an event starts. (default: none) # An event starts at first motion detected after a period of no motion defined by event_gap on_event_start /opt/vc/bin/tvservice -p && sudo chvt 6 && sudo chvt 7 # Command to be executed when an event ends after a period of no motion # (default: none). The period of no motion is defined by option event_gap. on_event_end /opt/vc/bin/tvservice -pIt sleeps ok like i want to but it doesnt wake up.Seems like motion “on_event_start” is giving " /opt/vc/bin/tvservice -p" and not all the command like “/opt/vc/bin/tvservice -p && sudo chvt 6 && sudo chvt 7”.
What can i do my linux experts? -
@costascontis u should ask the motion guys. My module does all that under the covers. I posted an update cause the command execution was throwing an error.
Well, actually, I know how…
The & is a shell operation, so u would have to invoke sh or bash, and pass it the tvservice string u listed
My module has the same problem, now that you mention it… I can’t fix til late today
-
actually i got it to work,starting the motion with sudo motion -n it executes the comands just fine.My screen is turning on and off just fine.I just want to find out how to start motion with pm2 now .
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login