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 85
    • Posts 20,410
    • Groups 1

    Posts

    Recent Best Controversial
    • 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
    • RE: what can i do in a module, porting from another mirror project

      ok, starting to migrate…

      questions:

      is there a way to communicate across modules? I don’t see a way to have module A request info from module B, and have B’s response only come back to module A.

      in my design, only the scheduler knows about the config DB, and HOW to decide if a viewer is needed, or not.

      it then tells the viewer manager to start/stop a viewer… the schedulers also is the only one that knows HOW to get the list of images (using the appropriate api of the source location, file, dropbox, etc)

      the viewer makes a call to the scheduler to get the next image, and if at the end of the list, it causes another list reload. the viewer doesn’t know where the list came from. the list is just to images.

      now, if someone uses the mobile app and changes the data, it MAY be cause to terminate a running viewer, as the filter would no longer cause that particular viewer to be selected…
      but… the db change handler is in the viewer scheduler node_helper, and the running viewer list is in the viewer handler node_helper…

      looks like I can only do sendnotification, and broadcast to all modules (ugh)

      posted in Development
      S
      sdetweil
    • RE: Raspberry 2 clean install showing as black screen

      there is a bug in the electron browser that causes the black screen.

      i did

      npm remove electron
      npm install electron@1.7.9

      and it works fine now…

      someone posted another solution to issue 1243

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

      so, I have this electron/node/javascript extension for another mirror project, which displays images over the mirror page, moving around, like a pong game… the images shown are collected from different sources,
      file, dropbox, google drive, one drive (to be finished), based on filtering a calendar (ical) with info stored in a mongo db.

      note: these images are in new windows, and do NOT modify the base dom

      the images are shown in an electron remote browserwindow, there may be multiple of these presented concurrently, depending on the filtering specified (show pics of my daughter for her birthday, starting 20 days before, next image every minute ), show pics of my trip to rome on its anniversary , starting 2 days before, next image every 20 seconds, … etc…
      i have a mobile app for ios and android that does the config of these filters. The app uses a private rest api to get/set/modify/delete the data, and also does mirror discovery on the local wifi network using udp broadcast…

      there are really two plugins/modules… one that does the data collection and filter mgmt, and one that does the image displaying. today these use direct inter instance angular calls… I see I would probably replace these with socket calls.

      the scheduler kicks off instances of the imager as required, and terminates when the time window is no longer valid, or the calendar entry list doesn’t contain an entry that matches the active filters.

      is there any reason any of this won’t work?
      thanks

      posted in Development
      S
      sdetweil
    • RE: Mirror stays black, nothing shown

      i did

      npm remove electron
      npm install electron@1.7.9

      and my black screen is gone

      posted in Troubleshooting
      S
      sdetweil
    • 1 / 1