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

    Posts

    Recent Best Controversial
    • RE: How can I see my bookmarked message?

      Not a worry. Everyone has been quite friendly. It just have to keep it in mind when attempting to spell things in the URLs. :)

      posted in Forum
      bheplerB
      bhepler
    • RE: How can I see my bookmarked message?

      Marvelous. Thank you. I take back all the snark I was going to deliver about Europeans and their extra “u” characters in their words. Like “favorite”. :)

      How one is supposed to understand that bookmark => favourite is left as an exercise for the student.

      posted in Forum
      bheplerB
      bhepler
    • How can I see my bookmarked message?

      There have been a couple of really useful posts by fellow members that I have bookmarked via the interface. How do I find them again? I don’t see a link to view my bookmarked posts.

      posted in Forum
      bheplerB
      bhepler
    • RE: NFL Score Module

      @Shawnsully Double-check your commas and curly braces, specifically at the beginning of your module entry. You have:

      },
           module: 'MMM-NFL',
           position: ‘bottom_left’,
      ...
      

      You probably want:

      },
      {
           module: 'MMM-NFL',
           position: ‘bottom_left’,
          ...
      
      posted in Sport
      bheplerB
      bhepler
    • RE: Where are you from?

      Virginia, USA

      posted in General Discussion
      bheplerB
      bhepler
    • RE: Calendar Module: How to declare local calendar

      Okay, thanks to @strawberry-3-141 expert advice, I have it up and running. The code he gave me is good, the JSON file I am loading from is not. We’ve got it sorted out and now I’m loading a compliment array from a file. Woohoo!

      posted in Troubleshooting
      bheplerB
      bhepler
    • RE: Calendar Module: How to declare local calendar

      @cowboysdude said in Calendar Module: How to declare local calendar:

      console.log(json.compliments.morning[0])

      I’m not programmer either but doesn’t this line just call the first object in the json file?

      Yes, it does. My test file has ten compliments loaded for each array (morning, afternoon & evening). That line was just to verify that I was getting a JSON object and not a file path. Which it does, meaning that I have the code reading from a local and parsing into a JSON object correctly. Now if I can just get that object in place of the default one, I’m golden.

      @strawberry-3-141 said in Calendar Module: How to declare local calendar:

      @bhepler something like this should do the job:
      move the call of complimentFile into the start method, you want to load that file only once not every 30 secs
      then override the the config compliments object with your data, that should be it

      Well, nuts. I inserted this code and now the config.compliments is undefined. But I do think you’ve got me on the right track. Thanks!

      compliments.js:67 Uncaught TypeError: Cannot read property 'length' of undefined
      
      posted in Troubleshooting
      bheplerB
      bhepler
    • RE: Calendar Module: How to declare local calendar

      I’m currently trying to do the same as a modification to the compliments module. As part of the gift, my wife is writing up about 100 compliments for the recipients. That’s a bit much to throw into the config.js file, so I am attempting to get it to load the JSON for the compliments array in a separate file.

      I’ve had some success. I managed to get the file loaded into a variable. I can log out the contents of the array. What I can’t seem to do it get that variable into the existing compliments code. Hopefully you’ll have more success. Loading JSON file code taken from Codepen.

      complimentFile: function(callback) {
      	var xobj = new XMLHttpRequest();
      	xobj.overrideMimeType("application/json");
      	xobj.open('GET', this.file([***file name***]), true); 
      	xobj.onreadystatechange = function () {
      		if (xobj.readyState == 4 && xobj.status == "200") {
      			callback(xobj.responseText);
      		}
      	};
      	xobj.send(null);
      },
      

      And the call:

      randomCompliment: function() {
      	var compliments = this.complimentArray();
      		var complimentFile = this.complimentFile(function (response) {
      		     var json = JSON.parse(response);
      		     console.log(json.compliments.morning[0])
      	});
      		var index = this.randomIndex(compliments);
      		return compliments[index];
      },
      

      With this code, I can get the console to show the contents of the JSON file. In the log, I can see the first of the morning compliments I set up in my external file. But for the life of me, I can’t seem to get that json object out of the function. Javascript is obviously not my thing.

      posted in Troubleshooting
      bheplerB
      bhepler
    • RE: Need help using an API

      You should be able to use the default Calendar module that comes with the stock Magic Mirror installation. So long as you can get your calendar available to you as an ICS feed, you should be good to go. Flipping through the Amion website, I did find a reference to ICS format, so I know they’re capable of producing it.

      It seems like you should be able to tie in with little trouble.

      On the off chance you missed it, here is the link to the Calendar module documentation.

      posted in Feature Requests
      bheplerB
      bhepler
    • RE: The mirror that wasn't a mirror

      @DazDavid Please post the relevant portion of your config.js file. That is a good place to start. Also please use the markdown commands to make your code easier for us to read.

      posted in Show your Mirror
      bheplerB
      bhepler
    • 1
    • 2
    • 106
    • 107
    • 108
    • 109
    • 110
    • 111
    • 112
    • 108 / 112