A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.
  • covid bell curve line graph tracker

    Solved
    89
    0 Votes
    89 Posts
    23k Views
    D

    @sdetweil sorry I did not see this till now. If it happens again I’ll be sure to grab them. It happened on both mine and my dad’s mirror so I’ll let him know to give me a heads up too. Thanks !

  • Dark sky module replacment

    9
    0 Votes
    9 Posts
    799 Views
    A

    @Stoffbeuteluwe OMG thank you, Those icons look really good. Thank you so much.

  • Gosund SP111

    15
    0 Votes
    15 Posts
    1k Views
    lavolp3L

    @lordhelix I have again increased debugging output.
    Please update the module again and report back on github.
    Thanks!

  • grafana module for bar graphs display.

    Unsolved
    9
    0 Votes
    9 Posts
    2k Views
    rubenixR

    @Piranha1605 Thanks tried that already, it trows:
    ‘The play method is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.’

  • ONVIF profile T viewer...

    1
    0 Votes
    1 Posts
    355 Views
    BKeyportB

    Here’s something I’d love to see picked up if possible -

    My security camera has issues with OMXPlayer/VNC/ffmpeg with a constant stream (With or without MM running, with or without RTSP-Stream).

    To get around this, I’d like to be able to set up the mirror to stream the camera only when motion is detected. This is the core of Profile T of ONVIF. I think based on my research OMX at least uses the simpler Profile S.

    Is there any way to do this?

  • Real-time display of current bets

    6
    0 Votes
    6 Posts
    411 Views
    S

    @Eyesen no problem… I might have added Is there a module than can display bets

  • looking for a very simple and funny module for aquarium data

    2
    0 Votes
    2 Posts
    358 Views
    R

    Aucune réponse ???

  • Gyroscopic Capability Module

    2
    0 Votes
    2 Posts
    496 Views
    bheplerB

    @Adam - I confess, I had never considered the possibility of a rotating mirror.

  • Station monitor KVB Köln

    13
    0 Votes
    13 Posts
    14k Views
    K

    Hallo,

    bin neuling und schaffe es nicht. Der zeigt mir nun auf dem Mirror ‘please create config file’ an.

    Was ist jetzt falsch? siehe bild![alt text](file.jpg image url)

  • NRL Module

    Unsolved
    2
    1 Votes
    2 Posts
    903 Views
    2

    This would be awesome. I’d love to work on something but not sure what free API has NRL info?

  • Authorization Code Generation

    3
    0 Votes
    3 Posts
    295 Views
    S

    @stacywebb Thank you…I will give this a try.

  • Pages automaticly go back to main page

    2
    0 Votes
    2 Posts
    306 Views
    FoziF

    @rxlDavid the latest MMM-pages release has now a new option called

    rotationFirstPage

    You can determine in ms when the first page should come up. I use this to let MM revert to the first page where a Text Clock is displayed like a kind of screen saver. To swipe to the other pages I use GroveGestures or Alexa-Control.

  • Runtastic, or any other training app

    7
    0 Votes
    7 Posts
    581 Views
    lavolp3L

    @duxnobis It will only be based on Strava but have many sub-modules:

    running records yearly progression weekly relative effort graph competition (against other athletes) trophy board (unfortunately not working properly anymore since recent API “update”) stats around recent activities
    and more

    Strava is the only sports platform I know of that has a useful API, which unfortunately gets more limited with every update. It is possible to transfer all activities from runtastic. I don’t know about apple data.

  • Why MMM-AssistantMk2 is deleted from the github, I can't find it

    2
    0 Votes
    2 Posts
    259 Views
    S

    @ahmedalkabir yes, that module has been deleted, please use the new MMM-GoogleAssistant module

  • Display Current Cast

    Solved
    3
    0 Votes
    3 Posts
    725 Views
    O

    Got it.

    Thank you very much.

  • Meross

    4
    1 Votes
    4 Posts
    577 Views
    lavolp3L

    @thetobyde for the DOM I have created the following elements:

    var label = document.createElement("label"); label.className = "tasmota-switch"; label.id = "switch-" + topic; var input = document.createElement("input"); input.type = "checkbox"; input.id = "checkbox-" + topic; input.checked = this.setSwitch(topic); var span = document.createElement("span"); span.className = "slider round"; span.id = "slider-" + topic; span.onclick = function() { self.toggleSwitch(topic); }; label.appendChild(input); label.appendChild(span);

    there is a label (as wrapper), a (hidden) checkbox, and a span that is the actual slider.
    The onclick function for the slider looks like this:

    toggleSwitch: function(topic) { this.sendSocketNotification("TOGGLE_SWITCH", topic); console.log("Switch toggled: " + topic); },

    So, rather generic. There you need to tell the api that you have toggled the switch.

    Also, at every DOM update you need to check the api for the switch state (see the this.setSwitch-function above). It may have been switched from another endpoint or app.
    The result sets the “checked” state of the hidden input.

    setSwitch: function(topic) { this.log("Setting switch for " + topic); var powerState = this.tasmotaData.tele[topic].STATE.POWER; return (powerState === "ON") ? true : false; },

    The rest is css:

    /*** SWITCHES ***/ .MMM-Tasmota .tasmota-switch { float: right; position: relative; display: inline-block; width: 90px; height: 34px; } /* Hide default HTML checkbox */ .MMM-Tasmota .tasmota-switch input { opacity: 0; width: 0px; height: 0px; } /* The slider */ .MMM-Tasmota .slider { position: absolute; cursor: pointer; top: 0; left: 30px; right: 0; bottom: 0; background-color: #f00; border: 3px solid white; -webkit-transition: .2s; transition: .2s; } .MMM-Tasmota .slider:before { position: absolute; content: ""; height: 26px; width: 26px; left: 3px; bottom: 1px; background-color: white; -webkit-transition: .2s; transition: .2s; } .MMM-Tasmota input:checked + .slider { background-color: #0f0; } .MMM-Tasmota input:checked + .slider:before { -webkit-transform: translateX(24px); -ms-transform: translateX(24px); transform: translateX(24px); } /* Rounded sliders */ .MMM-Tasmota .slider.round { border-radius: 34px; } .MMM-Tasmota .slider.round:before { border-radius: 50%; }

    I will publish all of that with my MMM-Tasmota module.

  • AirPlay AirportExpress

    1
    0 Votes
    1 Posts
    233 Views
    E

    Is there any module to read AirPlay Infos from Airport Express like the MMM-Sonos Module?
    Any suggestions?

    Greats Gregor

  • SenseHat data on MM?

    10
    0 Votes
    10 Posts
    4k Views
    framboise-piF

    @lavolp3 :face_savouring_delicious_food:

    just had the idea of a tamagotchi-like (using sensors and MagicMirror to display life stats etc.) : MMM-MySenseHatTamagotchi

    im searching too for 8x8 ideas, and wrote some on the module page (MMM-MySenseHat), in issues section. Maybe you’ll find ideas there, to help you find other ideas !

    let’s 8x8 !

    :vulcan_salute_light_skin_tone:

  • Return to first page after a delimited time

    4
    0 Votes
    4 Posts
    253 Views
    B

    i solved my case.

    probably not the better way but here is the js modified :

    Module.register('MMM-pages', { // We require the older style of function declaration for compatibility // reasons. /** * By default, we have don't pseudo-paginate any modules. We also exclude * the page indicator by default, in case people actually want to use the * sister module. We also don't rotate out modules by default. */ defaults: { modules: [], excludes: [], // Keep for compatibility fixed: ['MMM-page-indicator'], animationTime: 1000, rotationTime: 0, rotationFirstpage:0, rotationDelay: 10000 }, /** * Apply any styles, if we have any. */ getStyles: function () { return ['pages.css']; }, /** * Modulo that also works with negative numbers. * * @param {number} x The dividend * @param {number} n The divisor */ mod: function (x, n) { return ((x % n) + n) % n; }, /** * Pseudo-constructor for our module. Makes sure that values aren't negative, * and sets the default current page to 0. */ start: function () { this.curPage = 0; this.rotationPaused = false; // Compatibility if (this.config.excludes.length) { Log.warn('[Pages]: The config option "excludes" is deprecated. Please use "fixed" instead.'); this.config.fixed = this.config.excludes; } // Disable rotation if an invalid input is given this.config.rotationTime = Math.max(this.config.rotationTime, 0); this.config.rotationDelay = Math.max(this.config.rotationDelay, 0); this.config.rotationFirstpage = Math.max(this.config.rotationFirstpage, 0); }, /** * Handles incoming notifications. Responds to the following: * 'PAGE_CHANGED' - Set the page to the specified payload page. * 'PAGE_INCREMENT' - Move to the next page. * 'PAGE_DECREMENT' - Move to the previous page. * 'DOM_OBJECTS_CREATED' - Starts the module. * 'QUERY_PAGE_NUMBER' - Requests the current page number * * @param {string} notification the notification ID * @param {number} payload the page to change to/by */ notificationReceived: function (notification, payload) { switch (notification) { case 'PAGE_CHANGED': Log.log('[Pages]: received a notification ' + `to change to page ${payload} of type ${typeof payload}`); this.curPage = payload; this.updatePages(); break; case 'PAGE_INCREMENT': Log.log('[Pages]: received a notification to increment pages!'); this.changePageBy(payload, 1); this.updatePages(); break; case 'PAGE_DECREMENT': Log.log('[Pages]: received a notification to decrement pages!'); // We can't just pass in -payload for situations where payload is null // JS will coerce -payload to -0. this.changePageBy(payload ? -payload : payload, -1); this.updatePages(); break; case 'DOM_OBJECTS_CREATED': Log.log('[Pages]: received that all objects are created;' + 'will now hide things!'); this.sendNotification('MAX_PAGES_CHANGED', this.config.modules.length); this.animatePageChange(); this.resetTimerWithDelay(0); break; case 'QUERY_PAGE_NUMBER': this.sendNotification('PAGE_NUMBER_IS', this.curPage); break; case 'PAUSE_ROTATION': if (!this.rotationPaused) { Log.log('[Pages]: pausing rotation due to notification'); clearInterval(this.timer); clearInterval(this.delayTimer); this.rotationPaused = true; } else { Log.warn('[Pages]: Was asked to paused but rotation was already paused!'); } break; case 'RESUME_ROTATION': if (this.rotationPaused) { Log.log('[Pages]: resuming rotation due to notification'); this.resetTimerWithDelay(this.rotationDelay); this.rotationPaused = false; } else { Log.warn('[Pages]: Was asked to resume but rotation was not paused!'); } break; default: // Do nothing } }, /** * Changes the internal page number by the specified amount. If the provided * amount is invalid, use the fallback amount. If the fallback amount is * missing or invalid, do nothing. * * @param {number} amt the amount of pages to move forward by. Accepts * negative numbers. * @param {number} fallback the fallback value to use. Accepts negative * numbers. */ changePageBy: function (amt, fallback) { if (typeof amt !== 'number') { Log.warn(`[Pages]: ${amt} is not a number!`); } if (typeof amt === 'number' && !Number.isNaN(amt)) { this.curPage = this.mod( this.curPage + amt, this.config.modules.length ); } else if (typeof fallback === 'number') { this.curPage = this.mod( this.curPage + fallback, this.config.modules.length ); } }, /** * Handles hiding the current page's elements and showing the next page's * elements. */ updatePages: function () { // Update iff there's at least one page. if (this.config.modules.length !== 0) { this.animatePageChange(); if (!this.rotationPaused) { this.resetTimerWithDelay(this.config.rotationDelay); } this.sendNotification('NEW_PAGE', this.curPage); } else { Log.error("[Pages]: Pages aren't properly defined!"); } }, /** * Animates the page change from the previous page to the current one. This * assumes that there is a discrepancy between the page currently being shown * and the page that is meant to be shown. */ animatePageChange: function () { const self = this; // Hides all modules not on the current page. This hides any module not // meant to be shown. MM.getModules() .exceptWithClass(this.config.fixed) .exceptWithClass(this.config.modules[this.curPage]) .enumerate(module => module.hide( self.config.animationTime / 2, { lockString: self.identifier } )); // Shows all modules meant to be on the current page, after a small delay. setTimeout(() => { MM.getModules() .withClass(self.config.modules[self.curPage]) .enumerate((module) => { module.show( self.config.animationTime / 2, { lockString: self.identifier } ); }); }, this.config.animationTime / 2); }, /** * Resets the page changing timer with a delay. * * @param {number} delay the delay, in milliseconds. */ resetTimerWithDelay: function (delay) { if (this.config.rotationTime > 0) { // This timer is the auto rotate function. clearInterval(this.timer); // This is delay timer after manually updating. clearInterval(this.delayTimer); const self = this; this.delayTimer = setTimeout(() => { self.timer = setInterval(() => { self.sendNotification('PAGE_INCREMENT'); self.changePageBy(1); self.updatePages(); }, self.config.rotationTime); }, delay); }if (this.config.rotationFirstpage > 0) { // This timer is the auto rotate function. clearInterval(this.timer); // This is delay timer after manually updating. clearInterval(this.delayTimer); const self = this; this.delayTimer = setTimeout(() => { self.timer = setInterval(() => { self.sendNotification('PAGE_CHANGED', 0); self.changePageBy(-this.curPage); self.updatePages(); }, self.config.rotationFirstpage); }, delay); } }, });
  • Pi-hole API presenter

    8
    0 Votes
    8 Posts
    7k Views
    H

    I was also having this issue where magic mirror was not showing status.

    i made silly mistake of copying the url which i access in browser but later i noticed that we need to copy the url with “api.php” in end of the address which fix the issue for me.