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

CORS, MotionEye & MMM-Remote-Control

Scheduled Pinned Locked Moved Bug Hunt
13 Posts 4 Posters 2.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.
  • S Offline
    SdeGeata
    last edited by Nov 21, 2022, 11:13 PM

    So this is not so much of a bug as a conflict within the system. It seems that since verson 2.17, CORS is preventing MMM-MotionEye from loading an image. I just get a broken image icon. If I change address: "0.0.0.0", to address: "localhost",, I get an image, but can no-longer run it from the web interface or command line. Further, MMM-Remote-Control requires address: "0.0.0.0", be set in config.js.

    I have messed with all kinds of ip whitelist stuff to no avail, as well as played with all kinds of options in motion.conf and motioneye.conf. Nothing seems to work.

    Does anyone here have a solution or work-around? I can’t get any answer back on the MotionEye Git Hub.

    Any help would be greatly appreciated! I need this module to work!

    S 1 Reply Last reply Nov 22, 2022, 12:15 AM Reply Quote 0
    • S Offline
      sdetweil @SdeGeata
      last edited by Nov 22, 2022, 12:15 AM

      @SdeGeata try the real ip address of the pi in the address:“???”

      192.168.??.??

      this I consider to be a NETWORKING error…

      if I am listening on all interfaces, (0,0,0,0) and I send a request out… it should USE one of them
      not send 0.0.0.0 to the remote site…

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      S 1 Reply Last reply Nov 22, 2022, 12:22 AM Reply Quote 0
      • S Offline
        SdeGeata @sdetweil
        last edited by Nov 22, 2022, 12:22 AM

        @sdetweil Hello Sam;

        In playing with the address, I have discovered that MotionEye does seem to display an image using address: "192.168.1.200", (the direct URL of the Magic Mirror, and running MotionEye). However, Motion Webhooks show the image then won’t hide anymore. They just stay onscreen.

        Currently, I have my config set as so:

        address: "0.0.0.0",
        

        …

        ipWhitelist: ["::1", "::ffff:192.168.1.200", "::ffff:192.168.1.1/120", "127.0.0.1", "::ffff:127.0.0.1", "::ffff:192.168.1.42", "::ffff:192.168.1.23", "::ffff:192.168.1.69", "::ffff:192.168.1.100"],
        

        trying to cover all bases here. The Mirror still shows a broken image icon, but if I log into the web portal of the mirror, that show’s the camera feed no problem. How can I fix this??>

        S S 2 Replies Last reply Nov 22, 2022, 12:26 AM Reply Quote 0
        • S Offline
          SdeGeata @SdeGeata
          last edited by Nov 22, 2022, 12:26 AM

          I did notice that MotionEye and the Mirror are both listening on “0.0.0.0”. Is that normal? Could that be my conflict? Can i set MotionEye to listen on another ip, if so, which one???

          S 1 Reply Last reply Nov 22, 2022, 1:28 AM Reply Quote 0
          • S Offline
            sdetweil @SdeGeata
            last edited by Nov 22, 2022, 1:25 AM

            @SdeGeata turn off the ipWhitelist til you get it all working. then play with the filter

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            S 1 Reply Last reply Nov 22, 2022, 3:15 AM Reply Quote 0
            • S Offline
              sdetweil @SdeGeata
              last edited by Nov 22, 2022, 1:28 AM

              @SdeGeata the cors check is at the server.

              they check the IP address/name of the client making the request.

              localhost is inside the same system
              192.168 or 10. or 172. are non routablebip addresses, so sekfvcontainedvsyatens like localhost

              0.0.0.0 is undetermined… and is mostly rejected .

              as I said, it’s not a valid IP address, so it should never be sent to the other side as part of the request

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              S 1 Reply Last reply Nov 22, 2022, 3:17 AM Reply Quote 0
              • S Offline
                SdeGeata @sdetweil
                last edited by Nov 22, 2022, 3:15 AM

                @sdetweil

                I turned off the ipWhitelist, I was unable to connect MMM-Remote-Control or send any command line to the MM.

                1 Reply Last reply Reply Quote 0
                • S Offline
                  SdeGeata @sdetweil
                  last edited by Nov 22, 2022, 3:17 AM

                  @sdetweil said in CORS, MotionEye & MMM-Remote-Control:

                  they check the IP address/name of the client making the request.
                  localhost is inside the same system
                  192.168 or 10. or 172. are non routablebip addresses, so sekfvcontainedvsyatens like localhost
                  0.0.0.0 is undetermined… and is mostly rejected .
                  as I said, it’s not a valid IP address, so it should never be sent to the other side as part of the request

                  Its funny though, it is only since MM v.2.17 I have been having issues with MMM_MotionEye and the address: "0.0.0.0" issue. It was fine before. I don’t know what changed other than CORS.

                  S K 2 Replies Last reply Nov 22, 2022, 4:41 AM Reply Quote 0
                  • S Offline
                    sdetweil @SdeGeata
                    last edited by Nov 22, 2022, 4:41 AM

                    @SdeGeata we updated libraries we use, so it could be anywhere.

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    S 1 Reply Last reply Nov 22, 2022, 7:27 PM Reply Quote 0
                    • S Offline
                      SdeGeata @sdetweil
                      last edited by Nov 22, 2022, 7:27 PM

                      @sdetweil So what would you suggest? Is there another address I can have MotionEye listen on while leaving the Magic Mirror address on 0.0.0.0? I see an option to configure that in MotionEye.conf. I just don’t know what to set it to.

                      S 1 Reply Last reply Nov 22, 2022, 7:35 PM Reply Quote 0
                      • 1
                      • 2
                      • 1 / 2
                      1 / 2
                      • First post
                        7/13
                        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