MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord
    1. Home
    2. mjtice
    M
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 9
    • Best 1
    • Controversial 0
    • Groups 0

    mjtice

    @mjtice

    2
    Reputation
    655
    Profile views
    9
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    mjtice Unfollow Follow

    Best posts made by mjtice

    • [MMM-Screendimmer] Dim your 7" screen based on the time of day

      Description:

      This module allows you to set the brightness of your Pi 7" screen based on the time of day. Perfect for when you use your MM as an alarm clock (from @strawberry-3-141)!

      Screenshots:

      N/A

      Download:

      Version 1

      • Initial release
      posted in System
      M
      mjtice

    Latest posts made by mjtice

    • RE: Absolute date

      @daikaiju it’s on line 245 in the current release. Keep in mind that if you upgrade you’ll lose those changes (as I did exactly 2 days after I made that post…).

      posted in Troubleshooting
      M
      mjtice
    • [MMM-Screendimmer] Dim your 7" screen based on the time of day

      Description:

      This module allows you to set the brightness of your Pi 7" screen based on the time of day. Perfect for when you use your MM as an alarm clock (from @strawberry-3-141)!

      Screenshots:

      N/A

      Download:

      Version 1

      • Initial release
      posted in System
      M
      mjtice
    • RE: Stop the screensaver!

      I had the same problem where I could’t get the screensaver (or screen blanking) to stop turning on. I stumbled across this thread, check out the answer given by JimmyN… it helped me at least.

      disable screensaver

      posted in General Discussion
      M
      mjtice
    • RE: Module ignoring node_helper.js?

      Wow, thanks @mochman! Now that you mention it that makes perfect sense because node_helper.js isn’t executed on the client-end (right?).

      posted in Development
      M
      mjtice
    • Module ignoring node_helper.js?

      I’m sure I’m missing something really obvious here… but I can’t see what it is. The contents of MMM-HiWorld print out just fine but the console logging in node_helper.js never happens. As I understand it (from reading some other forum posts) I need to initialize node_helper.js via a call in start: function()?

      MMM-HiWorld.js:

      $ cat MMM-HiWorld.js
      Module.register("MMM-HiWorld",{
          // Default module config.
      	// Default module config.
      	defaults: {
      		text: "Hi World!",
      		animationSpeed: 1000,
      	},
      
      start: function() {
          this.sendSocketNotification('Starting');
          var self = this;
          setInterval(function() {
              self.updateDom(); // no speed defined, so it updates instantly.
          }, 1000); //perform every 1000 milliseconds.
      },
      
      	// Override dom generator.
      getDom: function() {
          var wrapper = document.createElement("div");
          wrapper.innerHTML = this.config.text;
          return wrapper;
      },
      
      });
      

      node_helper.js:

      $ cat node_helper.js
      var NodeHelper = require('node_helper');
      
      module.exports = NodeHelper.create({
          start: function() {
              console.log('Starting node_helper');
          },
      
          socketNotificationReceived: function(notification, payload) {
            console.log('Okay, I got a notification.');
          },
      });
      

      This is Raspbian Jessie (Raspberry Pi 2) and node v6.9.2.

      Thanks!

      posted in Development
      M
      mjtice
    • RE: Absolute date

      Turns out my problem came down mostly to not really understanding the difference between ‘absolute’ and ‘relative’… I fixed my problem by modifying the code in calendar.js slightly.

       // Otherwise just say 'Today/Tomorrow at such-n-such time'
       timeWrapper.innerHTML = moment(event.startDate, "x").calendar(null, {
                                                              sameDay: 'H:mm',
                                                              nextDay: '[Tomorrow] H:mm',
                                                              nextWeek: 'dddd',
                                                              lastDay: '[Yesterday]',
                                                              lastWeek: '[Last] dddd',
                                                              sameElse: 'DD/MM/YYYY'
                                                          });
      

      I sort of hijacked this thread. Sorry (but I think my solution might help out the OP ).

      posted in Troubleshooting
      M
      mjtice
    • RE: Absolute date

      … and by
      {
      timeFormat: ‘relative’
      }

      I mean
      {
      timeFormat: ‘absolute’
      }
      ugh.

      posted in Troubleshooting
      M
      mjtice
    • RE: Absolute date

      Any word on this? I’m using a 7" raspberry pi display and that ‘Tomorrow at 10:00 AM’ eats up a lot of real estate.

      Here’s my config:

                  {
                          module: 'calendar',
                          header: 'My Calendar',
                          position: 'top_right',
                          config: {
                            calendars: [
                              {
                                symbol: 'calendar-check-o ',
                                url: '[redacted]'
                              }
                            ],
                            maximumEntries: 10,
                            maxTitleLength: 12,
                            titleReplace: {'Appointment':'Appt'},
                            displaySymbol: false,
                            timeFormat: 'relative'
                          }
                  },
      
      posted in Troubleshooting
      M
      mjtice