MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. aaronaxvig
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    A
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 4
    • Posts 9
    • Groups 0

    aaronaxvig

    @aaronaxvig

    4
    Reputation
    731
    Profile views
    9
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    aaronaxvig Unfollow Follow

    Best posts made by aaronaxvig

    • RE: Open weather Api 3.0

      I found this thread when my usage of the openweathermap.org API stopped working a few days ago. I guess they actually did cut off the API 2.5 users now? Anyways, I have it working using the 3.0 API now. A few comments to help anyone:

      • I did add my credit card info on my account but I am not 100% sure this was necessary.
      • I am using the same API key as before.
      • The locationID value does not appear to work any more. So I have replaced the locationID config lines with lat and lon lines.
      • The timezone was getting appended to the header so I had to start setting appendLocationNameToHeader to false.

      Before example:

      {
          module: "weather",
          position: "top_right",
          header: "Hollywood, FL",
          config: {
              weatherProvider: "openweathermap",
              type: "current",
              location: "Hollywood, FL",
              locationID: "4158928",
              apiKey: "xxxxxxxxxxxxxxxxxxxxxx",
              roundTemp: true
          }
      },
      

      After example:

      {
          module: "weather",
          position: "top_left",
          header: "Mandan, ND",
          config: {
              weatherProvider: "openweathermap",
              type: "current",
              lat: "46.8258",
              lon: "-100.88875",
              apiKey: "xxxxxxxxxxxxxxxxxxxxxx",
              apiVersion: "3.0",
              appendLocationNameToHeader: false,
              weatherEndpoint: "/onecall",
              roundTemp: true
          }
      },
      
      posted in Utilities
      A
      aaronaxvig
    • Windows 10 setup (including VS Code debugging)

      I have an Intel Compute Stick which runs Windows 10 that I am planning to use for my mirror. Getting Magic Mirror running was really easy as the manual steps outlined in the README.md file are mostly cross-platform.

      But I wanted to create modules and debug them using VS Code. There are a couple hurdles there.

      1. You can launch Magic Mirror using VS Code. You will have to create a launch.json file as outlined here. Make sure to read the comments as they are helpful. I will put my final file in a reply to this.
      2. You may run into an exception: TypeError: Cannot read property 'name' of undefined in MagicMirror\modules\default\updatenotification\node_helper.js:35:43. The root cause of this is some Error: spawn git ENOENT messages that you may see further up in the log. I think this is an effort to check GitHub for updates…anyways it seems to do something with git and this error means it can’t find git in your path. (Basically if you opened a command prompt and typed git it would tell you that it is an unrecognized command.) Install Git from git-scm.com and that should solve it (must restart VS Code though). The installer has an option about the Windows path–choose to add Git to the path. I had GitHub Desktop installed and it apparently uses its own portable version of Git which it doesn’t add to the path.

      These should get you a good running setup. Debugging works for the main code base but doesn’t seem to work for modules. That is next on my list.

      posted in Tutorials
      A
      aaronaxvig
    • RE: Modify the Gap/Margins

      Replying to an old post…I know. But it shows up in search engine results.

      One way to easily/cleanly make this adjustment is included in the sample custom.css. Below is an example with the relevant parts only, and adjustments to my preferences (were all 60px values before).

      :root {
        --gap-body-top: 10px;
        --gap-body-right: 20px;
        --gap-body-bottom: 10px;
        --gap-body-left: 20px;
      }
      
      posted in Development
      A
      aaronaxvig
    • RE: Open weather Api 3.0

      @sdetweil You’re welcome! I saw afterwards that there is another thread with similar info but this is the one the search engine led me to.

      After a few days of use I can see on the OpenWeatherMap.org website Billing section that I am running somewhere around 600 API calls per day. This is with four weather modules in place (for four different locations). So about 150 calls per day per module. The default updateInterval value is 10 minutes which would be 144 per day in theory. I’m going to bump my non-local ones to a 30 minute setting (careful to specify milliseconds i.e. 1,800,000 but without commas of course).

      posted in Utilities
      A
      aaronaxvig

    Latest posts made by aaronaxvig

    • Crashing to black screen on release 2.30

      I had a lot of trouble with the 2.30 release on my Raspberry Pi 5 4GB, updated Rasbian/Debian Bookworm. Previous release was fine but this one is not. MagicMirror would run for a couple minutes, maybe even 10-20 minutes, but then the screen would go blank.

      Some testing showed that this was the actual MM program going blank. Other OS UI elements could be coaxed into appearing–the shutdown dialog for example, or the cursor moving across the screen. pm2 restart MagicMirror would get it running again for a few minutes.

      This was in the logs every time:

      0|mm       | [11537:0119/203419.095425:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2)
      0|mm       | [11537:0119/203419.095479:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2)
      0|mm       | [11537:0119/203419.095511:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2)
      0|mm       | [11537:0119/203419.095577:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2)
      0|mm       | [11537:0119/203419.095615:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2)
      0|mm       | [11537:0119/203419.097046:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2)
      0|mm       | [11537:0119/203419.097090:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2)
      0|mm       | [11537:0119/203419.097145:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2)
      

      There are some relevant search results for this, but no fixes. It is generally claimed to be a memory leak in Electron. Plausible given how it takes a little while to happen. Also MM 2.30 seems to have bumped Electron to 32.2.8 vs 31.6.0 that my 2.29 install is showing. I tried editing package.json to use ^33.0.0 which installed some newer minor version update of 33…don’t have that handy. Also tried ^34.0.0 which simply used 34.0.0 as there must not be anything newer available there yet. The same issue persisted.

      I tried using sdetweil’s install script in case it did some extra step that I was missing in my manual install but that didn’t fix it.

      I reverted to 2.29 using git checkout 94c3c69.

      I don’t necessarily desire to spend a significant amount of time going back and forth trying to figure this out. Maybe sometime in the future. So anyways, I’m not seeking a solution today, but did want to at least document all of this in case someone runs into the same problem.

      let config = {
      	address: "0.0.0.0",	// 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,
      	basePath: "/",			// The URL path where MagicMirror² is hosted. If you are using a Reverse proxy
      	// you must set the sub path here. basePath must end with a /
      	ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1", "192.168.1.0/24"],	// 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",
      	locale: "en-US",
      	logLevel: ["INFO", "LOG", "WARN", "ERROR"], // Add "DEBUG" for even more logging
      	timeFormat: 12,
      	units: "imperial",
      
      	modules: [
      		{
      			module: "alert",
      		},
      		{
      			module: "updatenotification",
      			position: "top_bar"
      		},
      		{
      			module: "clock",
      			position: "top_left"
      		},
      		{
      			module: "MMM-MonthlyCalendar",
      			position: "top_bar",
      			config: {
      				mode: "twoWeeks",
      				firstDayOfWeek: "today",
      				wrapTitles: true,
      				displaySymbol: false
      			}
      		},
      		{
      			module: "calendar",
      			header: "US Holidays",
      			position: "top_left",
      			hiddenOnStartup: true,
      			config: {
      				calendars: [
      					{
      						fetchInterval: 7 * 24 * 60 * 60 * 1000,
      						symbol: "calendar-check",
      						url: "https://ics.calendarlabs.com/76/mm3137/US_Holidays.ics"
      					},
      					{
      						fetchInterval: 10 * 60 * 1000,
      						url: "https://example.com/remote.php/dav/calendars/aaron/kid-activities/?export**and about 10 other calendars like this**",
      						symbol: ["l", "b"],
      						auth: {
      							user: 'aaron',
      							pass: 'xxxxxx',
      							method: 'basic'
      						}
      					}
      				],
      				maximumEntries: 10000,
      				broadcastPastEvents: true,
      				customEvents: [{ keyword: "Vikings", color: "Purple" }]
      			}
      		},
      		{
      			module: "weather",
      			position: "top_left",
      			header: "Mandan, ND",
      			config: {
      				weatherProvider: "openweathermap",
      				type: "current",
      				lat: "46.8258",
      				lon: "-100.88875",
      				apiKey: "xxxxxxxxxx",
      				apiVersion: "3.0",
      				appendLocationNameToHeader: false,
      				weatherEndpoint: "/onecall",
      				showWindDirectionAsArrow: true,
      				showHumidity: true,
      				roundTemp: true
      			}
      		},
      		{
      			module: "MMM-WiFiPassword",
      			position: "top_left",
      			config: {
      				network: "xxxxxxx",
      				password: "xxxxxx"
      			}
      		},
      		{
      			module: "weather",
      			position: "top_right",
      			header: "Hollywood, FL",
      			config: {
      				weatherProvider: "openweathermap",
      				type: "current",
      				lat: "26.01109",
      				lon: "-80.15264",
      				apiKey: "xxxxxxxx",
      				weatherEndpoint: "/onecall",
      				updateInterval: "1800000",
      				appendLocationNameToHeader: false,
      				roundTemp: true
      			}
      		},
      		{
      			module: "weather",
      			position: "top_right",
      			header: "Rosemount, MN",
      			config: {
                                      weatherProvider: "openweathermap",
                                      type: "current",
                                      lat: "44.73922",
                                      lon: "-93.13447",
                                      apiKey: "xxxxxxxx",
                                      weatherEndpoint: "/onecall",
      				updateInterval: "1800000",
                                      appendLocationNameToHeader: false,
                                      roundTemp: true
      
      			}
      		},
      		{
      			module: "weather",
      			position: "top_right",
      			header: "West Boylston, MA",
      			config: {
                                      weatherProvider: "openweathermap",
                                      type: "current",
                                      lat: "42.36489",
                                      lon: "-71.78766",
                                      apiKey: "xxxxxxx",
                                      weatherEndpoint: "/onecall",
      				updateInterval: "1800000",
                                      appendLocationNameToHeader: false,
                                      roundTemp: true
      			}
      		},
      		{
      			module: "weather",
      			position: "top_center",
      			header: "Weather Forecast",
      			classes: "weather-forecast",
      			config: {
      				weatherProvider: "weathergov",
      				type: "forecast",
      				location: "Mandan",
      				locationID: "5690366", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
      				apiKey: "xxxxxxx",
      				apiBase: "https://api.weather.gov/points/",
      				lat: 46.828889,
      				lon: -100.887222,
      				fadePoint: 1,
      				maxNumberOfDays: 14,
      				maxEntries: 14,
      				colored: true,
      				roundTemp: true
      			}
      		},
      		{
      			module: "newsfeed",
      			position: "bottom_bar",
      			config: {
      				feeds: [
      					{
      						title: "The Bismarck Tribune",
      						url: "http://bismarcktribune.com/search/?f=rss&t=article&l=50&s=start_time&sd=desc&k%5B%5D=%23topstory"
      					}
      				],
      				showSourceTitle: true,
      				showPublishDate: true,
      				showDescription: true,
      				wrapDescription: true,
      				broadcastNewsFeeds: true,
      				broadcastNewsUpdates: true,
      				prohibitedWords: ['png', 'jpg'],
      				reloadInterval: 30 * 60 * 1000,
      				updateInterval: 30 * 1000
      			}
      		},
      		{
      			module: "MMM-ImagesPhotos",
      			position: "bottom_bar",
      			disabled: true,
      			config: {
      				opacity: 1,
      				animationSpeed: 5 * 1000,
      				updateInterval: 60 * 1000,
      				maxHeight: "600px",
      				maxWidth: "1000px",
      				sequential: false  // process the image list randomly
      			}
      		},
      	]
      };
      
      
      posted in Bug Hunt
      A
      aaronaxvig
    • RE: Open weather Api 3.0

      @sdetweil You’re welcome! I saw afterwards that there is another thread with similar info but this is the one the search engine led me to.

      After a few days of use I can see on the OpenWeatherMap.org website Billing section that I am running somewhere around 600 API calls per day. This is with four weather modules in place (for four different locations). So about 150 calls per day per module. The default updateInterval value is 10 minutes which would be 144 per day in theory. I’m going to bump my non-local ones to a 30 minute setting (careful to specify milliseconds i.e. 1,800,000 but without commas of course).

      posted in Utilities
      A
      aaronaxvig
    • RE: Open weather Api 3.0

      I found this thread when my usage of the openweathermap.org API stopped working a few days ago. I guess they actually did cut off the API 2.5 users now? Anyways, I have it working using the 3.0 API now. A few comments to help anyone:

      • I did add my credit card info on my account but I am not 100% sure this was necessary.
      • I am using the same API key as before.
      • The locationID value does not appear to work any more. So I have replaced the locationID config lines with lat and lon lines.
      • The timezone was getting appended to the header so I had to start setting appendLocationNameToHeader to false.

      Before example:

      {
          module: "weather",
          position: "top_right",
          header: "Hollywood, FL",
          config: {
              weatherProvider: "openweathermap",
              type: "current",
              location: "Hollywood, FL",
              locationID: "4158928",
              apiKey: "xxxxxxxxxxxxxxxxxxxxxx",
              roundTemp: true
          }
      },
      

      After example:

      {
          module: "weather",
          position: "top_left",
          header: "Mandan, ND",
          config: {
              weatherProvider: "openweathermap",
              type: "current",
              lat: "46.8258",
              lon: "-100.88875",
              apiKey: "xxxxxxxxxxxxxxxxxxxxxx",
              apiVersion: "3.0",
              appendLocationNameToHeader: false,
              weatherEndpoint: "/onecall",
              roundTemp: true
          }
      },
      
      posted in Utilities
      A
      aaronaxvig
    • RE: Modify the Gap/Margins

      Replying to an old post…I know. But it shows up in search engine results.

      One way to easily/cleanly make this adjustment is included in the sample custom.css. Below is an example with the relevant parts only, and adjustments to my preferences (were all 60px values before).

      :root {
        --gap-body-top: 10px;
        --gap-body-right: 20px;
        --gap-body-bottom: 10px;
        --gap-body-left: 20px;
      }
      
      posted in Development
      A
      aaronaxvig
    • NYT feed contains some reocurring garbage

      When using the default NYT feed there are some reoccurring useless headlines. I have some ideas for filtering the list before cycling through for display, in order from most straightforward to craziest. :)

      1. Remove titles equal to “Your Daily Mini Crossword”
      2. Remove titles equal to “California Today”
      3. Remove titles that start with “Here Are” (example that I don’t see value in is “Here Are Our Stories That Won the Biggest Awards in the Magazine World”)
      4. Don’t show titles that don’t contain a verb. An alternate solution may be to include the description as subtext of the title as that often does contain something useful. (examples that I don’t see value in: “Guardians of a Vast Lake, and a Refuge for Humanity”, “Before the Wall: A Borderlands Journey”, “Feature: The Preacher and the Sheriff”) Could use something like this as a parser. May have to be provided as a service as apparently it is 261MB zipped and requires 100-500MB of RAM.

      I am interested in working on this feature myself but thought I would float it for discussion first.

      posted in Feature Requests
      A
      aaronaxvig
    • RE: Windows 10 setup (including VS Code debugging)

      @aaronaxvig To run MagicMirror automatically on startup:

      1. Create a .bat file and put it in the startup folder (Windows Explorer > type “shell:startup” without quotes in the address bar).
      2. Set the contents of the bat file:

      cd your MagicMirror Git repository folder
      npm start

      posted in Tutorials
      A
      aaronaxvig
    • Update checker Git dependency?

      As I wrote about some here, it seems that the update checker has a Git dependency. (I haven’t looked at the code that carefully, please forgive me if that assumption is wrong.)

      Normally this would not be a problem if you follow the install directions directly as they specify running a git clone command so naturally you must have Git. But I did it using the GitHub Desktop option, and someone could certainly use the Download As ZIP option from GitHub.com too.

      I don’t really care too much since they program still runs and I have figured out how to get rid of the exception that it causes. But I thought I might pose two questions:

      1. Should there be a note in the manual install instructions that Git on your path is a requirement?
      2. Should there be a Git dependency in the first place for checking for updates?
      posted in Bug Hunt
      A
      aaronaxvig
    • RE: Windows 10 setup (including VS Code debugging)

      My launch.json file:

      {
          // Use IntelliSense to learn about possible Node.js debug attributes.
          // Hover to view descriptions of existing attributes.
          // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
          "version": "0.2.0",
          "configurations": [
              {
                  "name": "Launch",
                  "type": "node",
                  "request": "launch",
                  "program": "${workspaceRoot}\\js\\electron.js",
                  "stopOnEntry": false,
                  "args": [],
                  "cwd": "${workspaceRoot}",
                  "runtimeExecutable": "${workspaceRoot}\\node_modules\\.bin\\electron",
                  "runtimeArgs": [
                      ".",
                      "--enable-logging"
                  ],
                  "env": {},
                  "console": "integratedTerminal",
                  "sourceMaps": false,
                  "outDir": null
              },
              {
                  "name": "Attach",
                  "type": "node",
                  "request": "attach",
                  "port": 5858,
                  "sourceMaps": false,
                  "outDir": null
              }
          ]
      }
      
      posted in Tutorials
      A
      aaronaxvig
    • Windows 10 setup (including VS Code debugging)

      I have an Intel Compute Stick which runs Windows 10 that I am planning to use for my mirror. Getting Magic Mirror running was really easy as the manual steps outlined in the README.md file are mostly cross-platform.

      But I wanted to create modules and debug them using VS Code. There are a couple hurdles there.

      1. You can launch Magic Mirror using VS Code. You will have to create a launch.json file as outlined here. Make sure to read the comments as they are helpful. I will put my final file in a reply to this.
      2. You may run into an exception: TypeError: Cannot read property 'name' of undefined in MagicMirror\modules\default\updatenotification\node_helper.js:35:43. The root cause of this is some Error: spawn git ENOENT messages that you may see further up in the log. I think this is an effort to check GitHub for updates…anyways it seems to do something with git and this error means it can’t find git in your path. (Basically if you opened a command prompt and typed git it would tell you that it is an unrecognized command.) Install Git from git-scm.com and that should solve it (must restart VS Code though). The installer has an option about the Windows path–choose to add Git to the path. I had GitHub Desktop installed and it apparently uses its own portable version of Git which it doesn’t add to the path.

      These should get you a good running setup. Debugging works for the main code base but doesn’t seem to work for modules. That is next on my list.

      posted in Tutorials
      A
      aaronaxvig