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

    Posts

    Recent Best Controversial
    • RE: NPM process dies

      Are you using a proper power supply for the rpi? You need something that can provide at least 2A … anything less will cause it to be unstable with random crashes of processes. Adafruit has both a 2A version as well as a 2.4A one.

      posted in Troubleshooting
      KirAsh4K
      KirAsh4
    • RE: NPM process dies

      If you install PM2 per the instructions, it will automatically get restarted if/when it dies.

      As for why it dies, if you are running PM2, you might be able to see if anything gets logged with 'pm2 logs'. But I’m not sure if it does log anything to be honest. PM2 does, but the npm process itself … unsure.

      posted in Troubleshooting
      KirAsh4K
      KirAsh4
    • RE: Debugging

      Or if you wish to run your module with jQuery, using .width() and .height() will also give you the size of the element.

      posted in Development
      KirAsh4K
      KirAsh4
    • RE: Debugging

      This might help you: http://www.w3schools.com/jsref/prop_element_offsetwidth.asp

      posted in Development
      KirAsh4K
      KirAsh4
    • RE: "phyton capture.py" error

      You said you’re using a USB camera, but that error tells me it’s wanting to access an rpi camera, one that gets connected to the on board camera port, not USB. You’re going to have to figure out how to change the code to use a USB camera instead.

      posted in Troubleshooting
      KirAsh4K
      KirAsh4
    • RE: Debugging
      1. Nope, or unknown rather.
      2. Check your router for the IP of the devices connected to it, or on the rpi, type ifconfig at the prompt. If you’re connected wirelessly, look for the wlan0 block. If it’s hard wired, look for the eth0 block.

      And if you have access to your router, it’s worth setting the rpi’s IP to always be the same.

      posted in Development
      KirAsh4K
      KirAsh4
    • RE: Monthly Calendar

      Small update pushed to the master branch (which is now up-to-date with the dev branch.) Please read the README for more info on the added config options.

      posted in Utilities
      KirAsh4K
      KirAsh4
    • RE: Debugging

      For debugging purposes, I sprinkle 'Log.log("...")' statements in my code which I can then see in the console log. For example, in my calendar_monthly module, I have a 'debugging'flag that I can set which then outputs this bit in the console log:

      = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
      CALENDAR_MONTHLY IS IN DEBUG MODE!
      Remove 'debugging' option from config/config.js to disable.
                   Current moment(): 1466399977889 (11:19:37 pm)
      scheduleUpdate() delay set at: 1466402400000
        nextReload should happen at: 1466402400000 (12:00:00 am)
                        which is in: 40 minutes and 22 seconds.
                    midnight set at: 1466402400000 (12:00:00 am)
      = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
      

      That output helped a great deal when I needed to accurately calculate those values (and I couldn’t figure out why the delay I was setting wasn’t right.)

      Having log notifications like that helps. I tend to put them in places where I need to check for a value, or verify that a condition is being met, before the rest of the code continues on. It’s worth nothing that I load the running mirror remotely on my development desktop machine (through Chrome or Firefox) by going to my rpi’s IP and MM’s port. I don’t touch the actual running task on the rpi itself, once loaded, I leave it alone. When I make a change in the code, I can refresh my browser and see the results immediately without affecting the mirror itself. It’s not till I’m certain the code works that I will restart the npm process on the mirror. This has the added advantage that I can see the current running code on the mirror and compare it with what the new/changed code shows on my remote browser.

      As for the height/width part, those are being set in the main CSS file. Because it’s a fluid layout, there is no exact numbers, it’s all calculated at run-time based on the monitor’s resolution. So you’ll have to use the main layout “box” for the position that your module will be in, and then work within that. Setting fixed sizes will cause problems later down the road with folks who don’t have the same resolution as you.

      posted in Development
      KirAsh4K
      KirAsh4
    • RE: Strange weather bug?

      Use the same key.

      posted in Troubleshooting
      KirAsh4K
      KirAsh4
    • RE: Strange weather bug?

      Not necessarily.

      posted in Troubleshooting
      KirAsh4K
      KirAsh4
    • 1
    • 2
    • 43
    • 44
    • 45
    • 46
    • 47
    • 77
    • 78
    • 45 / 78