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.



  • Have a look at this thread maybe this will bring you joy https://forum.magicmirror.builders/topic/9384/mmm-voice-ugly-hdmi-banner/42 i’m now looking at another way to turn my tv on and off. PS The Dev is a great help



  • I don’t know anything about pm2.

    I also don’t stress my video with motion, or record snapshots. Only use the motion events

    I use my own script to start my mirror



  • 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.



  • @costascontis ok. I don’t understand how it could do that. Motion is installed outside the mm folders.



  • 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.



  • @costascontis well. Motion is streaming on port 8080, and mm wants to use same port, but can’t.

    Change the motion config to use a different port, or don’t stream



  • nope my motion streams at 8081.



  • Well it’s coming out on mm, which is using 8080 normally



  • 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 .