Navigation

    MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord
    1. Home
    2. ejoy1220
    MagicMirror² v2.15.0 is available! For more information about this release, check out this topic.
    E
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 2
    • Best 0
    • Groups 0

    ejoy1220

    @ejoy1220

    0
    Reputation
    249
    Profile views
    2
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    ejoy1220 Follow

    Latest posts made by ejoy1220

    • RE: Error in config file when adding modules, looking for another set of eyes

      Wow, thanks for these replies everyone.

      Blows my mind how it was just basically missing just a few “small,” to me, pieces.

      Hard to pick those out, need to step my game up and hit up CodeAcademy.

      JSHint is perfect! That will help me out a TON!

      And @RandomNoise, thank you for that idea, going to make it MUCH easier to browse and modify files that way!

      You guys rock thanks, what a great community

      posted in Troubleshooting
      E
      ejoy1220
    • Error in config file when adding modules, looking for another set of eyes

      Hello, first off I am a hardware guy, coding is not something I regularly use, and I’m slowly slogging through this, it is intimidating.

      I am trying to add a Camera module with voice control to my Magic Mirror (RPi3), from https://github.com/alexyak/camera

      Here is what I have for a config file so far, but I am getting the error:

      “If you get this message while your config file is already created, your config file probably contains an error.”

      Here is my config.js contents:

      /* Magic Mirror Config Sample
       *
       * By Michael Teeuw http://michaelteeuw.nl
       * MIT Licensed.
       *
       * For more information how you can configurate this file
       * See https://github.com/MichMich/MagicMirror#configuration
       *
       */
      
      var config = {
      	address: "localhost", // Address to listen on, can be:
      	                      // - "localhost", "127.0.0.1", "::1" to listen on loopback interface
      	                      // - another specific IPv4/6 to listen on a specific interface
      	                      // - "", "0.0.0.0", "::" to listen on any interface
      	                      // Default, when address config is left out, is "localhost"
      	port: 8080,
      	ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], // Set [] to allow all IP addresses
      	                                                       // or add a specific IPv4 of 192.168.1.5 :
      	                                                       // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"],
      	                                                       // or IPv4 range of 192.168.3.0 --> 192.168.3.15 use CIDR format :
      	                                                       // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"],
      
      	language: "en",
      	timeFormat: 12,
      	units: "imperial",
      
      	modules: [
      		{
      			module: "alert",
      		},
      		{
      			module: "updatenotification",
      			position: "top_bar"
      		},
      		{
      			module: "clock",
      			position: "top_left"
      		},
      		{
      			module: "calendar",
      			header: "US Holidays",
      			position: "top_left",
      			config: {
      				calendars: [
      					{
      						symbol: "calendar-check-o ",
      						url: "webcal://www.calendarlabs.com/templates/ical/US-Holidays.ics"
      					}
      				]
      			}
      		},
      		{
      			module: "compliments",
      			position: "lower_third"
      		},
      		{
      			module: 'camera',
      			position: 'top_center',
      			config: selfieInterval: 3,  // Time interval in seconds before the photo will be taken.
      				emailConfig: {
      				service: 'GMail', // Email provider to use to send email with a photo.
      				auth: {
      					user: '', // Your email account
      					pass: ''        // Your password for email account
      			}
      		},
      		{
      			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"
      				},
      			]
      		},
      		{
      			module: "currentweather",
      			position: "top_right",
      			config: {
      				location: "Boston",
      				locationID: "4930956",  //ID from http://www.openweathermap.org/help/city_list.txt
      				appid: "My API"
      			}
      		},
      		{
      			module: "weatherforecast",
      			position: "top_right",
      			header: "Weather Forecast",
      			config: {
      				location: "Boston",
      				locationID: "4930956",  //ID from http://www.openweathermap.org/help/city_list.txt
      				appid: "My API"
      			}
      		},
      		{
      			module: "newsfeed",
      			position: "bottom_bar",
      			config: {
      				feeds: [
      					{
      						title: "New York Times",
      						url: "http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml"
      					}
      				],
      				showSourceTitle: true,
      				showPublishDate: true
      			}
      		},
      	]
      
      };
      

      I had a difficult time editing this natively on the Pi, have copied the config.js files to a Windows machine and using NotePad++ to edit the file, the lines lining the code up help me immensely. Wish there was an easier workflow for me to use?

      posted in Troubleshooting
      E
      ejoy1220