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

    Posts

    Recent Best Controversial
    • RE: what can i do in a module, porting from another mirror project

      @idoodler

      do you have any pointers to examples of websockets from the module? or your “other JS code” means some OTHER library of JS code…

      looks like I would have to build another js class to wrap the ws services…(run the server side in the helper) cause I can’t require() in the module itself… load those classes via the scripts…

      posted in Development
      S
      sdetweil
    • RE: what can i do in a module, porting from another mirror project

      cool… that would allow my components to communicate in a synchronous mode…

      posted in Development
      S
      sdetweil
    • RE: programming model

      not class variable (I got that now), but shared would solve a ton of problems.

      posted in Development
      S
      sdetweil
    • RE: Looking for a module to show and hide different modules

      the question was, how do you KNOW that music is playing? what code tells u?

      I would expect the spotify playing module to do a sendNotification(“spotify_Playing”,something);

      so that other modules might know… it does not do that (looking at the code)…

      you could fork the existing code and add the 2 lines (one playing, one not) of code and submit an enhancement (pull) request to the module owner…

      posted in General Discussion
      S
      sdetweil
    • RE: programming model

      i have a lot of code running in another node/angular mirror app and have never seen this syntax…

      posted in Development
      S
      sdetweil
    • RE: programming model

      thanks…

      strange syntax tho…

      posted in Development
      S
      sdetweil
    • RE: Modules again.....

      @brenj said in Modules again.....:

                                timeFormat: int 60
                                fadeSpeed: int 5
      

      the json data model is if text, then the data is quoted foo:“something”, if numeric, the data is not quoted, bar:60

      no ‘int’

      posted in Development
      S
      sdetweil
    • RE: Looking for a module to show and hide different modules

      a module to show/hide would not be hard… but, how will you KNOW that spotify is playing (or has ended)…

      does the spotify playing module send notifications of these events?

      posted in General Discussion
      S
      sdetweil
    • programming model

      what is the model being used for both module and helper?

      where and how do I declare variables? either global or instance? (not method variables)

      in a helper if I declare outside the NodeHelper.create(…), they are truely global, and other helpers will overwrite my variables if the names collide.

      posted in Development
      S
      sdetweil
    • RE: what can i do in a module, porting from another mirror project

      the doc also mentions sendSocketNotification, in both directions… module to helper and helper to module(s) (of same name if multiple)…

      this.sendSocketNotification(notification, payload)
      notification String - The notification identifier.
      payload AnyType - Optional. A notification payload.
      
      If you want to send a notification to the node_helper, use the sendSocketNotification(notification, payload). Only the node_helper of this module will receive the socket notification.
      

      and

      Each **node helper** has some handy methods which can be helpful building your module.
      
      this.sendSocketNotification(notification, payload)
      notification String - The notification identifier.
      payload AnyType - Optional. A notification payload.
      
      If you want to send a notification to all your modules, use the sendSocketNotification(notification, payload). Only the module of your module type will receive the socket notification.
      

      and also looks like with MM.getModules(). i can get an object reference to the instances of the other components, and access their public methods…
      scheduler->handler.start(viewer_config),
      handler->scheduler.next(viewer)

      posted in Development
      S
      sdetweil
    • 1
    • 2
    • 2067
    • 2068
    • 2069
    • 2070
    • 2071
    • 2070 / 2071