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: Should be an easy one: module_center stretches the entire width of the screen. How do I resize this?

      @beeficecream Add this in your custom.css in MagicMirror/css:

      .module.newsfeed {
      max-width: 500px; // adjust px to taste, or use %, em, etc
      }
      

      You can learn more about CSS units here. I think that’s the right selector for newsfeed, but may be mistaken.

      posted in Development
      N
      ninjabreadman
    • RE: Could use some assistance setting up MMM-Carousel w/ Navigation and understanding the architecture

      @beeficecream Glad to hear it’s fixed.

      I think you have one of two options. I think you’re right that the default calendar module won’t support multiple instances.

      You could try to make another, second module of the calendar module, renaming certain variables or notifications to avoid collisions.

      Alternatively, you could use calendar for personal and another module (e.g. @Sean’s excellent MMM-CalendarExt) to display your work schedule. It even supports multiple views, but don’t know that you could display them in different carousel slides.

      posted in Troubleshooting
      N
      ninjabreadman
    • RE: Could use some assistance setting up MMM-Carousel w/ Navigation and understanding the architecture

      Hey @beeficecream (which btw, sounds awful).

      First, have you looked at the README.md for MMM-Carousel? It has a slides carousel example. That should be added to the config.modules array with all other module configs (i.e. that cannot be all that appears in your config, or nothing will appear … you’ll need to configure your other modules separately).

      Second, keep all of the settings for MMM-Carousel within its module config object. There is nothing, afaik, that you need to put in other module configs. [Edit: wrong, see @shbatm’s post below!]

      Third, whenever having trouble with your config.js, I recommend you copy/paste it into JSHint. It will point out the errors you have. If it won’t load after changes, chances are there are syntax problems, albeit there can sometimes be other issues.

      Sorry if I missed the point of your questions. Feel free to post your complete config.js (minus any API keys and passwords). Let us know how you fare.

      posted in Troubleshooting
      N
      ninjabreadman
    • RE: How to pass a value between functions in a Module?

      @ameenaziz I think if you change var ajaxResult; to this.ajaxResult = ""; and change all other references (from ajaxResult to this.ajaxResult), you should be able to access it from anywhere in your module, including getDom(). Just remember when getDom() is first called, this.ajaxResult may still be empty until the response is received.

      posted in Development
      N
      ninjabreadman
    • RE: How to pass a value between functions in a Module?

      @ameenaziz Have a look at how the default modules do it, like newsfeed. It creates a this.newsItems variable, but also a this.loaded boolean. It uses socketNotificationRecieved() to trigger generateFeed() which updates this.newsItems, then changes this.loaded to true.

      posted in Development
      N
      ninjabreadman
    • RE: ECONNREFUSED when trying to get JSON from my server (MMM-json-feed)

      @E3V3A Also, @toh1000’s HTTP request included the header Accept-Encoding: gzip, deflate, so the test site responded with Content-Encoding: gzip. That’s totally appropriate, and usually this is handled transparently by the client, which will then provide the uncompressed response. However, the actual service (“My service”) responded with no compression.

      posted in Troubleshooting
      N
      ninjabreadman
    • RE: ECONNREFUSED when trying to get JSON from my server (MMM-json-feed)

      @toh1000 Can you reach the JSON service with curl on your MM machine? And @e3v3a is right – ideally put the response through a validator, especially for things like trailing commas.

      posted in Troubleshooting
      N
      ninjabreadman
    • RE: Multiple screens fo MM.

      @Joshrobbs1 Two monitors on each side, or one each/two total? You could run two completely separate mirror instances, or one instance (i.e. server) and hide the modules (via CSS) you don’t want displayed on each one.

      I suggest using a Raspberry Pi Zero W to power one display, run a browser and connect to the other instance/server (or run an MM instance on the RPi Zero W). The server could be on a more powerful Raspberry Pi (3b) or some old laptop hardware. You would want to run the simpler, static modules (weather, time, calendar) on the RPi Zero W and the more demanding, processor-intensive modules (voice, video feeds, complex rendering) on the server.

      I don’t know how MM feels about running two instances on the same machine – you’d need to set different ports, scripts, etc, but I imagine it’s possible with some reconfiguration to avoid collisions.

      posted in General Discussion
      N
      ninjabreadman
    • RE: Multiple screens fo MM.

      @Mykle1 I know, but I figured as the author of MMM-Hello-Lucy you might be able to explain how (and if) it could help (because it wasn’t apparent to me). I only meant to mention you so that you got a notification; it definitely wasn’t meant to be accusatory.

      posted in General Discussion
      N
      ninjabreadman
    • RE: Creating a module with existing Nodejs client?

      @Baxer An API (and client) give you a way to ask for information; it doesn’t stipulate what information to request, or how to display it. However, you could use MagicMirror-Module-Template then run npm install --save open-shl within your module folder to install open-shl.

      You would then add the code featured here to load the API and start querying data. I recommend loading the API in your node_helper.js and passing back the data to display via this.sendSocketNotification(notification, payload).

      posted in Development
      N
      ninjabreadman
    • 1 / 1