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

    Posts

    Recent Best Controversial
    • RE: Maximum File Size of ics FIle?

      @Stef Ah, i think you have the symlink to vdirsyncer but not the hidden folder, .vdirsyncer (in your home folder) for config options.

      Type mkdir ~/.vdirsyncer then try again to create the config file.

      posted in Troubleshooting
      N
      ninjabreadman
    • RE: Maximum File Size of ics FIle?

      @Stef You first need to create the config file (i.e. via touch):

      touch ~/.vdirsyncer/config
      nano ~/.vdirsyncer/config
      

      Yes, .vdirsyncer exists, but config doesn’t (yet).

      posted in Troubleshooting
      N
      ninjabreadman
    • RE: In what way is DAKboard related to MagicMirror

      I don’t think there’s any relation or any common code (beyond perhaps dependencies). While there are some superficial similarities and the concept is the same, it looks to actually have different modules and views. The newsfeed sure does look the same though. I’d be curious to know what they are using (as a stack) but doubt it’s based on MM.

      posted in General Discussion
      N
      ninjabreadman
    • RE: Maximum File Size of ics FIle?

      @Stef Just checked, and my largest calendar is 425Kb, so I can’t say what is “too big”.

      Is this from an online service like Google or Outlook? You may be able to use query parameters to specify start/end dates (edit: more detailed description and API links here) for your query to return fewer results. If not, apparently some CalDAV servers (like DAVDroid) also allow you to pass parameters for start/end dates for the calendar. You can then create a query to (e.g.) only return events for this month and next.

      Alternatively, you might instead look at this post. You may have to change the config for whatever service you’re using, but in vdirsyncer you can set start_date and end_date options which should slice your calendar into something reasonable that you can then serve locally from your Pi. It’s not as simple as pointing a module at a URL, but once set up with a cron job should be pretty reliable.

      posted in Troubleshooting
      N
      ninjabreadman
    • RE: Fresh install MM2 RP3 wont start :(

      @paddyhughes Yeah, MM relies on the GUI to display the browser. It’s possible to run without a GUI, but it requires some extra packages and effort. Sorry, didn’t think to ask, but glad to hear it’s up and running!

      posted in Troubleshooting
      N
      ninjabreadman
    • RE: MMM-ImagesPhotos - Show images from a directory

      @Peter At least it’s fixed! Cheers.

      posted in Utilities
      N
      ninjabreadman
    • Exporting a file from Google Drive with specific mimeType

      Working on a module to retrieve and display a Google Drive document, in response to my musings here. The module is meant to export and display a shared Google Doc on MM as a shared whiteboard among many users; it will update whenever the file is updated.

      I blatantly stole much of the Google Drive implementation from MMM-GTasks (is there another Google Drive implementation for MM?), which itself is lifted mostly from Google’s Drive API quickstart.

      However, the actual fetch of the file is (still) causing me difficulty.

      Here’s the code:

      var drive = google.drive({
        version: 'v2',
        auth: this.gauth
      });
      
      drive.files.export({
        fileId: "MY_FILE_ID",
        mimeType: "text/html",
        alt: "media"
      }, function (err, buffer) {
        if (err) {
          console.log('The API returned an error: ' + err);
          callback(err);
          return;
        } else {
          callback(response);
        }
      });
      

      However, the API complains that I’m not providing a mimeType:

      The API returned an error: Error: Required parameter: mimeType
      { Error: Required parameter: mimeType
          at RequestError.Error (native)
          ...
        code: 400,
        errors: 
         [ { domain: 'global',
             reason: 'required',
             message: 'Required parameter: mimeType',
             locationType: 'parameter',
             location: 'mimeType' } ] }
      

      I know the request is authenticating (I can list files) and I have full access (i.e. “https://www.googleapis.com/auth/drive”). I can retrieve the metadata for the file, but cannot specify the mimeType for a response (or for that matter, specify the file contents with alt: 'media'). According to the API docs, “text/html” is a valid MIME type.

      Wondering if anyone can spot an error or propose a workaround. I might revert to a simpler GET request as I don’t need many of the googleapis features, but it would be nice to have implemented properly.

      Haven’t created an initial repo as I don’t have it working yet. Thanks!

      posted in Development
      N
      ninjabreadman
    • RE: How to update the master branch?

      @mochman Thanks! Sorry I subposted on you; I was writing on my phone (so didn’t see your post), plus Mobile Safari really hates the compose window of NodeBB, so it takes forever to post anything decent). That and autocorrect really hates git and npm. Cheers. ;)

      posted in Troubleshooting
      N
      ninjabreadman
    • RE: MMM-ImagesPhotos - Show images from a directory

      @Peter

      What does your config look like? Where are your images? What type(s) are they? I tried making a folder with 100 files (well over 50), but that seemed to work fine.

      Do you have the photos in multiple folders/paths? If so, have you tried removing the path of the photos that work to leave the other paths (to determine they work)? Have you tried adding treatAllPathsAsOne: true to your module config?

      What is the content of photos.txt if you type curl http://localhost:8080/MMM-ImagesPhotos/photos > photos.txt into a separate console (while MM is running)?

      Don’t post it all here, but if there are not several thousand entries, the module is not seeing all of your files (but you knew that).

      posted in Utilities
      N
      ninjabreadman
    • RE: How to update the master branch?

      @PaulB First, make a backup of your install with cp -r ~/MagicMirror ~/MM-Backup. Then run git stash in ~/MagicMirror to temporarily stash your changes so that git can merge all those new commits.

      To merge, run git pull to update your MM install, then use npm install to upgrade or install any new dependencies to the appropriate version.

      Once complete, run git stash apply to reintroduce your changes (while also keeping them in the stash) – you may need to deconflict or otherwise review these changes. You can see your changes with git diff.

      Once you’re happy and MM is running smoothly, you can git stash drop to get rid of the stash. You can run rm -rf ~/MM-Backup once you’re content it’s all working as it should.

      Finally, I recommend you take the opportunity to also run sudo apt-get update && sudo apt-get dist-upgrade npm && sudo dist-upgrade pm2 (I think nodejs should upgrade as a dependency of npm but could be wrong).

      posted in Troubleshooting
      N
      ninjabreadman
    • 1 / 1