• 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.

Creating a module to display daily horoscopes

Scheduled Pinned Locked Moved Solved Development
26 Posts 7 Posters 18.5k Views 6 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.
  • M Offline
    morozgrafix Moderator @pflnpi0305
    last edited by Jan 30, 2017, 12:16 AM

    @pflnpi0305 I believe that @cowboysdude is correct about that line spilling over. It needs to be on one line. When in doubt you can always paste your config.js at http://jshint.com/ and see if there are any errors (one warning about undefined variable module is ok)

    C 1 Reply Last reply Jan 30, 2017, 12:31 AM Reply Quote 1
    • C Offline
      cowboysdude Module Developer @morozgrafix
      last edited by cowboysdude Jan 30, 2017, 12:33 AM Jan 30, 2017, 12:31 AM

      @morozgrafix said in Creating a module to display daily horoscopes:

      @pflnpi0305 I believe that @cowboysdude is correct about that line spilling over. It needs to be on one line. When in doubt you can always paste your config.js at http://jshint.com/ and see if there are any errors (one warning about undefined variable module is ok)

      Home away from home LOL AND off topic but Thanks and congrats on being a mod :)

      1 Reply Last reply Reply Quote 1
      • P Offline
        pflnpi0305
        last edited by Jan 30, 2017, 1:56 AM

        so i fixed it and added it the the java beautifier link and thenadded it back to my config.js folder and rebootbut still black screen.
        cant use npm start
        is it because im using pm2 to autostart my mirror?

        M 1 Reply Last reply Jan 30, 2017, 2:09 AM Reply Quote 0
        • M Offline
          morozgrafix Moderator @pflnpi0305
          last edited by morozgrafix Jan 30, 2017, 5:28 AM Jan 30, 2017, 2:09 AM

          @pflnpi0305 if you are using pm2 then you can restart mm with pm2 restart mm, to stop it you would run pm2 stop mm, to list processes managed by pm2 you would do pm2 list and to start you would run pm2 start mm

          If you are still have issues, post your latest version of config.js here again. Are you getting any errors?

          1 Reply Last reply Reply Quote 0
          • P Offline
            pflnpi0305
            last edited by pflnpi0305 Jan 30, 2017, 4:40 AM Jan 30, 2017, 4:31 AM

            so i also dropped my config in jshint.comand and javascriptbeautifier.com and all is well…i dont know what im missing. if i remove the horoscope everything works well but if i have it then it wont work.

                          var config = {
            port: 8080,
            ipWhitelist: [ "127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.1/24" ],
            language: "en",
            timeFormat: 12,
            units: "imperial",
            modules: [ {
                module: "MMM-Admin-Interface"
            }, {
                module: "alert"
            }, {
                module: "updatenotification",
                position: "top_bar"
            }, {
                module: "clock",
                position: "top_left"
            }, {
                module: "calendar",
                header: "MY CALENDAR",
                position: "top_left",
                config: {
                    fetchInterval: 1 * 60 * 1000,
                    calendars: [ {
                        symbol: "calendar-check-o ",
                        url: "webcal://www.calendarlabs.com/templates/ical/US-Holidays.ics"
                    }, {
                        url:"https://calendar.google.com/calendar/ical/5ddp1drsb3mib0a6piof8h0f8s%40group.calendar.google.com/private-xxxxxxxxxxxxxxx/basic.ics"
                    } ]
                }
            }, {
                module: "compliments",
                position: "lower_third"
            }, {
                module: "currentweather",
                position: "top_right",
                config: {
                    units: "imperial",
                    location: "FONTANA/CA",
                    locationID: "",
                    appid: "xxxxxxxxxxxxxx"
                }
            }, {
                module: "MMM-Remote-Control"
            }, {
                module: "MMM-WunderGround",
                position: "top_right",
                config: {
                    apikey: "xxxxxxx",
                    pws: "CA/FONTANA",
                    hourly: "1",
                    fctext: "1",
                    fcdaycount: "5",
                    fcdaystart: "0",
                    hourlyinterval: "3",
                    hourlycount: "2",
                    alerttime: 10000,
                    alerttruncatestring: "english:",
                    roundTmpDecs: 1,
                    UseCardinals: 0,
                    layout: "horizontal",
                    sysstat: 0
                }
            }, {
                module: "MMM-Globe",
                position: "center",
                config: {
                    style: "geoColor",
                    imageSize: 300,
                    ownImagePath: "",
                    updateInterval: 10 * 60 * 1000
                }
            }, {
                module: "MMM-horoscope",
                position: "bottom_right",
                config: {
                    sign: "aries"
                }
            }, {
                module: "newsfeed",
                position: "bottom_bar",
                config: {
                    feeds: [ {
                        title: "Google News",
                        url: "https://news.google.com/news?cf=all&hl=en&pz=1&ned=us&output=rss"
                    }, {
                        title: "New York Times",
                        url: "http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml"
                    }, {
                        title: "BBC Sci-Tech",
                        url: "http://feeds.bbci.co.uk/news/video_and_audio/technology/rss.xml?edition=uk"
                    } ],
                    showSourceTitle: true,
                    showPublishDate: true,
                    maxNewsItems: 0,
                    updateInterval: 10 * 1000,
                    reloadInterval: 2 * 60 * 1000
                }
            } ]
            };
            
            if ("undefined" !== typeof module) module.exports = config;
            
            M 1 Reply Last reply Jan 30, 2017, 5:49 AM Reply Quote 0
            • M Offline
              morozgrafix Moderator @pflnpi0305
              last edited by Jan 30, 2017, 5:49 AM

              @pflnpi0305 Do you see any errors in the console log when you run it start the mirror with npm start dev command? Also are you running off the master branch or dev?
              We can try to start eliminating things out to narrow down what is causing the black screen for you.

              Can you try this config with only horoscope module:

              /* Magic Mirror Config Sample
               *
               * By Michael Teeuw http://michaelteeuw.nl
               * MIT Licensed.
               */
              
              var config = {
              	port: 8080,
              	ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"],
              
              	language: 'en',
              	timeFormat: 24,
              	units: 'metric',
              
              	modules: [
              		{
              			module: 'MMM-horoscope',
              			position: 'bottom_right', // This can be any of the regions.
              			config: {
              				// See ‘Configuration options’ for additional options and more information.
              				sign: 'aries', // Zodiac sign
              				}
              		},
              	]
              
              };
              
              /*************** DO NOT EDIT THE LINE BELOW ***************/
              if (typeof module !== 'undefined') {module.exports = config;}
              

              Also can you please double check that MMM-horoscope and contents exist under ~/MagicMirror/modules directory? (I know I’m asking for obvious things, just trying to get some more info about your installation).

              1 Reply Last reply Reply Quote 0
              • P Offline
                pflnpi0305
                last edited by Jan 30, 2017, 8:05 AM

                thats the issue it doesnt exsist in there… how do i clone the git via ssh

                Y 1 Reply Last reply Jan 30, 2017, 8:37 AM Reply Quote 0
                • M Offline
                  morozgrafix Moderator
                  last edited by Jan 30, 2017, 8:25 AM

                  @pflnpi0305 It will not work if you don’t have a copy of the module installed locally, black screen is there because MM is attempting to load JS files for the module from the directory that doesn’t exist. You need to run this in terminal while connected to your RasPi (directly or via SSH).

                  cd ~/MagicMirror/modules
                  git clone https://github.com/morozgrafix/MMM-horoscope.git
                  

                  After that you would need to restart MM node process in order it to pickup new node_helper for horoscope module.

                  Thanks

                  1 Reply Last reply Reply Quote 0
                  • Y Offline
                    yawns Moderator @pflnpi0305
                    last edited by yawns Jan 30, 2017, 8:38 AM Jan 30, 2017, 8:37 AM

                    @pflnpi0305 said in Creating a module to display daily horoscopes:

                    thats the issue it doesnt exsist in there… how do i clone the git via ssh

                    Mh, you are right. The readme on github doesn’t state how to do this. Maybe @morozgrafix could add this, even though the process is always the same.

                    If you go to github, you see this:
                    0_1485765365171_github.JPG

                    1. click on “clone or download”
                    2. copy the url or click on the icon next to it
                    cd ~/MagicMirror/modules
                    git clone https://github.com/morozgrafix/MMM-horoscope.git
                    cd MMM-horoscope
                    npm install
                    

                    After that you update your config.js file, restart your magic mirror and should be fine

                    edit: oh, morozgrafix was faster

                    M 1 Reply Last reply Jan 30, 2017, 8:50 AM Reply Quote 1
                    • M Offline
                      morozgrafix Moderator @yawns
                      last edited by Jan 30, 2017, 8:50 AM

                      @yawns Thanks! I just added a small bit related to installation steps to the README.

                      1 Reply Last reply Reply Quote 1
                      • 1
                      • 2
                      • 3
                      • 2 / 3
                      2 / 3
                      • First post
                        20/26
                        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