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

    Posts

    Recent Best Controversial
    • RE: Cant run the app

      @goncalovsc Is this after having run the auto install script or manually installing? Did you run npm install in the ~/MagicMirror folder? Have you tried running npm start in the same directory?

      @cruunnerr What are the permissions of your run-start.sh? It doesn’t make sense to me that mine is rw-r—r— but works fine. I would expect it needs x permissions.

      posted in Troubleshooting
      N
      ninjabreadman
    • RE: Timetable with (almost) static data

      @AxLed Honestly, I derailed the conversation with other ways it could be accomplished.

      If you have apache2 and php serving up your .csv file, you’ve accomplished what you need to in a way that can easily be updated in future. You already solved the requirement with option A. You could change how you generate the table from the CSV, but that’s a lot of work with no real benefit.

      If you want to post your CSV/HTML, we can maybe recommend ways to help style it, but you’ve already accomplished what you set out to do.

      posted in Requests
      N
      ninjabreadman
    • RE: Transfer to smaller SD card

      @crowbar You can either (1) truncate your original SD partition to 8Gb, transfer or backup/restore to your new card, or (2) create an image, resize the image to 8Gb, then restore it to your new SD card. If you already have an RPi backup, suggest you do the latter method.

      As @Mykle1 notes, this is a very common issue (esp for RPi), but is complicated in that Win/Mac don’t play nice/at all with ext4 partitions. It’s not a great idea to back up the RPi while it’s running (esp to itself) – it is swapping all kinds of temp files, it has comparatively poor I/O, plus you’ll need a machine with two SD card readers or an interim storage medium like an HDD or USB stick. As he notes, a Live USB/CD is useful in this regard.

      posted in Troubleshooting
      N
      ninjabreadman
    • RE: Timetable with (almost) static data

      @doubleT D’oh! I totally overlooked the PHP requirement in contemplating a revised approach. Given it’s already written, probably not worth porting the code to native js. ¯\_(ツ)_/¯

      @AxLed could however view the PHP file, save the generated HTML, and then serve the static file (until next semester, anyway!).

      posted in Requests
      N
      ninjabreadman
    • RE: Timetable with (almost) static data

      @doubleT Not exactly. More like making and keeping around a hammer for the occasional tiny nail. Locally loading an HTML file absent a server is more akin to hammering with the handle is a screwdriver. ;)

      Will the existing instance of Server in server.js not serve files in the /modules directory? Like an iframe of /modules/MMM-iframe/sched.html? If not, could you add a /static or similar folder to directories? As you say, seems overkill to (1) run an apache2 instance, but even to (2) create a separate webserver in Node, given that MM already runs one that can be used or modified.

      Apologies all, I’m posting from my phone on vacation, so am speaking before properly testing.

      posted in Requests
      N
      ninjabreadman
    • RE: (2.1.0) Calendar will broadcast events.

      @jer78 Here is the Readme.md for third party modules, which details the notification system: https://github.com/MichMich/MagicMirror/blob/master/modules/README.md

      Your module will receive a CALENDAR_EVENTS notification, with a payload which is an array of calendar events objects with the following attributes: title, startDate, endDate, fullDayEvent, location and geo.

      You can make your own module, or modify an existing one. MMM-Traffic will display Google Maps directions to a given destination. You can override its receiveNotification function to (1) sort the payload to find the soonest event, (2) decide if there’s an event in the next 2 hours, and (3) display directions to the destination using the location or geo coordinates.

      Remember, you’ll need to populate those fields when creating your event entries, and you may also need to provide a hint (e.g. “Colombus, OH”) to Google so it knows which “Olive Garden” or “Municipal Library” you’re looking for.

      posted in Upcoming Features
      N
      ninjabreadman
    • RE: Need Guidence, Or Someone To Make A Module For Me, Uses GPIO

      @SpicyCoding

      For the coding part, you might consider using CSS to create your transparency:

      .module .knockknock {
        background: url("img_tree.jpg") no-repeat fixed center;
        opacity: 1.0;
      }
      

      Then for each knock, it could then increment opacity by 0.1. If you wanted to keep the other modules visible, you can position a separate element over the other modules. You could then have a timer running that after X amount of time the opacity resets to 1.0. (Or you can increment the opacity of the body and reset the opacity of all child elements/modules to 1.0.)

      You can also get fancier and use CSS animations to create transitions between each step, and to make it reappear, but best to get a proof-of-concept first.

      posted in Requests
      N
      ninjabreadman
    • RE: Prepping my first build. Care to check my work?

      @3DPrintedWaffles

      Just here to echo and add to the comments from @bhepler:

      • Liquid nails can work, but you will need to clamp (or otherwise brace) the corners to let it dry. Usually for a wood joint you will use fasteners (nails, screws) and reinforce with glue. If not using fasteners, you can also use a biscuit or tongue to reinforce the joint.
      • If you use screws, pre-drill the holes to avoid splitting your wood. You may also consider whether you want to create butt joints (square) or miter joints (angle).
      • The bezel is also often what hides the electronics behind your mirror. Without the bezel, you may still want a skirt behind the mirror to conceal those elements.
      • With bevel-less, you may want to find the most opaque material possible to prevent light entering the back of your mirror (that would otherwise be mostly blocked by the bezel/skirt).
      • I have no experience with gluing to glass, but would worry about seeing the glue beneath your mirror.
      • Also, given that your glass and display will be different sizes, if you mount the display in a corner of the glass you will need multiple mounting points for your mirror – it won’t hang level from a single point (as it won’t balance).
      posted in Development
      N
      ninjabreadman
    • RE: Timetable with (almost) static data

      @AxLed To answer your question, apache2 or xginx serving a single static page without (image) assets will have a negligible footprint and cause minimal load, certainly not noticeable with everything else the Pi is doing for MM and Node.js.

      As for your layout and styling question, I quickly Googled this layout here, which might help, and comes with example markup and styling (and explanatory article): https://codyhouse.co/demo/schedule-template/index.html

      posted in Requests
      N
      ninjabreadman
    • RE: what mic?

      I don’t have one, but this Hufear USB mic at Amazon claims a range of 10 ft, and the MXL AC-404 claims 25 feet.

      There are different types of mics, but I imagine you’re looking for an omnidirectional, boundary (sits on a flat surface) mic. You may also want to consider esthetics/appearance, depending on where you decide to place your mic.

      You might also consider mic placement; there’s nothing that says the mic must be placed with your mirror. It will depend on your mirror, walls, and furniture, but you could run a wire to a more equidistant point for better audio (even having it recessed in a frame could create a too-narrow aperture for the mic).

      posted in General Discussion
      N
      ninjabreadman
    • RE: npm start and black screen

      @dexterbeng I would guess 15-30 seconds. pm2 has to detect that the process has terminated and restart. It depends on the polling interval for pm2 (which, as far as I can tell from their docs/issues, is 100ms, and cannot be changed – seems more frequent than I expected).

      Why are you killing mm with Ctrl+Q? Better to use pm2 restart mm or even pm2 start mm --watch which will also restart mm after file system changes (you may need to configure which directories to watch).

      posted in Troubleshooting
      N
      ninjabreadman
    • RE: npm start and black screen

      @dexterbeng If you have pm2 and the mm script installed, it’s simplest to use pm2 start/stop mm. However, npm start dev is still useful to debug server and client consoles, just don’t forget to first pm2 stop mm as you describe.

      posted in Troubleshooting
      N
      ninjabreadman
    • RE: magic mirror as a smart clock

      @MrRodz If you install MMM-Remote-Control and correctly configure the ipWhiteList, it will install a generic receiver to receive commands to your MM via a local HTTP GET request.

      You can then use an HTTP GET request like http://192.168.178.240:8080/remote?action=SHOW&module=module_0_MMM-GoogleMapsTraffic to trigger a module/action, switch profiles, or create your own custom actions.

      I’m terms of GPIO for your doorbell, see MMM-Buttons or MMM-PIR-Sensor. It seems to me you want to receive a GPIO event, switch profiles, and start a timer to later revert your profile to the original – that’s basically MMM-PIR-Sensor (movement, turn on screen, set timer to turn off).

      posted in Troubleshooting
      N
      ninjabreadman
    • RE: MMM-Slack stop randomise messages

      Hi @saibam,

      Just change:

      var randomMessageId = Math.floor(Math.random() * this.slackMessages.length);
      

      to the following:

      var randomMessageId = 0;
      

      It should work (unrandomizing the order), so long as the slackMessages array is in ascending order. If not, and it’s in descending order, set to this.slackMessages.length - 1 instead of 0.

      posted in Troubleshooting
      N
      ninjabreadman
    • RE: How can I show a borderless (Bash) shell terminal window on top of MM?

      @E3V3A You can experiment with urxvt and with URxvt*borderLess:true in .Xdefaults. You can then use ChildProcess.exec() (primer here) to launch urxvt which should also permit you to kill it from MM.

      posted in Development
      N
      ninjabreadman
    • RE: {HowTo} turn on/off your monitor (Time based, PIR/Button, App)

      @E3V3A Some monitors, but almost all television displays turn off after delay (and then cannot be woken in software).

      That, and some folks have complained that they can’t hear a podcast or Alexa because their integrated speakers turn off when the monitor is in powersaving.

      You’re right, it takes some experimentation to tailor to a given use case/situation depending on requirements.

      posted in Tutorials
      N
      ninjabreadman
    • RE: node_helper and python communication

      @jmagsumbol Should the function be simply called start()? Does python_start() ever get called?

      Alternatively, with a slight modification of MMM-PIR-Sensor, I think this could all be done within Node.js. You’d just need to examine how to handle the GPIO of the ultrasonic sensor in however it differs from a PIR sensor.

      For actually turning the screen off and on, check out @cruunnerr‘s guide: https://forum.magicmirror.builders/topic/6291/howto-turn-on-off-your-monitor-time-based-pir-button-app/7

      posted in Troubleshooting
      N
      ninjabreadman
    • RE: Calendar and Newsfeed stop Updating after 1-2 hours

      @osoWP95

      If you’re using pm2, you can use pm2 logs to view the server logs (or view them directly in ~/.pm2/logs).

      You can also use npm start dev to start in dev mode and see the browser (client) console (be sure to stop the PM2 process first, e.g. pm2 stop mm).

      posted in Troubleshooting
      N
      ninjabreadman
    • RE: {HowTo} turn on/off your monitor (Time based, PIR/Button, App)

      Thanks, @cruunnerr. Very comprehensive. Can I suggest you also add how to black out but not disable the monitor? I’ve seen this question a few times. It is often important when users:

      1. want to still use the integrated audio out of a monitor, or
      2. are using a TV style display where it will turn off without signal, and then cannot be turned back on by the Pi.

      I’ve seen solutions using xset dpms force off and another using chvt to display a blank virtual terminal, but there may be other (even better) solutions.

      posted in Tutorials
      N
      ninjabreadman
    • RE: Changing the length of the line under the header

      @MadScientist I’ve always liked W3Schools. It’s very concise, but introduces each concept and lets you play with it.

      There are also learning/coursework sites like CodeAcademy, Code School, udemy, etc.

      Groups like Ladies Learning Code also have slides and sample code available to walk you through.

      There is CSS, but there are also media queries, CSS animations, layout frameworks, CSS extensions/preprocessors like Sass & LESS, among other things. Let alone different limitations, workarounds, and other peculiarities for different desktop and mobile browsers.

      Finally, the best way to learn and retain is often to apply it. Building things will often reinforce whatever you learn through the sites and materials above.

      posted in Custom CSS
      N
      ninjabreadman
    • 1 / 1