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 9.0k 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.
    • Mykle1M Offline
      Mykle1 Project Sponsor Module Developer @axel
      last edited by

      @axel

      https://github.com/alexyak/camera will take selfies and send them to a host of email accounts and it’s written by the same author as the motiondetector module mentioned by @bhepler

      Create a working config
      How to add modules

      1 Reply Last reply Reply Quote 1
      • S Offline
        sdetweil
        last edited by sdetweil

        and my MMM-SleepWake works with webcam for motion detection and Lucy for remembering which modules are hidden when waking by voice or movement

        and supports three different screen off approaches, tvservice (pi only) dpms (some monitors) and screen blanking(for auto power off devices, like TVs, EnergyStar)

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 2
        • Mykle1M Offline
          Mykle1 Project Sponsor Module Developer @axel
          last edited by Mykle1

          @axel

          I would go with MMM-SleepWake because it’s a newer module and it’s fully supported by our friend, @sdetweil

          Create a working config
          How to add modules

          1 Reply Last reply Reply Quote 1
          • A Offline
            axel
            last edited by

            thank toi guys for your answers but what i want is to see my usb cam in live on the mirror! is there a module for that please?

            ? S 2 Replies Last reply Reply Quote 0
            • ? Offline
              A Former User @axel
              last edited by

              @axel
              If your webcam has IP or URL address to stream video output, MMM-RTSP… or some iFrame modules could work.

              1 Reply Last reply Reply Quote 1
              • S Offline
                shbatm Module Developer @axel
                last edited by

                @axel said in HELP to use a cam with MM PLEASE:

                see my usb cam in live on the mirror!

                If you can get an RTSP stream URL from your IP camera you can use my module: MMM-RTSPStream. Use the develop branch right now–and search this forum if you’re having issues getting it to work.

                If you want to stream your USB camera by hooking it up to the Pi, you can look at something like mjpg-streamer (Google ‘OctoPrint mjpg-streamer setup’ for some good guides) and then use MMM-iframe to show the image.

                A 1 Reply Last reply Reply Quote 1
                • A Offline
                  axel @shbatm
                  last edited by

                  @shbatm
                  i try to use mjpg_streamer :
                  $ mjpg_streamer -o “output_http.so -w ./www” -i “input_uvc.so -f 1 -q 75 -y”

                  but i have this error : bind:Address already in use.
                  also : Innappropriate ioctl for device (25)

                  help!

                  S 1 Reply Last reply Reply Quote 0
                  • S Offline
                    shbatm Module Developer @axel
                    last edited by

                    @axel said in HELP to use a cam with MM PLEASE:

                    bind:Address already in use.

                    The default port is the same as the Mirror, 8080. Try adding -p 8081 to your command to change the port.

                    A 2 Replies Last reply Reply Quote 0
                    • A Offline
                      axel @shbatm
                      last edited by

                      This post is deleted!
                      1 Reply Last reply Reply Quote 0
                      • A Offline
                        axel @shbatm
                        last edited by

                        @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??

                        bheplerB 1 Reply Last reply Reply Quote 0
                        • bheplerB Offline
                          bhepler Module Developer @axel
                          last edited by bhepler

                          @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 Reply Quote 0
                          • A Offline
                            axel @bhepler
                            last edited by

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

                            bheplerB 1 Reply Last reply Reply Quote 0
                            • bheplerB Offline
                              bhepler Module Developer @axel
                              last edited by

                              @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 Reply Quote 0
                              • A Offline
                                axel @bhepler
                                last edited by axel

                                @bhepler
                                Ok i can run manually the script.
                                and now?
                                😉

                                S bheplerB 2 Replies Last reply Reply Quote 0
                                • S Offline
                                  sdetweil @axel
                                  last edited by sdetweil

                                  @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 Reply Quote 0
                                  • A Offline
                                    axel @sdetweil
                                    last edited by

                                    @sdetweil
                                    i did it before 😉

                                    1 Reply Last reply Reply Quote 0
                                    • bheplerB Offline
                                      bhepler Module Developer @axel
                                      last edited by

                                      @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

                                      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
                                      • 1 / 1
                                      • First post
                                        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