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

    Posts

    Recent Best Controversial
    • RE: Date change

      @raymondjspigot i’d make a fork of the module
      clone that
      add a parameter to set the format differently
      and submit that as a pull request back to the module github

      others probably would like to change that format

      posted in Education
      S
      sdetweil
    • RE: Black screen on start up of Magic Mirror

      @bkrand95 if u comment out a module, you must comment out the braces too,
      Not like this

      {
      //  module : "compliments"'
      //
      },
      

      That leaves an empty entry in the modules array. Thus the problem

      You can also disable a module, by adding

      disabled: true,
      

      After the module: statement without commenting anything out

      posted in Troubleshooting
      S
      sdetweil
    • RE: run Linux command from a mm2 module

      the two parts of a module talk to each other thru socket notification events…

      the node_helper can interact with the system ,but not the dom, and the module (js) interacts with the dom and not the system…

      the two sides would use the sendSocketNotification(event_id, buffer) method…

      each would have a method called socketNotificationReceived(event_id, buffer) that will be called when the event arrives…

      the buffer can be any kind of data. formatted or not.

      to open the socket the first time, the module.js MUST be the first side to sendSocketNotification().

      typically the module sends the config info to the node_helper when its starts up.

      this is another event notification, which is called notificationReceived(event, buffer, sender)
      there are a a few builtin events, I use the ‘ALL_MODULES_STARTED’ event to send my module config to my helper and open the socket.
      see the doc here for the additional specifics
      https://github.com/MichMich/MagicMirror/tree/master/modules

      the event id strings for socketnotification are completely up to you… the MM system does not send socket notifications. it DOES send notifications (notice no ‘socket’) to the notificationReceived() method

      but summary

      • create both files (per the doc)

      • when module receives the ‘ALL_MODULES_STARTED’ event, send a socket notification from the module to the helper to open the communications channel

      • when the node_helper gets new data, it sends a socket notification (will ONLY be to the module(js)) with the data

      • the module(js) uses the data to update the dom

      • if the module(js) decides when there should be new data, then the module sends a socket notification to the helper, and the helper responds with a socket notification with the new data (if any).

      posted in Development
      S
      sdetweil
    • RE: have 2 instances of newsfeed

      @chassain-0 because the copied module is in the default folder, but NOT in the list of default modules
      you have to use the folder name in front of the module name

      module: "default/newsfeed2",
      

      works for me

      posted in Troubleshooting
      S
      sdetweil
    • RE: regions...

      @justjim1220 others noted that you will also have to edit the index.html to add the regions and the main.js

      var updateWrapperStates = function() {
      var positions = [“top_bar”, “top_left”, “top_center”, “top_right”, “upper_third”, “middle_center”, “lower_third”, “bottom_left”, “bottom_center”, “bottom_right”, “bottom_bar”, “fullscreen_above”, “fullscreen_below”];

      which lists all the known regions

      posted in Development
      S
      sdetweil
    • RE: Update the mirror for the first time in six months, won't start now

      @redink can I ask what device u are loading on? Pi 3?

      in addition to what @Stoffbeuteluwe posted, I suggest you use my updater script from
      https://github.com/sdetweil/MagicMirror_scripts

      upgrade-script.sh will do the git pull and npm install, and refresh npm setup for any modules that might need it
      it should handle all the work… and give you a trial run of all that…

      only applying changes if u request them

      give it a try this works on Mac as well

      bash -c "$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/upgrade-script.sh)"
      

      no changes are made to the local repo or the working copy

      if you WANT to actually apply the changes do

      bash -c "$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/upgrade-script.sh)" apply
      

      if you have already done the git pull, you will need to use force to get the script update the same version

      bash -c "$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/upgrade-script.sh)" force
      

      there is a log file (upgrade.log) in the MagicMirror/installers folder…

      posted in Troubleshooting
      S
      sdetweil
    • RE: CSS Order of execution

      @buzzkc that is why u prefix any names with your module name to restrict your settings to your module

      posted in Development
      S
      sdetweil
    • RE: Samba - Save failing when Direct from PC to Pi

      @Nero easier, use the bitvise ssh client, then u can drag/drop, double click to edit, and have an ssh window open for commands too… free… easy

      posted in Troubleshooting
      S
      sdetweil
    • RE: CSS Order of execution

      @buzzkc great thanks… I always thought that custom.css was a bad idea… every module should supply their own file as the getStyles() function provides the mechanism.

      posted in Development
      S
      sdetweil
    • RE: Installing Magic mirror on windows 10

      @Chrisflex read the readme for each module

      posted in Troubleshooting
      S
      sdetweil
    • 1 / 1