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
    • My Setup (or: How crazy I am)

      I realized yesterday as I was chatting with @Eunanibus, that the way I write code and debug it is probably rather unique, compared to how others might be doing it. Then today at the office I was tasked with having to create a full network map of the building, after all, being the IT Director, I’m the one that put it all in place, so why not.

      Then I thought, why not use my home setup, specific to how I do my coding for MagicMirror, and create a layout in the hopes that when I say ‘load up MagicMirror in a regular browser on a different machine’, it would actually make some sense.

      Preface
      This is a rather small portion of my home network, centered around two physical devices. There are about a dozen other devices on the network. This specific setup consists of a Windows 10 work station (dual monitors) where I do everything on, and the Raspberry Pi and its monitor sitting on my desk (and if you’re counting, that’s 3 out of 5 monitors that are on my desk.) The rpi has it’s own monitor hooked on to it and displays MagicMirror on that. The layout below starts at my connection to the Internet all the way down to the Windows 10 and Raspberry Pi, then it breaks into the specific processes that are used on either platform to get the job done.

      I will write notes after the image, so make sure to scroll down. With that said:

      0_1466663377799_netflow.png

      As you can probably see, the Windows 10 machine is hard wired into the network switch, while the Raspberry Pi is connected via wireless to an AP (access point).

      On the rpi, I have a dedicated folder called 'GitHub' in the user 'pi' home folder where I keep all my repositories. I clone that stuff with 'Git', then 'npm' launches the MagicMirror application onto the rpi’s monitor. Also on the rpi, I run 'samba' which provides an SMB/CIFS protocol for the Windows machine (and anything else wanting NETBIOS connections to it.) It exports the '~pi/GitHub' folder to the network, specifically only to the Windows 10 machine.

      On the Windows side, I will map that NETBIOS export onto a drive, in this layout it’s drive letter 'X:\'. Now I have access to all of the repositories that are on the rpi. I can use 'Git for Windows' to manage them (or, more often than not, I will use 'git' on the rpi itself since I’m generally also logged in via SSH.) Now that I have access to the repositories, I can use my editor to open and edit the files like I normally would any other file.

      At the same time, I also have a Chrome browser open, pointed at the rpi’s address and port, which will load up the MagicMirror application, completely independent of what’s showing on the rpi’s monitor. That means, I can edit files, change or write new code, save, and hit refresh on the browser and get an instant feedback, without messing up what’s running on the rpi’s monitor! This is great for comparing things.

      As I showed @Eunanibus yesterday, I use the Chrome browser’s console panel to debug code, whether it’s HTML code, or the console log messages as can be seen here. Remember, dual monitors, so on the left monitor is my editor with split view so I can open multiple files side-by-side, and on the right is the Chrome browser with the console panel open.

      0_1466664231042_mirrorcoding.png

      Looks convoluted, doesn’t it? Trust me, I’ve seen worse. :)

      Now go forth and code Code CODE!

      posted in Development
      KirAsh4K
      KirAsh4
    • RE: raspberry freezes

      Just for testing purposes, remove that splitter, and plug the rpi and monitor into their own outlets in the wall (as opposed to them coming out of one.) Not that I think this would really do much, but I want to eliminate the splitter as the possible cause.

      posted in Troubleshooting
      KirAsh4K
      KirAsh4
    • RE: Installing MM2

      I believe @paviro is the Electron God around here. But he’s busy with school at the moment so it may be a bit before he responds.

      posted in Troubleshooting
      KirAsh4K
      KirAsh4
    • RE: TypeError: curr.start.toISOString is not a function

      Does she have the same events as you? Setup the same way? Same time zones configured?

      posted in Troubleshooting
      KirAsh4K
      KirAsh4
    • RE: raspberry freezes

      That link is either invalid or doesn’t exist to what you want it to go. I’m getting a 404 on it. Either way, my gut feeling is the pi dies because of not enough power. It needs to be powered from something that can provide at least 2A worth at 5V.

      posted in Troubleshooting
      KirAsh4K
      KirAsh4
    • RE: Random Quotes

      Thanks, merged into dev. Will push it to master as well.

      posted in Utilities
      KirAsh4K
      KirAsh4
    • RE: TypeError: curr.start.toISOString is not a function

      Basically one of us has to find the time to investigate. The way Office386 creates its dates is really odd. Leave it to Microsoft to break things … as always.

      posted in Troubleshooting
      KirAsh4K
      KirAsh4
    • RE: Debugging

      Nothing would appear in the terminal, it’s not the STDOUT facility that you’re using. The console.log() facility logs to the browser’s console log. With most browsers, you access this by pressing F12. This is what my desktop looks like when I’m coding. Note that this is a Windows machine with dual monitors. On the left monitor is my code editor, split into two panels so I can look at multiple files at the same time. The files are being opened directly from the MagicMirror folder on the Raspberry Pi. On the right is a Chrome browser open with the Raspberry Pi’s IP address. That loads up the mirror display. And by hitting F12, I get the console panel that you see open, and at the bottom you can see the debugging messages that I put in the code to track. I can write/change code in the editor, hit Save, then hit Refresh in Chrome and get instant feedback. All of that is completely independent of what’s actually being displayed on the Raspberri Pi’s monitor.

      The panel also allows me to see the actual HTML being returned (by selecting Elements at the top.) So any code that I write, I can verify the HTML bit, and I can follow along with any errors or other messages that I put in the code. When the mirror code fails for some reason, I can look in the console and try to figure out where the error lies.

      0_1466571359041_mirrorcoding.png

      posted in Development
      KirAsh4K
      KirAsh4
    • RE: Debugging

      I guess I’m not sure what you mean with ‘real-time debugging’ as there is no real-time anything between the node server and the browser. Everything runs on the browser end, and because of that, you can open the console window and watch what’s happening, in as ‘real-time’ as possible. I’m also not sure what exactly you are trying to debug.

      As I explained before, when I’m writing code, I watch the console log for errors. I simply refresh the browser when I need to check for things. Remember, I don’t use the actual Raspberry Pi nor the monitor connected to it to debug. I load up the mirror on a regular browser on my computer and debug there. I also write code there.

      Hrm, it dawned on me that I should explain better how I’m doing this …

      posted in Development
      KirAsh4K
      KirAsh4
    • RE: TypeError: curr.start.toISOString is not a function

      Ok, preliminary digging done. It appears the pattern matching isn’t working correctly for the times that Office386 puts on its calendar, I mean, really 1601 for a year? I don’t think so.

      Anyway, I’m going to tag @MichMich on this since he wrote the default calendar and I believe the node-ical stuff as well. I have the output of the ICS, so if you had shared it to get me the link, you can unshare it. I can work with the saved output.

      posted in Troubleshooting
      KirAsh4K
      KirAsh4
    • 1
    • 2
    • 41
    • 42
    • 43
    • 44
    • 45
    • 77
    • 78
    • 43 / 78