• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

MMM-Sunrise-Sunset

Scheduled Pinned Locked Moved Utilities
44 Posts 9 Posters 15.1k Views 10 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Away
    sdetweil @dankerthrone
    last edited by sdetweil Nov 25, 2019, 6:34 PM Nov 25, 2019, 6:34 PM

    @dankerthrone installing a new module is pretty easy

    cd MagicMirror/modules
    git clone http:// the url of the git repo
    cd the name of the module
    

    if there is a package.,json file, then to load its dependencies do

    npm install 
    

    then

    cd ~/MagicMirror/config
    nano config.js
    
    insert the module definition  info, (see the module readme.md)
    save
    

    then restart mirror app

    this module does NOT list its dependency on jquery as it should
    so, you have to fix it manually.

    SO, i don’t know where you were when u did the npm install jquery
    lets find it

    cd ~/MagicMirror
    find . | grep jquery\.js
    

    Sam

    How to add modules

    learning how to use browser developers window for css changes

    D 1 Reply Last reply Nov 26, 2019, 6:59 PM Reply Quote 0
    • S Away
      sdetweil @dankerthrone
      last edited by Nov 25, 2019, 6:57 PM

      @dankerthrone said in MMM-Sunrise-Sunset:

      DailyXKCD

      the XKCD errors look like poor programming by the author

      he tries to find the web content before its there, but doesn’t check if he got the location

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 0
      • D Offline
        dankerthrone @sdetweil
        last edited by Nov 26, 2019, 6:59 PM

        @sdetweil
        finding jquery as you suggested returns

        pi@raspberrypi:~/MagicMirror $ find . | grep jquery\.js
        ./node_modules/nwmatcher/src/modules/nwmatcher-jquery.js
        
        
        S 1 Reply Last reply Nov 26, 2019, 7:05 PM Reply Quote 0
        • S Away
          sdetweil @dankerthrone
          last edited by Nov 26, 2019, 7:05 PM

          @dankerthrone hm… not where I would have expected it…

          so. lets try this again

          cd ~/MagicMirror/modules/MMM-Sunrise-Sunset
          npm install jquery
          ls node_modules/jquery
          

          you should see this

          AUTHORS.txt  LICENSE.txt  README.md  bower.json  dist  external  package.json  src
          

          then do

           cp node_modules/jquery/dist/jquery.js .
          

          then

          ls jquery.js
          

          to prove the file is in the module folder

          i just did it all here step by step

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          1 Reply Last reply Reply Quote 0
          • S Offline
            siggmur
            last edited by sdetweil Jul 30, 2020, 10:18 PM Jul 30, 2020, 10:00 PM

            Late to the game, but I also am getting black screen after installing the module and adding it to my config. Ill try to give you the steps:

            Did the git pull. Went into the folder, npm install.

            Added this to my config:

            {          
            module: 'MMM-Sunrise-Sunset', 
            position: "bottom_center",
            config: {
            latitude: "69.13",
            longitude: "18.59",
            apiKey: "myAPI",
            layout: "inline",
              }
            }, 
            

            I also tried @sdetweil post, without any difference. I find the files as listed, did pm2 restart mm without any help.

            Ideas?

            S 1 Reply Last reply Jul 30, 2020, 10:17 PM Reply Quote 0
            • S Away
              sdetweil @siggmur
              last edited by Jul 30, 2020, 10:17 PM

              @siggmur latitude and longitude are numbers, remove the quotes.

              general rule, for values to the right of :

              number or true/false - not quoted
              all else, quoted, doesn’t matter which one, just matching.
              also, lat/long usually are 6 digits
              xx.yyyy

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              1 Reply Last reply Reply Quote 0
              • S Offline
                siggmur
                last edited by Jul 31, 2020, 8:57 AM

                Thanks for the quick reply, I forgot the quotation marks, but it should throw a config error, not a black screen like I am getting?

                S 1 Reply Last reply Jul 31, 2020, 11:47 AM Reply Quote 0
                • S Away
                  sdetweil @siggmur
                  last edited by Jul 31, 2020, 11:47 AM

                  @siggmur black screen usually means missing library file.
                  look at the startup.messages

                  either
                  pm2 logs --lines=100
                  or the terminal window where do
                  npm start

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  1 Reply Last reply Reply Quote 0
                  • S Offline
                    siggmur
                    last edited by Jul 31, 2020, 11:44 PM

                    @sdetweil ah, now we might be cooking. I find to suspected issues, but I am a bit to noobish to understand:

                    [2020-08-01 01:35:48.402] [LOG] No helper found for module: MMM-Sunrise-Sunset.

                    and:

                    Fontconfig warning: “/etc/fonts/fonts.conf”, line 100: unknown element “blank”
                    [2020-08-01 01:35:50.724] [ERROR] Whoops! There was an uncaught exception…
                    [2020-08-01 01:35:50.727] [ERROR] Error: listen EADDRINUSE: address already in use 127.0.0.1:8080
                    at Server.setupListenHandle [as _listen2] (net.js:1226:14)
                    at listenInCluster (net.js:1274:12)
                    at GetAddrInfoReqWrap.doListen [as callback] (net.js:1413:7)
                    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:65:10) {
                    code: ‘EADDRINUSE’,
                    errno: ‘EADDRINUSE’,
                    syscall: ‘listen’,
                    address: ‘127.0.0.1’,
                    port: 8080
                    }

                    Any idea what it could be?

                    S 1 Reply Last reply Aug 1, 2020, 12:00 AM Reply Quote 0
                    • S Away
                      sdetweil @siggmur
                      last edited by Aug 1, 2020, 12:00 AM

                      @siggmur eaddr in use means something is still using that port 8080,

                      pm2’s job is to start at boot, so you can have more than one running

                      keep stopping

                      check w
                      ps -ef | grep node |grep -v grep

                      kill things til u get none.

                      then

                      cd ~/MagicMirror
                      npm start
                      

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 4
                      • 5
                      • 4 / 5
                      • First post
                        Last post
                      Enjoying MagicMirror? Please consider a donation!
                      MagicMirror created by Michael Teeuw.
                      Forum managed by Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy