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.

    MMM-iFrame-Ping

    Scheduled Pinned Locked Moved Utilities
    58 Posts 12 Posters 43.4k Views 13 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.
    • B Offline
      bolish
      last edited by bolish

      @AgP42
      Perfect for me!!
      Note : why note using your current module and just allow the ping Yes / No option? (or keep it by adding the possibility to hide it or??)

      Anyway, I would be happy with your above proposal anyway!! Up to you.

      Several URL’s and NEXT / PREVIOUS URL is must for me, so +1000.

      Regarding the play / pause option, I was thinking about play / pause the video but you just said it’s not possible and after thinking about it again, I believe stopping the rotation of URL as you proposed is even more important. So +1 for rotation play / pause.

      Several instances would be perfect for me either, so +1!

      I’m just thinking about additional dream :

      Maybe I’m dreaming a bit, but the cherry on the cake for me, would be to be able to “define a mouse click parameter”. i.e : by sending notification “CLICK ON X”, this would simulate a click at a certain location on the page (I don’t know how it work, coordinate X,Y)…But I’m too noob to realize what my demand is really triggering in terms of dev.
      (idea behind would be to display google agenda in an iframe and move to next and previous month by simulating the click).
      If too complex, forget about it.

      Forget about that one, I will manage differently and not with iFrame.

      Be strong tomorrow!!!

      1 Reply Last reply Reply Quote 0
      • A Offline
        AgP42 Project Sponsor Module Developer
        last edited by

        Thanks @bolish for your support ! :grinning_face_with_smiling_eyes:

        So today was a good coding day (hopefully because I don’t know when will be the next one…), not all the functionnalities describe yesterday are working, but I have made some extra too…

        So the new MMM-SmartWebDisplay version 1 is done , I will describe here the differences according to our previous discussions and then I will put it on GitHub and create a new post on the forum about it.

        Going back to the requests :

        • Be able to display several URL : –> DONE
          • to be launched randomly - @rudibarani, Gavin-McLeod (GitHub) –> DONE but not randomly, one after the other following the order given on the config file. Why do you want it random ??
          • to be able to launch the next one, previous one and play/pause through notification - @bolish –> DONE, 5 possibilities : Next, Previous, Stop (no more update and current URL stopped, black screen instead), Pause (no more update but the current URL remains, and continue to play if it is a video), Play (start again all updates, restart the same video currently running if any)
        • Request new URL to display through notification (and without url formatting will be better) - @rudibarani –> DONE, it is possible to request 1 URL or a list of URLs, and it is possible to send also on the same notification the value for autorefresh update and the value for the timer to play the following URL (but not mandatory)
        • Be able to declare several instance of the module to display several different video on the same display - @Johans, @Horge, gpapig (github) –> Unfortunately no working… I manage to display several iFrame on the same page together, but only the second one is updated and receive the notification… I don’t know why, but I didn’t spend much time on it…

        So @bolish and @rudibarani : you are served ! :winking_face:
        If you faced any bug, let me know…

        1 Reply Last reply Reply Quote 0
        • B Offline
          bolish
          last edited by

          @AgP42 = you rock!!!
          You made my evening Mate, can’t wait to test it!

          Thank you very much. Will keep you posted asap.

          1 Reply Last reply Reply Quote 0
          • A Offline
            AgP42 Project Sponsor Module Developer
            last edited by

            :smiling_face:

            Here it is :
            https://github.com/AgP42/MMM-SmartWebDisplay

            Enough screen for today, I will create the post for this new module on the coming days.
            I tried to write the readme file as good as possible, but I will have to work on it again.

            Please test it and let me know if any bug…

            1 Reply Last reply Reply Quote 1
            • B Offline
              bolish
              last edited by

              thx, have a good “eye / brain” rest enjoy the weekend!

              1 Reply Last reply Reply Quote 0
              • B Offline
                bolish
                last edited by

                Review :

                • Using a list of several URL is working. Seems more “slow / laggy” than with iFrame-Ping and only one URL. Strange but OK.

                • URL rotation is working great. (maybe a bit slow because of reloading needs, but I guess than there is not much you can do for that?)

                • URL NEXT / PREV / PLAY / PAUSE is working like a charm. Which was my initial need, so perfect.

                So all in all, a major and well managed update. Good job @AgP42 .

                One thing :

                Even by using the same size (% or px) parameter as in previous iFrame-Ping, the picture is much more smaller (tiny!!!) in this new module. Strange but nothing critical.

                I’m displying youtube channels and “middle_center” parameter.

                Nevertheless, when I increase the size of it, the centering is not working well. Indeed, the margin remains the same on left side, meaning the frame is off-centered on the right side of the screen.

                Hope this can be fixed easily (I tried to look at it myself, .css, etc… but I’m not skilled enough). Maybe it’s something I’m doing wrong on my side…

                A 1 Reply Last reply Reply Quote 0
                • A Offline
                  AgP42 Project Sponsor Module Developer @bolish
                  last edited by

                  @bolish, thanks for your very fast review ! I just upload an update that (should) solve the lagging issue (and on the same time this issue solved the problem of several instances !)

                  And your display issue was coming from the fact that I send on GitHub my css file with modifs for me, I update it too, so you should be able to get back your previous params

                  1 Reply Last reply Reply Quote 0
                  • B Offline
                    bolish
                    last edited by

                    @AgP42
                    Centering frame is OK now.
                    Lagging seems to be much better.
                    But it seems that new issue is happening. I get constant (uncontrolled) change between status Playing and Stopped which is stopping the video.

                    Strange.

                    1 Reply Last reply Reply Quote 0
                    • B Offline
                      bolish
                      last edited by bolish

                      I think it’s because of PIR Sensor “USER PRESENCE” notification!!!
                      (I don’t wnat any interaction between PIR and video), I only use PIR to turn screen ON / OFF.

                      And this issue is not new since your morning correction…It’s new for me because I installed PIR this morning!!!

                      Regards

                      A 1 Reply Last reply Reply Quote 0
                      • A Offline
                        AgP42 Project Sponsor Module Developer @bolish
                        last edited by

                        @bolish said in MMM-iFrame-Ping:

                        I think it’s because of PIR Sensor “USER PRESENCE” notification!!!
                        (I don’t wnat any interaction between PIR and video), I only use PIR to turn screen ON / OFF.

                        And this issue is not new since your morning correction…It’s new for me because I installed PIR this morning!!!

                        Regards

                        But why do you want your video to run if your screen is off ?

                        1 Reply Last reply Reply Quote 0
                        • B Offline
                          bolish
                          last edited by

                          No you’re right I don’t.

                          I believe I understood the issue :

                          • It seems the PIR sensor I’m using is very sensitive and triggering “USER PRESENCE FALSE” very easily.
                          • I’m able to manage it in MMM-PIR sensor module thanks to the additional delay option which I put to 30 seconds which is preventing the screen to turn ON / OFF every 2 seconds.

                          But this is then triggering the issue I’m referring to above for MMM-SmartWebDisplay.

                          Does that makes sense? It’s the only explanation I found for now.

                          A 1 Reply Last reply Reply Quote 0
                          • B Offline
                            bolish
                            last edited by bolish

                            maybe you should let your module more generic that what you currently did.
                            If someone wants to STOP the video based on any other notification (like USER PRESENCE, false) he will always have the possibility to use MMM-NotificationTrigger to convert user presence to stop.

                            Up to you.

                            If you’re not keen to update that point (which I could understand), I believe I can maybe modify things a little bit myself to manage it.

                            Maybe the modification should be done directly in MMM-PIR Sensor, which should only trigger PRESENCE FALSE once the additional delay is over and not before…

                            1 Reply Last reply Reply Quote 0
                            • A Offline
                              AgP42 Project Sponsor Module Developer @bolish
                              last edited by

                              @bolish
                              Yes I perfectly understand the issue you are facing, in fact I also did some contribution to the module PIR sensor :smiling_face_with_open_mouth_closed_eyes:

                              Yes the delay on the module apply only about the screen off but the “USER_PRESENCE” is send anyway directly according to the sensor input.

                              Normaly on your sensor you have 2 screws, one to change the sensibility of the sensor and the other one to adjust the time delay more infos here

                              Did you check that ?

                              But you are also right that I could let the choice to the user to use this USER_PRESENCE or not, I will check what I can do for that.

                              1 Reply Last reply Reply Quote 0
                              • B Offline
                                bolish
                                last edited by bolish

                                The sensor I’m using doesn’t offer this option, unfortunatly.
                                link text

                                Thinking of it again :

                                Would it not be more “sustainable” to PR MMM-PIRSensor by putting a second notification trigger “USER_PRESENCE, Screen Off” after the timeout delay.
                                Then, we could play within MMM-SmartWebDisplay with that one instead of the only USER PRESENCE false, true.
                                By doing that + adding the option to use it or not, it would make the full thing more reliable and generic.

                                If I believe it’s somewhere here :

                                                else if (value == valueOff) {
                                                    self.sendSocketNotification('USER_PRESENCE', false);
                                                    if (!self.config.powerSaving){
                                                        return;
                                                    }
                                
                                                    self.deactivateMonitorTimeout = setTimeout(function() {
                                                        self.deactivateMonitor();
                                                    }, self.config.powerSavingDelay * 1000);
                                                }
                                            });
                                
                                A 1 Reply Last reply Reply Quote 0
                                • A Offline
                                  AgP42 Project Sponsor Module Developer @bolish
                                  last edited by

                                  @bolish
                                  On the link you sent, this sensor is exactly the same as mine and its allow to change the timer ! ;-)

                                  The best way to make that clean will be to change the PIR-sensor module to send the notification only at the end of the timer, but I have no time to do so now…

                                  What you can do for now to desactivate the Stop at the reception of a USER_PRESENCE = false notification is to go on the file MMM-SmartWebDisplay.js, on the function “GestionUpdateIntervalSWD”, then comment (//) the line "this.StopDisplay();

                                  In fact I have no time to change the module PIR-Sensor now because I am about to finish an update of the module MMM-RemoteControl to be able to use "Next/Prev/Play/Pause/Stop directly on RemoteControl :

                                  0_1549816846729_RemoteSWD.png

                                  1 Reply Last reply Reply Quote 0
                                  • B Offline
                                    bolish
                                    last edited by bolish

                                    oh! I will look on the module again as I didn’t saw the famous screws you’re referring too…

                                    Don’t worry @AgP42 , you already did a great job! Thanks again for that.

                                    For the time being I will leave it like that (with your workaround) and if I have time on my side, I will maybe try to update MMM-PIRSensor. Maybe I could do it with trial and error method.

                                    Thanks to the latest update of your module and MMM-GroveGestures (from @Sean ) , I end up with a perfect user experience :

                                    • On my page 1 (main MM page), up / down gestures are handling news RSS details, etc…
                                    • On my page 2, I have your iFrame and I’m able to change youtube live channels by up / down gestures also.

                                    Perfect!

                                    The Remote Control you are working on looks great also!

                                    A bientôt et bonne continuation!! (tu as laissé qques indices dans ton code :-)

                                    1 Reply Last reply Reply Quote 0
                                    • A Offline
                                      AgP42 Project Sponsor Module Developer
                                      last edited by

                                      :winking_face:

                                      Here is the new post about MMM-SmartWebDisplay, and the modification of MMM-RemoteControl to control it !

                                      1 Reply Last reply Reply Quote 0
                                      • L Offline
                                        lpgjg
                                        last edited by

                                        Hey everyone,
                                        Hoping I can jump in here at the beginners level. Been trying to load a number of YouTube modules for a week to no avail.

                                        I’m more old school so this stuff doesn’t come natural to me and I’ve been trying to get iFrame-Ping to work the last few days.

                                        Long story short, all I get is YouTube trying to load on the MM and then “Video unavailable” where the video should be.

                                        The rest of the MM and its modules are working as should be. Strangely enough, I can click on the iframe-Ping module and the whole magic mirror disappears and the Pi switches to YouTube, full screen?

                                        The only way to get out of youtube at this point is with “ctrl Q”.

                                        Can anyone help?

                                        A 1 Reply Last reply Reply Quote 0
                                        • A Offline
                                          AgP42 Project Sponsor Module Developer @lpgjg
                                          last edited by

                                          @lpgjg
                                          Hello,

                                          can you send your configuration ?

                                          And also the log ? (when the MagicMirror is running, Ctrl+i and then filter to “iFrame-Ping” and copy the data°

                                          Thanks,
                                          AgP42

                                          1 Reply Last reply Reply Quote 0
                                          • L Offline
                                            lpgjg
                                            last edited by

                                            Will try to do so when I get home from work tonight. May take a few attempts as this very alien to me given that I’m probably older than most all of you…or your dads.

                                            May be worth noting: After a few attempts I noticed if I used my companies playlist, or that of Bombardier, Nord-Gear or any other company / commercial play list, it works fine. Always begins at the same place when started but the module shows up and plays the videos.

                                            But if I try to add a Pop music playlist or any of the popular artist out their, it gives me the “video unavailable.”

                                            As if it’s a copy right issue when going through the mirror.

                                            BTW: I’m in Montreal, Canada

                                            S A 2 Replies 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
                                            • 2
                                            • 3
                                            • 3 / 3
                                            • 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