• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

HELP to use a cam with MM PLEASE

Scheduled Pinned Locked Moved Unsolved Troubleshooting
19 Posts 6 Posters 6.4k Views 4 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    axel @shbatm
    last edited by Jan 10, 2019, 6:33 PM

    @shbatm
    it works well but now i tried To start mjpg on boot in vain. I used the crontab but how To write it with the options??

    B 1 Reply Last reply Jan 11, 2019, 2:03 AM Reply Quote 0
    • B Offline
      bhepler Module Developer @axel
      last edited by bhepler Jan 11, 2019, 2:04 AM Jan 11, 2019, 2:03 AM

      @axel - Create a script with your command, name it something obvious like startcam.sh. Make it executable with chmod +x startcam.sh and then use pm2 to autostart and maintain the script: pm2 start startcam.sh When you’re satisfied with pm2’s handling, save the state: pm2 save

      In the future, please use the markdown features of the board when posting code & logs.

      A 1 Reply Last reply Jan 11, 2019, 1:59 PM Reply Quote 0
      • A Offline
        axel @bhepler
        last edited by Jan 11, 2019, 1:59 PM

        @bhepler
        i did it but the status is not online but stopped. After a moment, the status changed To errored!! Help please…

        B 1 Reply Last reply Jan 11, 2019, 6:37 PM Reply Quote 0
        • B Offline
          bhepler Module Developer @axel
          last edited by Jan 11, 2019, 6:37 PM

          @axel - Okay. Let’s skip PM2 for now and just concentrate on getting your script running.

          Edit the startcam.sh script and paste in the mjpg_streamer command:
          mjpg_streamer -o ā€œoutput_http.so -w ./wwwā€ -i ā€œinput_uvc.so -f 1 -q 75 -yā€ -p 8081

          Once you have the script file to where it’s only that command, you can try to run that script manually by typing ./startcam.sh. That should be the equivalent of typing the command in yourself.

          Try that and let us know how it goes.

          A 1 Reply Last reply Jan 14, 2019, 3:59 PM Reply Quote 0
          • A Offline
            axel @bhepler
            last edited by axel Jan 14, 2019, 3:59 PM Jan 14, 2019, 3:59 PM

            @bhepler
            Ok i can run manually the script.
            and now?
            šŸ˜‰

            S B 2 Replies Last reply Jan 14, 2019, 4:01 PM Reply Quote 0
            • S Offline
              sdetweil @axel
              last edited by sdetweil Jan 14, 2019, 4:02 PM Jan 14, 2019, 4:01 PM

              @axel he said

              you can try to run that script manually by typing ./startcam.sh.
              

              he left off that you need to mark the script as executable

              chmod +x ./startcam.sh
              

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              A 1 Reply Last reply Jan 14, 2019, 4:04 PM Reply Quote 0
              • A Offline
                axel @sdetweil
                last edited by Jan 14, 2019, 4:04 PM

                @sdetweil
                i did it before šŸ˜‰

                1 Reply Last reply Reply Quote 0
                • B Offline
                  bhepler Module Developer @axel
                  last edited by Jan 14, 2019, 8:48 PM

                  @axel - Now that you can run your script and have it execute the command (I’m assuming that when you run the script, it does what you want) you just have to tell pm2 to manage that script.

                  Tell pm2 to manage the script: pm2 start startcam.sh
                  Tell pm2 to remember & autostart the script: pm2 save

                  Let us know how it goes.

                  1 Reply Last reply Reply Quote 0
                  • 1
                  • 2
                  • 2 / 2
                  2 / 2
                  • First post
                    16/19
                    Last post
                  Enjoying MagicMirror? Please consider a donation!
                  MagicMirror created by Michael Teeuw.
                  Forum managed by Sam, technical setup by Karsten.
                  This forum is using NodeBB as its core | Contributors
                  Contact | Privacy Policy