MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. AgP42
    3. Posts
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    A
    Offline
    • Profile
    • Following 0
    • Followers 2
    • Topics 5
    • Posts 75
    • Groups 2

    Posts

    Recent Best Controversial
    • RE: MMM-iFrame-Ping

      :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…

      posted in Utilities
      A
      AgP42
    • RE: MMM-iFrame-Ping

      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…

      posted in Utilities
      A
      AgP42
    • RE: MMM-iFrame-Ping

      Dear all,

      so before to do a new release, let’s think a bit ! :thinking_face:


      First, here is a summary of the request/question so far on this forum and on github issue about this module :

      Major requests :

      • Be able to display several URL :
        - to be launched randomly - @rudibarani, Gavin-McLeod (GitHub)
        - to be able to launch the next one, previous one and play/pause through notification - @bolish
      • Request new URL to display through notification (and without url formating will be better) - @rudibarani
      • Be able to declare several instance of the module to display several different video on the same display - @Johans, @Horge, gpapig (github)

      Minor requests :

      • remove iFrame border @rudibarani and @THeStigh (github) --> no problem to add a param
      • be able to scale the content Felisuk (github) --> complex and I don’t really want to spend time on it for now…

      On a technical point of view, the most complicated part to manage several urls or instances is due to the fact that I use a “node_helper” to be able to manage asynchronous tasks to manage the ping functionality. And this node_helper has to be shared between all instances ; and as it is asynchronous, if a new url notifications arrives before the previous ping answer (or timeout), it causes url inversions…

      I personally need that ping functionality because I use my module to display the image of a camera that is very oft down…(otherwise I wouldn’t have created this module ! :face_with_stuck-out_tongue_winking_eye: ), but I guess that several of this module users don’t need it, right ? :question_mark:

      => So my proposal will be to keep this module as it is now (with small bug correction that I found anyway), and to create a new one dedicated to the dynamic url management and able to display several instances.


      My proposal for this new module (this is a proposal, let’s see after what I can really do !) :

      • name : MMM-SmartWebDisplay (any other idea welcome ! I don’t want to keep iFrame on the name, nobody care of the technical mechanisms…)
      • new functions :
        • several instances possibles, identifiable with a name to be able to send them dedicated notifications
        • url to display sent through notification (to be able to send a list of URL will be best). This notification could be send :
          * by external http request, using MMM-RemoteControl. This will open a very big range of possibilities, as for example using IFTTT to change the content to display according to any trigger…
          * by MMM-ModuleScheduler (according date and time)
          * by rotating button module (or any other button module or PIR sensor)
          * in fact by any module able to send a notification to other modules !
        • management of several url (given on the config file or received by a notification) :
          * possibility to define a timer to go to the next URL (if the URL is not a video it must be possible also to use the updateInterval time in addition)
          * possibility to use notification to request the following actions : NEXT or PREVIOUS url. As before this notification can be send by any module, as for example MMM-GroveGestures, but also any physical button or by an http request, …
        • possibility to send notification to play/pause the rotation of URL and the intervalUpdate (to refresh images)
          question : for videos what should I do ? Just stop the rotation of URL or stop the playing video too ? It will be possible to stop them (in fact : change the URL to empty), but not to stop the image where it is and restart the video later, because I have no access to this YouTube (or other) embedded function…

      To clarify : what extra infos to be display bellow the image ? If several URL I can consider to write the name of the next URL.

      • previous functions of iFrame-Ping that will remains :

        • management of stop and restart according to USER_PRESENCE and module hidden (in fact it will be the same behavior than on reception of the notification “play”/“stop”)
      • previous functions that will be removed :

        • PING before display…

      This dream list seams to me very interesting ! Any other idea ?

      Also now… : let’s sleep :sleeping_face: and tomorrow : let’s code !! :smiling_face_with_open_mouth_cold_sweat:

      posted in Utilities
      A
      AgP42
    • RE: Considering taking donations to support the MagicMirror project. Interested in your thoughts!

      +1

      and could you give us some advice how much you need, for example : if 10% of the forum user gives 10€ each year it’s covers the forum server expenses, or if 10% of MM users gives 5€ each month you could work full time on it, …

      posted in MagicMirror
      A
      AgP42
    • RE: MMM-iFrame-Ping

      @bolish
      Hello Bolish,

      thanks and happy to see that my module is useful,

      I didn’t know the module MMM-GroveGestures so far but I check its documentation and it will be possible on the next version of the iFrame-Ping module to change the URL through the following code :

      notificationExec: {
        notification: "iFrame_Ping_URL",
        payload: {
           url: "http:whaturlyoulike.com"
        }
      }
      

      But it will not be a list of URL to switch between each other, just one url linked to a movement.

      I will investigate a bit more this week end…

      posted in Utilities
      A
      AgP42
    • RE: MMM-iFrame-Ping

      @rudibarani
      Hello rudibarani,

      in fact it was my first try (as it is easier…) but I couldn’t succed to make it work and adding this “url”: is the only way I have found to make it work…
      Did you try to change the code and it was ok ?

      I do my best to find some hours this week end to finally debug my code and be able to release that new version !

      On the next version it will be possible to send a new url through http request, but also with the module scheduler or with a rotating button

      posted in Utilities
      A
      AgP42
    • RE: MMM-iFrame-Ping

      @rudibarani
      Thanks and you are welcome, it’s a pleasure to see that my work is useful and appreciated :-)

      I did a little bit more debugging and I also to try to change the URL through a rotating button or through the scheduler and I found some issues on the code I sent you for testing.
      Next week I am also traveling but as soon it look like acceptable I will send the new version.

      This functionality to be able to change dynamically the URL will really make this module much more interesting than the actual version !
      Every module will be able to send a notification to change the url, so many many new possibilities ! :relieved_face:

      posted in Utilities
      A
      AgP42
    • RE: MMM-iFrame-Ping

      @rudibarani
      Hello,
      I guess I managed what you asked, could you please test it before I release it ?
      This new version is here : https://github.com/AgP42/MMM-iFrame-Ping/tree/dev
      Only the file MMM-iFrame-Ping.js has been modified, so you can copy/paste it on your MM directly and restart your MM.

      Then to allow URL modification through Remote-Control you can use the following request :

      http://192.168.xx.xx:8080/remote?action=NOTIFICATION&notification=iFrame_Ping_URL&payload={%22url%22:%22https://magicmirror.builders/%22}
      

      or

      http://192.168.xx.xx:8080/remote?action=NOTIFICATION&notification=iFrame_Ping_URL&payload={%22url%22:%22https://www.youtube.com/embed/Qwc2Eq6YXTQ?autoplay=1%22}
      

      (edit : the forum text editor seams not to like my link : this strange symbol “&not” has to be remplaced by “& not” (without the space…))
      (edit2 : the “%22” is the URL-encoded form of the symbol ". You can also try directly with ", and if it is not working try with %22 instead)

      It’s a cool new functionality ! :smiling_face:

      posted in Utilities
      A
      AgP42
    • RE: Magic Mirror Shoutout (YouTube and Google Photo Modules!

      :smiling_face: :thumbs_up_light_skin_tone:

      Great video and thank for the reference !

      posted in General Discussion
      A
      AgP42
    • RE: MMM-iFrame-Ping

      @rudibarani
      Yes it seams possible to do, but then MMM-Remote-Control has also to be modified to be able to send such notification, no ?
      Could you let me know the other modules you uses than catch MMM-Remote-Control notification, so I will look the source code please ?

      Thanks,
      AgP

      posted in Utilities
      A
      AgP42
    • RE: MMM-iFrame-Ping

      @rudibarani
      Hello,
      to better understand your request, by “notification” do you mean the internal MM notification mecanism ? (describe here on the official doc)
      In that case, which module will send the url request to the MMM-iFrame-Ping module ? and what will be the notification request format ?

      Thanks,
      AgP42

      posted in Utilities
      A
      AgP42
    • RE: MMM-iFrame-Ping

      @johans Hello, in fact I already try to manage this functionality (on another plugin), but it’s very hard to make it work.
      Here is an easy way for you :

      • duplicate the plugin (copy/paste the full folder and rename it, for example “MMM-iFrame-Ping-2”)
      • enter the folder and rename the file “MMM-iFrame-Ping.js” into “MMM-iFrame-Ping-2.js” (no need to change the css file, you can also delete it)
      • open the file “MMM-iFrame-Ping-2.js” and and the very first line, also change :
      Module.register("MMM-iFrame-Ping",{
      

      to

      Module.register("MMM-iFrame-Ping-2",{
      
      • then you can declare this “new” module on your config file and use it with another URL

      (Yes this is a very very bad looking solution :grimacing_face: , please don’t tell anyone it comes from me !:winking_face: )

      posted in Utilities
      A
      AgP42
    • RE: MMM-iFrame-Ping

      @rudibarani Sorry for my late answer. Did you consider to create a youtube playlist and make it run on the Mirror ? (This way of doing is now describe on the readme file) I guest it will fulfill your need !

      posted in Utilities
      A
      AgP42
    • RE: MMM-iFrame-Ping

      @rudibarani said in MMM-iFrame-Ping:

      @AgP42 Thank you for this version of iFrame. Works well for me :)
      I do get a white line around the embedded iFrame. Could you please tell me, how to get rid of it?

      Hello,

      you can try the following :

      On the file “MMM-iFrame-Ping.js”, on lines 135, 136 and 137 there is :

      iframe.width = this.config.width;
      iframe.height = this.config.height;
      iframe.scrolling = this.config.scrolling;
      

      with those lines, please add :

      iframe.style = "border:0"
      

      This should solve your problem !

      Bye,
      AgP42

      posted in Utilities
      A
      AgP42
    • [MMM-Netatmo-Presence] - Display liveview and events for Netatmo cameras

      Hello,

      I just finished my module to display the live view and last events of Netatmo Presence Cameras.
      Some part of this module (Live view) may also work for Netatmo Welcome Cameras.

      Please test it and let me know if any issues or improvment idea ! :slightly_smiling_face:

      Description:

      Main functionnalities :

      • Display Live snapshot of one or several cameras - This behavior should work also for “Netatmo Welcome” cameras, but not tested
      • Display the events recorded by all the cameras as timeline, with the type of event (animal, human, vehicle or movement). It is possible to filter the event type and to choose the number of events to be displayed. This will for sure not work for Welcome cameras.
      • Use the official sample code from Netatmo to connect to the API, so with https and no complex token to catch !
      • Several instances possible (one to display live snapshot, another to display events of type “vehicle”, another with all last 5 events, …)
      • Network data and RPI load friendly :
        • The API token is requested only when expired or once at start-up (also for several instances)
        • If a PIR-sensor using MMM-PIR-Sensor module is used, the auto-update will stop during screen off (this behavior works also with all other module that send the notification “USER_PRESENCE”).
        • If all instances of MMM-Netatmo-Presence module are hidden (by REMOTE-CONTROL or any Carousel module for example), the auto-update will also stop.
          As soon as a MMM-Netatmo-Presence module will be again displayed on the screen or screen switch on, an update will be requested.
      • Possibility to display the date and time of the last update request (configurable)
      • CSS file and many display configuration possibilities

      Screenshots:

      3 instances running, 2 to display live snapshot and 1 with Event timeline :
      0_1533157971593_3 instances.png
      Event timeline with the last event on both full image and detail of the movement detected :
      0_1533157993806_Events color icon.png
      2 liveview on the same instance :
      0_1533158012694_2 lives in 1 instance.png

      Download:

      [card:AgP42/MMM-Netatmo-Presence]


      Version 0.0.1

      • First release - 01/08/2018
      posted in Utilities
      A
      AgP42
    • RE: Solved - Several module instances with one node_helper

      Hi,

      I answer to myself as I could find the origin of the problem and correct it, maybe it could help others (as I didn’t see that implemented on many other module :winking_face: )

      So the problem is documented on the developper doc here :

      On socketNotificationReceived: function(notification, payload) part :

      Note 1: When a node helper sends a notification, all modules of that module type receive the same notifications.

      On this.sendSocketNotification(notification, payload) :

      Note: Since all instances of your module will receive the notifications, it’s your task to make sure the right module responds to your messages.

      So it is normal that each instance receive all the SocketNotification even send from another instance.

      To manage this, I add on start function :

      this.config.instanceID = this.identifier;
      

      As all my socket notification send to the note_helper “self.config”, so the node_helper will know the source of the request and will be able to send it back on its answer.
      Then on the node_helper sendSocketNotification, I send back this identifier with the corresponding answer.

      And on the MMM_main.js, on the socketNotificationReceived, I start to check is the identifier correspond to this instance and if not :

      return;
      

      Unfortunatelly this was even not enough, in particular at start-up, when all instances want to receive their datas and request all the node_helper together with differents inputs, some mix up occurs, so I also had to implement a “initialDelay” timer (with setTimeout function) and I will ask the user to configure it correctly if he configure several instances.

      So complicated solution (I feel…), but working fine !

      Of course if anyone got a better one to share, please do !

      Bye,
      AgP

      posted in Development
      A
      AgP42
    • Solved - Several module instances with one node_helper

      Hello all,

      I am a newby on development, but I would be pleased to learn ! :grinning_face:

      I am developping a module for Netatmo Presence camera (but my question is generic for all modules…) and I realize that when I am running several instance of the same module that is using a node_helper file, then the request is sent as much time as we have module instances declared and not just 1 request = 1 answer.

      To be more explicit :
      My MMM-Main.js request to node_helper.js to get some JSON data from an external API. And one of my parameter is the number of “events” that I want to return.
      If I have only 1 instance of my module, this is working perfectly fine and I receive exactly what I requested.
      But if I have 2 instances with the first one that request 10 events and the second request 2, then I receive 4 times the answer : 2 times with 10 (send to each module instance) and 2 times with 2 (send to each module instance also).
      And the more instance I declare, the more it increased !

      And this behavior totally mix up my result !

      So an easy solution will be to request always the max number of “events” and accept extra network request, but I don’t like it…

      Of course I checked all my “this” and “self” to ensure not to share datas between instances, so I don’t understand…

      I checked also on some other modules avaliable, almost all of them get redundant results when several instances are running together.

      Is there any explication and solution ?

      Thank you very much in advance for any help !

      AgP

      posted in Development
      A
      AgP42
    • MMM-iFrame-Ping

      Hello,

      after struggling with existing iFrame modules, I decided to create my own…

      Here are some other iFrame module :

      • iFrame from desertblade : the original one with basics functions : one URL, no periodic refresh
      • MMM-iFrame from alberttwong : allow several rotating URL but no periodic refresh of the content
      • MMM-iFrameReload from TheBogueRat : one possible URL with periodic refresh

      The functionnalities of my new iFrame module :

      • Allow periodic refresh of the iFrame, or not (configurable), this allow to display images (with refresh) or video (without refresh)
      • Ping the URL before trying to display the content. Display an error (with the last successful PING date and time) if the host is not reachable. PING code from MMM-Ping by CFenner
      • If a PIR-sensor using MMM-PIR-Sensor module is used, the iFrame will not be updated during screen off (this behavior works also with all other module that send the notification “USER_PRESENCE”) and will be refresh with screen on.
      • If the iFrame-Ping module is hidden (by REMOTE-CONTROL or any Carousel module for example), the iFrame will not be updated. As soon as one MMM-iFrame-Ping module will be again displayed on the screen, an update will be requested.
      • Possibility to display the date and time of the last update request (configurable)
      • CSS file

      I tested it with MM² version 2.4.1.

      I hope it can also be helpful for others, please let me know any issue.

      Some screenshot :
      Display YouTube :
      0_1532871282781_MMM-iFrame-Ping_youtube_update.png

      Display camera snapshot (with updates) :
      0_1532871357269_MMM-iFrame-AgP.png

      PING Nok :
      0_1532871391253_MMM-iFrame-Ping_Nok_with update display.png

      PING Ok, iFrame upload on-going :
      0_1532871408913_MMM-iFrame-Ping_ok.png

      All infos and installation instruction :
      [card:AgP42/MMM-iFrame-Ping]

      posted in Utilities
      A
      AgP42
    • RE: MMM-Remote-Control warning in logs

      Hello,

      no infortunatelly I didn’t find any solution yet.

      Bye,

      posted in Troubleshooting
      A
      AgP42
    • RE: Withings

      Hello,

      I also try to make it work, but I didn’t succed. Probably I did some wrong behaviour during the oAuth process.

      At the end I can see on my MagicMirror logs an error 283, that correspond according to Nokia API website to : “283 : Token is invalid or doesn’t exist”.

      I considered it was OAuth version 1.0 because it look like it.

      Also it is written on Nokia website :

      “The Health Mate API is now fully functional with OAuth 2.0 authentication protocol.
      Therefore, the OAuth 1.0 process will no longer be supported beginning:
      November 30, 2018”

      Also I do not really want to fight to make it work if the service will be cut by Nokia/Withings on a few months.

      Does someone have the knowledge to update this module with OAuth 2.0 ?

      posted in Requests
      A
      AgP42
    • 1
    • 2
    • 3
    • 4
    • 3 / 4