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 .
Read the statement by Michael Teeuw here.
Posts
-
RE: sleep and wake tv with motion
-
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 0
that 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 -p
at 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 7
it 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 -p
It 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? -
RE: [MMM-RTSPStream] - Video Streaming from Live Feeds & Security Cameras
i tested the bunny rtsp and another camera that output a “rtsp://ipcamera:554/ch0.h264” link and both work,so i think the camera i want to use that output the “rtsp://ipcamera:554/12” link has a problem with omxplayer.I will look at pm2 logs and i ll get back to you,thanx
edit : the links that worked for me did not auto started but i had to press pause and play again.pm2 log :
/home/pi/.pm2/logs/mm-out.log last 15 lines: 0|mm | Starting stream stream1 with args: [ 0|mm | "--avdict", 0|mm | "rtsp_transport:tcp", 0|mm | "--win", 0|mm | "738, 63, 1090, 305", 0|mm | "--live", 0|mm | "--video_queue", 0|mm | "4", 0|mm | "--fps", 0|mm | "30", 0|mm | "rtsp://admin:@192.168.1.108/12.h264" 0|mm | ] 0|mm | PM2: omx_stream1 already running. Stopping old instance... 0|mm | Starting PM2 for omx_stream1 0|mm | PM2 started for omx_stream1
i see no error but no streaming,only the name of the cam and black screen…
-
RE: [MMM-RTSPStream] - Video Streaming from Live Feeds & Security Cameras
hi ,trying to use this module to watch an ip cam.After i start MM i get in the log:
Starting stream stream1 with args: [ "--avdict", "rtsp_transport:tcp", "--win", "738, 63, 1090, 305", "--live", "--video_queue", "4", "--fps", "30", "rtsp://admin:@192.168.1.108:554/12?" ] error: object file .git/objects/0a/340d5d575f5675a19c2108bb1acc9f20576259 is empty error: object file .git/objects/0a/340d5d575f5675a19c2108bb1acc9f20576259 is empty fatal: loose object 0a340d5d575f5675a19c2108bb1acc9f20576259 (stored in .git/objects/0a/340d5d575f5675a19c2108bb1acc9f20576259) is corrupt fatal: The remote end hung up unexpectedly Starting PM2 for omx_stream1 PM2 started for omx_stream1
when i press pause and play again i get:
Stopping stream stream1 Stopping PM2 process: omx_stream1 Starting stream stream1 with args: [ "--avdict", "rtsp_transport:tcp", "--win", "738, 63, 1090, 305", "--live", "--video_queue", "4", "--fps", "30", "rtsp://admin:@192.168.1.108:554/12?" ] Starting PM2 for omx_stream1 PM2 started for omx_stream1
I just get a blank screen.Steam is working nice with vlc,its the second low res stream of this camera.
config:module: "MMM-RTSPStream", position: "top_center", config: { autoStart: true, rotateStreams: true, rotateStreamTimeout: 10, moduleWidth: 354, moduleHeight: 240, localPlayer: 'omxplayer', remotePlayer: 'none', showSnapWhenPaused: false, remoteSnaps: false, stream1: { name: 'bibicam', url: 'rtsp://admin:@192.168.1.108:554/12?', frameRate: undefined, width: undefined, height: undefined, }, } }
any ideas?
-
RE: weird problem with mm and motion(noob inside)
i changed the motion ‘Stream_port’ to 8181 but its still coming out on mm
edit: but motion’s webcontrol port was at 8080 so i changed it and now its ok .Thnx for the idea mate .
-
RE: weird problem with mm and motion(noob inside)
nope my motion streams at 8081.
-
RE: weird problem with mm and motion(noob inside)
i cant understand it either thats why i need help :).I test the whole thing now that i have some spare time (kids sleeping).I killed pm2,cleardump it and closed the daemon just to get it out of the way.I start Motion daemon and works normally streaming my cam.Then i ~cd /MagicMirror and npm start to open my mirror , and i get this which is my camera.I quit that,stop Motion by sudo service motion stop and then i restart my mirror (~cd /MagicMirror and npm start) and my mirror starts normally. So…if Motion is running i cant start MM.If i stop Motion I can start MM and then start Motion and all ok.I cant understand it.I think i have to find a way to first start MM wait a few seconds and then start Motion.
-
RE: weird problem with mm and motion(noob inside)
i dont think that pm2 has something to do with the problem.Even if i kill pm2 and start mm with npm start from inside MM directory it doesnt start MM but Motion.
-
weird problem with mm and motion(noob inside)
Have my mm up and running so i wanted to test the MMM-sleepwake module so my ps3 eye cam turn on/off my screen when detect motion.I am a linux noob so i found this easy guide to install Motion so i can use it with the sleepwake module.I did it and i have a motion server streaming my camera ok.The problem is that when i rebooted pm2 didnt start my MagicMirror but Motion.I see a black screen with my camera at the top left and several config options of Motion.I minimized, stop with “pm2 stop mm” and rebooted.Still pm2 starts Motion and no MagicMirror.What am i doing wrong?
edit : If i “sudo service motion stop” then my pm2 starts my MM normally. -
RE: MMM-SleepWake not working
thnx,its just too much reading for me at this time of year,i just need to on/off my display when motion detect.I ll skip that feature for now :)