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

    Posts

    Recent Best Controversial
    • RE: Main.css, Custom.css and Big Screen TV

      @ankonaskiff17 That’s why it’s better that instead of for instance and image in a module is written like this:

      width: 110px;
      height: 125px;

      that it be written

      width: 35%;
      height: 37%;

      The percent works on space where the px is what it is.

      You can always make a module bigger by going into the custom css and doing something like this:

      MMM-Whatever

      custom.css

      .MMM-Whatever {
      width: 400px;
      }
      or
      .MMM-Whatever {
      width: 90%;
      }

      BUT this may NOT give you the results you want… but it’s css so you can play with it and if doesn’t work change it back. I would keep all your changes in the custom.css file and back that up that way if you do an update to MM you won’t lose all your work.

      I think you can do things like git stash but I’d rather just back the file up myself.
      That way you’re only ever changing one file and not individual modules. Too much work. One file, much easier…

      posted in Custom CSS
      cowboysdudeC
      cowboysdude
    • RE: MagicMirror Weather

      @Usrnme2Lng Install xscreensaver and save yourself a lot of time and headache…

      Install it on the pi then disable screensaver… easiest way to do it.

      https://www.linuxbabe.com/ubuntu/install-autostart-xscreensaver-ubuntu-16-04-16-10

      posted in Troubleshooting
      cowboysdudeC
      cowboysdude
    • RE: Head first developing MM module for extreme beginners

      @StuGrunt said in Head first developing MM module for extreme beginners:

      It is because there is an error (at least I think so - I am new too) and no instructions on where to put the function.

      1. change the Module.register(“MMM-Timetable”) to Module.register(“MMM-Test”)

      2. The article does not tell you where to put the getDom function when it is first introduced. Replace the getDom: function() {}. with the code shown. In other words, don’t just add it to the file. This article would have benefited from a final section that gave the entire code.

      I think the original author at least expected us to be very familiar with Node.js (fair enough), but alas, I am not so it took a bit of work to figure it out. :-)

      Here it is, for the first part:

      Module.register(“MMM-Test”, {
      defaults: {},
      start: function () {},

      getDom: function() {
      var element = document.createElement(“div”)
      element.className = “myContent”
      element.innerHTML = “Hello, World!”
      return element
      },
      notificationReceived: function() {},
      socketNotificationReceived: function() {},
      })
      _

      Both of those functions go outside the getDom function pretty much anywhere you want to put them.

      The socketNotificationReceived function [example below, can be used in either node_helper OR your main.js file. The example below is in my node_helper] :

      socketNotificationReceived: function(notification, payload) {
      		if (notification === 'CONFIG') {
                  this.config = payload; 
              }
              if (notification === 'GET_CURRENT') {
                  this.getCurrent(payload);
              }
              if (notification === 'GET_FORECAST') {
                  if (this.forecast.timestamp === this.getDate() && this.forecast.data !== null) {
                      this.sendSocketNotification('FORECAST_RESULT', this.forecast.data); 
                      console.log("Using data we already have");
                  } else { 
                      this.getForecast();
      				console.log("Getting new data");
                  }
              }
      		
          }
      

      Here is the corresponding one in the main.js

      socketNotificationReceived: function(notification, payload) {
              if (notification === "CURRENT_RESULT") {
                  this.processCurrent(payload);
              }
              if (notification === "FORECAST_RESULT") {
                  this.processForecasts(payload);
              }
      		this.updateDom(this.config.initialLoadDelay);
          },
      

      You can use notificationReceived to receive info from other modules like this:

      Here are examples of that:

      notificationReceived: function (notification, payload){ 
              if (notification === 'CURRENT_RESULT') {
      			this.processCurrent(payload); 
              }
      	},
      
      this.sendNotification('CURRENT_RESULT', payload);
      

      This is how I send and receive my ‘payload’ from one module to another.
      The first example is getting my ‘CURRENT_RESULT’ [getting info for a Forecast module from the Current weather module] from the bottom example that is
      sending out ‘CURRENT_RESULT’…

      The bottom example will ‘broadcast’ and in reality ANY module can get the data it’s sending out.

      Hope this helps. It’s a really simple process.

      posted in Development
      cowboysdudeC
      cowboysdude
    • RE: A whole lot upgrades to my MagicMirror, finally!

      @cyberphox See you knew what I was doing LOL

      I’m using Motion sensors, water leak sensors, my phone as a sensor, zigbee switches and led bulbs. My door lock is a zwave lock. The Thermostat is a honeywell work around someone in HA built.

      NOW I can finally have what I’ve wanted all along. A 32" touch screen info panel. This is just the beginning, I plan on adding a ton more!

      posted in Show your Mirror
      cowboysdudeC
      cowboysdude
    • RE: PIR sensor behind glass?

      @yo-less said in PIR sensor behind glass?:

      Can a PIR sensor be covered by anything at all or does any kind of material automatically block motion detection?

      You really can’t cover a PIR it just won’t work… BUT you can remove the ‘dome’ and incorporate into the frame a little better OR you can just put it into the frame with the ‘dome’ on it and make it decorative…

      posted in Hardware
      cowboysdudeC
      cowboysdude
    • RE: PIR Motion sensor

      @richardh151 Here’s a VERY simple one…

      https://github.com/cowboysdude/Pir-Sensor

      posted in Troubleshooting
      cowboysdudeC
      cowboysdude
    • RE: Are there other Linux OS's Magic Mirror run on?

      Here’s one…

      https://forum.magicmirror.builders/topic/1489/the-32-inch-mirror

      I cannot tell you just how great it runs… it’s really a match made in heaven.

      posted in Feature Requests
      cowboysdudeC
      cowboysdude
    • RE: My mini magic Alarm Clock!

      @Cheese2face No it has to be done via the config file… ;)

      posted in Show your Mirror
      cowboysdudeC
      cowboysdude
    • RE: PIR sensor behind glass?

      @yo-less changing the brightness would be really nice… having it automatic would be better… you know at a certain time of night it dims automatically… but there is this…

      https://github.com/xflux-gui/xflux-gui

      posted in Hardware
      cowboysdudeC
      cowboysdude
    • RE: Modifying MMM-mqtt.....

      Alrighty… well it’s okay… I got it.

      posted in Troubleshooting
      cowboysdudeC
      cowboysdude
    • RE: MMM-Lottery

      Looks really good! Powerball numbers… I like it! :) Maybe I’ll win now.

      posted in Fun & Games
      cowboysdudeC
      cowboysdude
    • RE: change current weather colors - time and wind

      @karde said in change current weather colors - time and wind:

      Thanks for your help!!
      But that’s for the icon right? I’m trying to change the texts, “1.5” and “21:38”, but thanks for your help!

      Still done through the custom.css… not sure what they are as I use a different module for weather.

      posted in Development
      cowboysdudeC
      cowboysdude
    • RE: USB Microphone

      @ronny3050 said in USB Microphone:

      @Mitchfarino
      This is what I use: https://www.amazon.com/gp/product/B00IR8R7WQ/ref=oh_aui_detailpage_o00_s00?ie=UTF8&psc=1

      It works absolutely fantastic.

      Mine just came in today… looking forward to some sort of voice control ;)

      posted in Hardware
      cowboysdudeC
      cowboysdude
    • RE: Raspi turns HDMI after 10 minutes off

      @MyMirror did you try the cool search feature at the top? LOL

      I’m sure you did but the problem is the Screen Saver…here’s the topic that will make your life a lot easier :)

      https://forum.magicmirror.builders/topic/931/stop-the-screensaver/9

      posted in Troubleshooting
      cowboysdudeC
      cowboysdude
    • RE: MMM-Fortune

      Nice job!

      posted in Fun & Games
      cowboysdudeC
      cowboysdude
    • RE: change current weather colors - time and wind

      Hey @pugsly any help is good help!

      posted in Development
      cowboysdudeC
      cowboysdude
    • RE: Attach the monitor with glue to the mirror?

      @yawns Pictures are always cool!

      posted in Hardware
      cowboysdudeC
      cowboysdude
    • RE: MMM-NOAA

      @kbostick88 This is what you need :)

          {
           module: 'MMM-NOAA',
          config: {
      apiKey: "YOUR API KEY",    
      airKey: "YOUR API KEY",     
      pws1: "KNYELMIR13",	   
         }
        },
      

      Don’t need the loco1 ;)

      posted in Troubleshooting
      cowboysdudeC
      cowboysdude
    • RE: Modifying Compliments module

      Use a different module for compliments…

      https://github.com/cowboysdude/MMM-NiceThings

      A lot easier to use…

      posted in Development
      cowboysdudeC
      cowboysdude
    • 1 / 1