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
    Offline
    • Profile
    • Following 0
    • Followers 108
    • Topics 88
    • Posts 20,667
    • Groups 1

    Posts

    Recent Best Controversial
    • RE: Can't upgrade MM 2.7.0 on Raspberry Pi Zero W

      @tjk031 edit the package.json and change the electron version from ^3.0.13 to ^2.0.4

      then erase node_modules

      rm -rf node_modules
      

      and then

      npm install 
      

      again

      posted in Troubleshooting
      S
      sdetweil
    • RE: Newsfeed Wrap with CSS

      @schlittrix the text align has to be inside the bracesof the newsfeed class

      posted in Troubleshooting
      S
      sdetweil
    • RE: weather forecast and current weather modules

      @hango ok, maybe YOU know what your getting yourself into… most users don’t…

      follow the rules, talk about how you are SUPPOSED to do things… teach them the RIGHT way.

      i’m here because I want to be, help users, we have enough problems with old docs written and not maintained, old code written and not maintained, we don’t need special instructions that are fragile.

      posted in General Discussion
      S
      sdetweil
    • RE: Beginner mistakes

      @bhepler there is an ongoing problem w custom.css being overwritten.

      My new upgrade script saves and restores

      posted in Troubleshooting
      S
      sdetweil
    • RE: Newsfeed Wrap with CSS

      @schlittrix yes

      u can specify lots of style elements in a single class like that

      for readability you should put the contents on separate lines inside the braces
      like this

      newsfeed-desc { 
           width: 700px; 
           text-align: center; 
      }
      
      posted in Troubleshooting
      S
      sdetweil
    • RE: Need help - New programmer

      @innovation the ‘string’ is the value used in the getDom() function to create the html content

      somestring:“this is just a test string”,
      counter: 0,

      getDom(){
         var wrapper=createElement("div")
         wrapper.innerText=this.somestring
         return wrapper;
      }
      

      there is no stopping the module, it MUST always be running… so, if u want to change the string,
      you can start a timer, and when the timer expires, call a routine that does the work.

      timerRoutine: function(){
           this.somestring="some other string"
      }
      

      but how does MM know u changed the value?
      u tell MM there is new content…

      timerRoutine: function(){
           this.somestring="some other string "+ this.counter++;
           this.updateDom(time_to_delay_in_ms, 0 = immediately)
      }
      

      now we need to start a timer… lets say, 15 seconds after we do it in getDom, lets change the text

      getDom(){
         var wrapper=createElement("div')
         wrapper.innerText=this.somestring  // use the value of the somestring variable to display
        setTimeout(this.timerRoutine, 15000)   // call the timerRoutine in 15000 milliseconds
         return wrapper;
         // after here , MM will put the html tree defined in wrapper,
         // in the 'position' the module  defined in config.js
      }
      

      another way is to use the repeating timer, instead of the single event version

      start: {
          // now the timerRoutine will be called every 15 seconds, forever
          // it will change the string, and then inform MM to call to get new content
          setInterval(this.timerRoutine,15000) //  start a repeating timer  every 15 seconds
      },
      
      getDom(){
         var wrapper=createElement("div')
         wrapper.innerText=this.somestring  // use the value of the somestring variable to display
         return wrapper;
      }
      

      you can do this same updateDom() call after receiving a message back from your node helper with new content.
      (my sample module does this)

      posted in General Discussion
      S
      sdetweil
    • RE: MMM-network-signal module ALWAYS displays message text

      @MMush that needs to be in the config block

      {
      module:
      position:
        config:{
            showMessage: false
        }
      },
      
      posted in Troubleshooting
      S
      sdetweil
    • RE: weather module just shows loading?

      @scumbelly right…

      general config.js rules

      thing to the left of colon (:) does not need quotes

      if the thing to the right of colon is a number or true/false,
      should NOT have quotes,
      otherwise the thing to the right needs quotes.
      single or double doesn’t matter, as long as both ends are the same

      posted in Troubleshooting
      S
      sdetweil
    • RE: Petition to get Sdetweil his own group tag....

      @bkeyport no thanks,… don’t need a badge… i like doing what I do… thats enough

      posted in General Discussion
      S
      sdetweil
    • RE: Help figuring out what portion of this code is erroring out?

      @stalker401 for the future, all u need to do is add

      disabled: true,

      To the module definition

      posted in Troubleshooting
      S
      sdetweil
    • 1
    • 2
    • 6
    • 7
    • 8
    • 9
    • 10
    • 165
    • 166
    • 8 / 166