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.

    Adding Modules... Please Please advise

    Scheduled Pinned Locked Moved General Discussion
    25 Posts 6 Posters 14.7k Views 4 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.
    • ? Offline
      A Former User
      last edited by A Former User

      link text My config

      1 Reply Last reply Reply Quote 0
      • ? Offline
        A Former User
        last edited by

        /// as used instead of ``` as they crash my system (the modules) just blank screen, will be removed when the issue is resolved.

        bheplerB 1 Reply Last reply Reply Quote 0
        • bheplerB Offline
          bhepler Module Developer @Guest
          last edited by bhepler

          @wjdw87 Why do you have the newsfeed module specified twice? You have:

          {
          	module: 'newsfeed',
          	position: 'bottom_bar',
          	config: {
          		feeds: [
          			{
          				title: "Bloomberg Baby!",
          				url: "https://www.bloomberg.com/feeds/podcasts/etf_report.xml"
          			}
          		],
          		showSourceTitle: true,
          		showPublishDate: true
          	}
          },
          {
          	module: 'newsfeed',
          	position: 'bottom_bar',
          	config: {
          		feeds: [
          			{
          				tittle: "BBC Sci-Tech",
          				url: "http://feeds.bbci.co.uk/news/video_and_audio/technology/rss.xml?edition=uk"
          			}
          		],
          		showSourceTitle: true,
          		showPublishDate: true
          	}
          },
          

          Would it not make more sense to just put both feeds in the feed array?

          {
              module: 'newsfeed',
              position: 'bottom_bar',
              config: {
                  feeds: [
                      {
                          title: "Bloomberg Baby!",
                          url: "https://www.bloomberg.com/feeds/podcasts/etf_report.xml"
                      },
                      {
                          title: "BBC Sci-Tech",
          		url: "http://feeds.bbci.co.uk/news/video_and_audio/technology/rss.xml?edition=uk"
                      }
                  ],
                  showSourceTitle: true,
                  showPublishDate: true
              }
          }
          

          (Also, you misspelled “title” in your second newsfeed. You have an extra “t”.)

          ? 1 Reply Last reply Reply Quote 0
          • ? Offline
            A Former User @bhepler
            last edited by

            @bhepler said in Adding Modules... Please Please advise:

            @wjdw87 Why do you have the newsfeed module specified twice? You have:

            {
            	module: 'newsfeed',
            	position: 'bottom_bar',
            	config: {
            		feeds: [
            			{
            				title: "Bloomberg Baby!",
            				url: "https://www.bloomberg.com/feeds/podcasts/etf_report.xml"
            			}
            		],
            		showSourceTitle: true,
            		showPublishDate: true
            	}
            },
            {
            	module: 'newsfeed',
            	position: 'bottom_bar',
            	config: {
            		feeds: [
            			{
            				tittle: "BBC Sci-Tech",
            				url: "http://feeds.bbci.co.uk/news/video_and_audio/technology/rss.xml?edition=uk"
            			}
            		],
            		showSourceTitle: true,
            		showPublishDate: true
            	}
            },
            

            Would it not make more sense to just put both feeds in the feed array?

            {
                module: 'newsfeed',
                position: 'bottom_bar',
                config: {
                    feeds: [
                        {
                            title: "Bloomberg Baby!",
                            url: "https://www.bloomberg.com/feeds/podcasts/etf_report.xml"
                        },
                        {
                            title: "BBC Sci-Tech",
            		url: "http://feeds.bbci.co.uk/news/video_and_audio/technology/rss.xml?edition=uk"
                        }
                    ],
                    showSourceTitle: true,
                    showPublishDate: true
                }
            }
            

            (Also, you misspelled “title” in your second newsfeed. You have an extra “t”.)

            you can add them to the same array?

            bheplerB 1 Reply Last reply Reply Quote 0
            • bheplerB Offline
              bhepler Module Developer @Guest
              last edited by

              @wjdw87 Indeed, you can. The documentation for the newsfeed module gives a simple example.

              1 Reply Last reply Reply Quote 0
              • ? Offline
                A Former User
                last edited by

                Ah cool, updated that, but still have issues around the modules i’ve /// out

                much appreciated though!

                bheplerB 1 Reply Last reply Reply Quote 0
                • bheplerB Offline
                  bhepler Module Developer @Guest
                  last edited by

                  @wjdw87 Okay, I finally had some time so I looked at the file you linked.

                  As @strawberry-3-141 said, you have an issue on line 100, part of the configuration of the camera module. You have: config: selfieInterval: 3, // Time interval in seconds before the photo will be taken.

                  You need to follow the config key with a JSON object, designated by curly braces. So the camera module section should look like so:

                  {
                  	module: 'camera',
                  	position: 'top_center',
                  	config: {
                  		selfieInterval: 3    
                  		emailConfig: {
                  			service: 'gmail', 
                  			auth: {
                  				user: '<xxx@xxx.com>',
                  				pass: '<xxx>' 
                  				},
                  			},
                  		}
                  	},
                  

                  It doesn’t help that the config section is wrong in the README.MD in the camera module. I’ll see if I can’t get a PR to fix that.

                  ? 1 Reply Last reply Reply Quote 0
                  • bheplerB Offline
                    bhepler Module Developer
                    last edited by

                    Additionally, you are missing a closed square bracket in your configuration for the VoiceControl module. After you define your keywords, you need to close the array. The second to last line of your voicecontrol configuration is where it needs to go. Like so:

                    {
                    	module: 'voicecontrol',
                    	position: 'bottom_left',
                    	config: {
                    	models: [
                    		{
                    			keyword: "Show Camera",
                    			description: "Say 'Show Camera' to display camera",
                    			file: "showCamera.pmdl",
                    			message: "SHOW_CAMERA"
                    		},
                    		{
                    			keyword: "Hide Camera",
                    			description: "Say 'Hide Camera' to hide camera",
                    			file: "hideCamera.pmdl",
                    			message: "HIDE_CAMERA"
                    		},
                    		{
                    			keyword: "Selfie",
                    			description: "Say 'Selfie' when camera is visible",
                    			file: "selfie.pmdl",
                    			message: "SELFIE"
                    		}
                    	]  // **HERE**
                    },
                    
                    1 Reply Last reply Reply Quote 0
                    • ? Offline
                      A Former User @bhepler
                      last edited by

                      @bhepler said in Adding Modules... Please Please advise:

                      @wjdw87 Okay, I finally had some time so I looked at the file you linked.

                      As @strawberry-3-141 said, you have an issue on line 100, part of the configuration of the camera module. You have: config: selfieInterval: 3, // Time interval in seconds before the photo will be taken.

                      You need to follow the config key with a JSON object, designated by curly braces. So the camera module section should look like so:

                      {
                      	module: 'camera',
                      	position: 'top_center',
                      	config: {
                      		selfieInterval: 3    
                      		emailConfig: {
                      			service: 'gmail', 
                      			auth: {
                      				user: '<xxx@xxx.com>',
                      				pass: '<xxx>' 
                      				},
                      			},
                      		}
                      	},
                      

                      It doesn’t help that the config section is wrong in the README.MD in the camera module. I’ll see if I can’t get a PR to fix that.

                      @bhepler said in Adding Modules... Please Please advise:

                      Additionally, you are missing a closed square bracket in your configuration for the VoiceControl module. After you define your keywords, you need to close the array. The second to last line of your voicecontrol configuration is where it needs to go. Like so:

                      {
                      	module: 'voicecontrol',
                      	position: 'bottom_left',
                      	config: {
                      	models: [
                      		{
                      			keyword: "Show Camera",
                      			description: "Say 'Show Camera' to display camera",
                      			file: "showCamera.pmdl",
                      			message: "SHOW_CAMERA"
                      		},
                      		{
                      			keyword: "Hide Camera",
                      			description: "Say 'Hide Camera' to hide camera",
                      			file: "hideCamera.pmdl",
                      			message: "HIDE_CAMERA"
                      		},
                      		{
                      			keyword: "Selfie",
                      			description: "Say 'Selfie' when camera is visible",
                      			file: "selfie.pmdl",
                      			message: "SELFIE"
                      		}
                      	]  // **HERE**
                      },
                      

                      Many thanks

                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 3 / 3
                      • 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