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.

    Config

    Scheduled Pinned Locked Moved Troubleshooting
    6 Posts 3 Posters 634 Views 3 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 Offline
      sdmydbr
      last edited by

      Hi everyone, thanks for all those awesome modules and this cool magic mirror project, I have been building one for myself for about 2 months now. I’m no developer or have much knowledge regarding all these but I managed to do it. Today I don’t really know what went wrong but my config appears to be really jumbled up, after using admin interface module probably, my mirror still works fine with no config error but the config has totally change. I don’t know if I should be bothered with this…
      I will be posting a short sample of my changed config below…

      
      /* Magic Mirror Config Sample
      *
      * By Michael Teeuw http://michaelteeuw.nl
      * MIT Licensed.
      */
      var config = {
      	"port": 8080,
      	"language": "en",
      	"timeFormat": 24,
      	"units": "metric",
      	"modules": [
      		{
      			"module": "alert"
      		},
      		{
      			"module": "updatenotification",
      			"position": "top_bar"
      		},
      		{
      			"module": "clock",
      			"position": "top_left",
      			"config": {
      				"showWeek": true,
      				"showSunTimes": false,
      				"showMoonTimes": true,
      				"lat": 23.9062,
      				"lon": 91.4273,
      				"displayType": "digital",
      				"secondsColor": "#888888",
      				"analogPlacement": "right"
      			}
      		},
      		{
      			"module": "MMM-Volume",
      			"position": "top_left",
      			"config": {
      				"usePresetScript": "ALSA",
      				"volumeOnStart": 50
      			}
      		},
      
      

      This is how the config looks like now… the mirror works fine but I’m having a hard time editing…

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

        @sdmydbr - I’m not sure I understand what problem you’re having. You say your mirror works fine, but you’re having problems. You say your config.js is jacked up, but that looks like a valid config file.

        What are you trying to do and what behavior of the Pi is stopping you?

        S 1 Reply Last reply Reply Quote 0
        • S Offline
          sdmydbr @bhepler
          last edited by

          @bhepler well my previous config didn’t have quotations around the left hand side object. And now it has… I will post two configuration below…
          here is what my config use to look like…

          
          Magic Mirror Config Sample
           *
           * By Michael Teeuw http://michaelteeuw.nl
           * MIT Licensed.
           *
           * For more information on how you can configure 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 or empty, 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"],
          
          	useHttps: false, 		// Support HTTPS or not, default "false" will use HTTP
          	httpsPrivateKey: "", 	// HTTPS private key path, only require when useHttps is true
          	httpsCertificate: "", 	// HTTPS Certificate path, only require when useHttps is true
          
          	language: "en",
          	timeFormat: 24,
          	units: "metric",
          	// serverOnly:  true/false/"local" ,
          			     // local for armv6l processors, default
          			     //   starts serveronly and then starts chrome browser
          			     // false, default for all  NON-armv6l devices
          			     // true, force serveronly mode, because you want to.. no UI on this device
          
          	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",
          						url: "webcal://www.calendarlabs.com/ical-calendar/ics/76/US_Holidays.ics"					}
          				]
          			}
          		},
          		{
          			module: "compliments",
          			position: "lower_third"
          		},
          		{
          			module: "currentweather",
          			position: "top_right",
          			config: {
          				location: "New York",
          				locationID: "", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
          				appid: "YOUR_OPENWEATHER_API_KEY"
          			}
          		},
          		{
          			module: "weatherforecast",
          			position: "top_right",
          			header: "Weather Forecast",
          			config: {
          				location: "New York",
          				locationID: "5128581", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
          				appid: "YOUR_OPENWEATHER_API_KEY"
          			}
          		},
          		{
          			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,
          				broadcastNewsFeeds: true,
          				broadcastNewsUpdates: true
          			}
          		},
          	]
          
          

          The above config is what I got when I installed magic mirror in the beginning…
          And now it has changed into

          
          /* Magic Mirror Config Sample
          *
          * By Michael Teeuw http://michaelteeuw.nl
          * MIT Licensed.
          */
          var config = {
          	"port": 8080,
          	"language": "en",
          	"timeFormat": 24,
          	"units": "metric",
          	"modules": [
          		{
          			"module": "alert"
          		},
          		{
          			"module": "updatenotification",
          			"position": "top_bar"
          		},
          		{
          			"module": "clock",
          			"position": "top_left",
          			"config": {
          				"showWeek": true,
          				"showSunTimes": false,
          				"showMoonTimes": true,
          				"lat": 23.9062,
          				"lon": 91.4273,
          				"displayType": "digital",
          				"secondsColor": "#888888",
          				"analogPlacement": "right"
          			}
          		},
          		{
          			"module": "MMM-Volume",
          			"position": "top_left",
          			"config": {
          				"usePresetScript": "ALSA",
          				"volumeOnStart": 50
          			}
          		},
          		{
          			"module": "MMM-TelegramBot",
          			"config": {
          				"verbose": true,
          				"telegramAPIKey": "********",
          				"allowedUser": [
          					"sdmydbr"
          				]
          			}
          		},
          		{
          			"module": "MMM-MyCalendar",
          			"position": "bottom_bar",
          			"config": {
          				"calendars": [
          					{
          						"symbol": "calendar",
          						"url": "webcal://p55-caldav.icloud.com/published/2/MTYyNDUxMzU4NTMxNjI0NYC75Drqr02v7z3JKqrHR4_Vd4jSfdBaOYaOyJzk__IX"
          					}
          				],
          				"colored": true,
          				"maximunEntries": 5,
          				"fetchInterval": 30000
          			},
          			"disabled": true
          		},
          
          

          The difference between these two as u will notice is the double quote around the left side objects. I’m no programmer and I don’t know if this is the normal language but my config has changed… it works fine but the config is different now… all the modules have double quotes around them… as far as the mirror is concern it works fine. I just don’t understand why the change took place or if this is completely normal.

          S 1 Reply Last reply Reply Quote 0
          • S Offline
            sdetweil @sdmydbr
            last edited by

            @sdmydbr in javascript (the language the config is coded in, object and value names (things on the left of :

            do not need to be quoted.

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            S 1 Reply Last reply Reply Quote 0
            • S Offline
              sdmydbr @sdetweil
              last edited by

              @sdetweil yes and I totally understand that but all the objects on the left of : has been automatically quoted… i didn’t do it… and my config arrangement has also automatically changed

              S 1 Reply Last reply Reply Quote 0
              • S Offline
                sdetweil @sdmydbr
                last edited by

                @sdmydbr did you use MMPM? (it probably accidetnally change the order and quoted)
                its doesn’t matter the order so much , position will decide,
                except if you cared about order in area

                Sam

                How to add modules

                learning how to use browser developers window for css changes

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