A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.
  • Transport NSW

    Unsolved Requests
    1
    0 Votes
    1 Posts
    330 Views
    M

    Hello,

    Total noob here. Apologies if this is not the right forum to ask this.

    Would anybody know of, or be willing to code, a module that uses data from Transport NSW buses or trains etc?

    I’d really like to monitor buses to see when there’s a specific number bud approaching the stop nearest my home so that I don’t leave too early or too late. The perfect solution would be to get an alert to tell me when it’s a few stops or a certain time away.

    I believe this would be the place to look:

    https://opendata.transport.nsw.gov.au/developers/api-explorer

    Thank you

  • MMM-DailyPokemon Issue

    Solved Troubleshooting
    13
    0 Votes
    13 Posts
    1k Views
    mumblebajM

    @millis No problem. Just mark the post as solved.

  • Problem starting various modules

    Solved Troubleshooting
    3
    0 Votes
    3 Posts
    503 Views
    J

    @sdetweil That did it! Many thanks!

  • How do I use notfications

    Unsolved Troubleshooting
    18
    0 Votes
    18 Posts
    2k Views
    A

    @sdetweil ah ok will do then haha cheers

  • Code a MagicMirror by myself?

    General Discussion
    3
    0 Votes
    3 Posts
    714 Views
    O

    @sdetweil Thanks for your answer! I will look behind the documents and try my best to get something going. ;)

  • 0 Votes
    28 Posts
    5k Views
    S

    @sdetweil
    I don´t know what i have done other than bevore, but i insert the command lines bevor another module, now it starts without errors

  • 1 Votes
    8 Posts
    1k Views
    R

    this is impressive … getting started is one thing, finding this forum is a second … the most impressive (to me) is the community help you got.

    BTW … pictures would be good :) What size / type of screen did you use?

  • MMM-Assistantmk2 & MMM-Webradio

    Utilities
    4
    0 Votes
    4 Posts
    1k Views
    L

    :::

    Spoiler Text

    :::

    @Sean

    Yes I use this module well: https://github.com/MunichStef/MMM_Webradio

    I made my code in the config.js as below. The assistantmk2 detects my sentence, it pauses, but nothing happens.

    /* Magic Mirror Config Sample * * By Michael Teeuw http://michaelteeuw.nl * MIT Licensed. * * For more information how you can configurate this file * See https://github.com/MichMich/MagicMirror#configuration * */ var config = { address: "localhost", // Address to listen on, can be: // - "localhost", "127.0.0.1", "::1" to listen on loopback interface // - another specific IPv4/6 to listen on a specific interface // - "", "0.0.0.0", "::" to listen on any interface // Default, when address config is left out, is "localhost" port: 8080, ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], // Set [] to allow all IP addresses // or add a specific IPv4 of 192.168.1.5 : // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"], // or IPv4 range of 192.168.3.0 --> 192.168.3.15 use CIDR format : // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"], language: "fr", timeFormat: 24, units: "metric", modules: [ { module: "compliments", position: "lower_third", config: { compliments: { anytime: [ "Bonjour", "comment vas-tu?" ], morning: [ "Bien dormi?", "Bonne journée!", "Bonjour!" ], evening: [ "Bonne soirée!", "Repose toi bien!", "Bonne nuit..." ] } } }, { module: "MMM_Webradio", header: "Webradio", position: "bottom_right", config: { startindex: 1, initialVolume: 50, streams: [ { text: "radio NRJ", url: "http://185.52.127.163/fr/30001/mp3_128.mp3?origine=fluxradios" }] } }, { module: "clock", position: "top_left", // This can be any of the regions. config: { displayType: "analog", secondsColor: "#ff0000"// The config property is optional. // See 'Configuration options' for more information. } }, { module: "MMM-LocalTemperature", position: "top_right", // Only add a position if you want this module to display the data header: "temperature de la piece", config: { sensorPin: 16, sendTemperature: "true", sendHumidity: "true", showTemperature: "true", showHumidity: "true", iconView: "true", updateInterval: 0.5, } }, { module: 'MMM-Screencast', position: 'bottom_right', // This position is for a hidden <div /> and not the screencast window config: { position: 'bottomRight', height: 300, width: 500, } }, { module: "MMM-DarkSkyForecast", header: "Weather", position: "top_right", classes: "default everyone", disabled: false, config: { apikey: ", latitude: "", longitude: ", iconset: "4c", concise: false, language: "fr", label_timeFormat: "k[h]", label_days: ["Dim", "Lun", "Mar", "Mer", "Jeu", "Ven", "Sam"], forecastLayout: "table" } }, { module: "MMM-Hotword", config: { chimeOnFinish: null, mic: { recordProgram: "arecord", device: "plughw:1" }, models: [ { hotwords: "computer", file: "computer.umdl", sensitivity: "0.5", }, ], commands: { "computer": { notificationExec: { notification: "ASSISTANT_ACTIVATE", payload: (detected, afterRecord) => { return {profile:"default"} } }, restart:false, afterRecordLimit:0 } } } }, { module: "MMM-AssistantMk2", position: "top_right", config: { deviceLocation: { coordinates: { // set the latitude and longitude of the device to get localized information like weather or time. (ref. mygeoposition.com) latitude: longitude: }, }, record: { recordProgram : "arecord", device : "plughw:1", }, transcriptionHook: { "START_RADIO" : { pattern : "play radio", command: "RADIO_ONOFF" }, "STOP_RADIO" : { pattern : "stop radio", command: "RADIO_ONOFF" }, }, command: { "START_RADIO": { notificationExec: { notification: "WEBRADIO_ONOFF", } }, "STOP_RADIO": { notificationExec: { notification: "WEBRADIO_ONOFF" } }, "SHOW_ALL_MODULES": { pattern: "show all", command: "SHOWMODULES" }, "SCREEN_ON": { pattern: "allume l'écran", command: "SCREENON" }, "SCREEN_OFF": { pattern: "éteins l'écran", command: "SCREENOFF" }, "REBOOT": { pattern: "redémarre", command: "REBOOT" }, "SHUTDOWN": { pattern: "éteins le miroir", command: "SHUTDOWN" } }, notifications: { ASSISTANT_ACTIVATED: "HOTWORD_PAUSE", ASSISTANT_DEACTIVATED: "HOTWORD_RESUME", SAY_TEXT: "ASSISTANT_SAY", DEFAULT_HOOK_NOTIFICATION: "ASSISTANT_HOOK", WEBRADIO_ONOFF: "WEBRADIO_ONOFF", }, screenDuration: 3000, pauseOnYoutube: false, youtubePlayQuality: "small", useWelcomeMessage: "", profiles: { "default" : { lang: "fr-FR" } }, } }, ] }; /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") {module.exports = config;}

    Do I have to create a recipe.js in the folder
    MMM-AssistantMk2 / recipes?

  • 0 Votes
    2 Posts
    765 Views
    brobergB

    @D34n08713 then you probably have a broken config file.

    pleas post your config file, it’s probably too many or too few brackets somewhere.

  • Need help for building magic mirror from scratch

    General Discussion
    6
    0 Votes
    6 Posts
    2k Views
    spitzlbergerjS

    @HayyatAli
    I’ve already built four or five magic mirrors now. I always proceed the same way:

    Buying the Raspberry Pi, as @nischi has already posted Buy a monitor the size you want to install later.
    Please make sure that you get a monitor that switches to sleep mode without a signal on HDMI and does not switch to a completely green or blue screen for minutes before :-) Installation of Raspian Installing Magic Mirror
    (just follow the hint from @nischi here) Installation of additional components such as motion detectors or a button to reboot the Raspberry then run the whole thing without wooden frame and mirror for a few days/weeks to detect bugs, try modules, detect incompatibilities, etc. Construction of a frame from e.g. wood
    Then take measurements for the mirror glass. Purchase of a spy mirror Assembly of components

    Here you can find a building instruction for my big mirror in the bathroom. I mounted an aluminium plate behind the spy mirror, which gives the whole thing stability, holds the monitor elegantly and ensures that no light falls through the spy mirror from behind.

    Greetings
    Sepp

  • Magic Mirror Alexa

    General Discussion
    6
    0 Votes
    6 Posts
    2k Views
    S

    @sunnykeerthi MMM-Alexa

  • 0 Votes
    5 Posts
    1k Views
    S

    actually this is because you have fired a timer on the slide update

    showSlides2: function () { if (!this.slideIndex) { this.slideIndex = 0; } var i; var slides = document.getElementsByClassName("mySlides"); for (i = 0; i < slides.length; i++) { console.log(slides[i]); slides[i].style.display = "none"; } this.slideIndex++; slides[this.slideIndex - 1].style.display = "block"; if (this.slideIndex > (slides.length - 1)) { this.slideIndex = 0 } setInterval(this.showSlides2, 2000); //< ------- here restarts the function, BUT inside the function 'this'; becomes the context of the timer routine and not the module.. this.updateDom(1000); // or whatever transition time u want. },

    to fix it you need an arrow function to keep context right

    see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions

    but net

    showSlides2: function () { if (!this.slideIndex) { this.slideIndex = 0; } var i; var slides = document.getElementsByClassName("mySlides"); for (i = 0; i < slides.length; i++) { console.log(slides[i]); slides[i].style.display = "none"; } this.slideIndex++; slides[this.slideIndex - 1].style.display = "block"; if (this.slideIndex > (slides.length - 1)) { this.slideIndex = 0 } setInterval( () => { this.showSlides2()} , 2000); // < --- was a typo here.. need () => { stuff } this.updateDom(1000); // or whatever transition time u want. },
  • 0 Votes
    1 Posts
    721 Views
    A

    Hey guys,

    since a few days i try to change the size of my shown Instagram-Account.

    So, at first i have changed the instaMaxWidht and -Height in config.js. If i set the values absolute from 300px to 100px it get smaller but if i set the values >300px nothing happens.

    Next step was, to change the values in the json-file in the module folder. I set it to 1200x1200px but nothing happens too.

    Have anyone some ideas how i can manage my problem or now, if its limited because of some reasons?

    Lot of thanks ahead…

  • Music Player Module

    Development
    3
    0 Votes
    3 Posts
    2k Views
    N

    @maukoell said in Music Player Module:

    Hello,
    I am trying to create a module which plays music from a directory. I wanted to use two buttons to control it. One for Pause/Play and one to skip the current song. But unfortunately when I start the MM2 I always get the message that it is not able to find the helper for my module. I’m new to node.js so maybe there are just some basic mistakes.

    My module:

    Module.register("MMM-MusicPlayer",{ defaults: { playButtonPIN: 10, nextButtonPIN: 12, clickDelay: 500, musicPath = "/home/pi/MagicMirror/modules/MMM-MusicPlayer/music", }, start: function() { this.sendSocketNotification("BUTTON_CONFIG", this.config); Log.info('Starting module: ' + this.name); } });

    My node_helper:

    "use strict"; const NodeHelper = require("node_helper"); const gpio = require("onoff"); var path = require('path'); var fs = require('fs'); const { Howl, Howler } = require('howler'); var sound; var musicList = []; var index = 0; var started; var config; module.exports = NodeHelper.create({ start: function () { started = false; }, // Subclass socketNotificationReceived received. socketNotificationReceived: function (notification, payload) { const self = this; if (notification === 'BUTTON_CONFIG' && started === false) { config = payload; self.fromDir(config.musicPath, "mp3"); self.createSound(); var GPIO = require('onoff').Gpio; var button1 = new GPIO(config.playButtonPIN, 'in', 'both', { persistentWatch: true, debounceTimeout: config.clickDelay }); button1.watch(function (err, state) { // 1 == pressed, 0 == not pressed if (state === 1) { if (sound.playing()) { sound.pause(); } else { sound.play(); } } }); var button2 = new GPIO(config.playButtonPIN, 'in', 'both', { persistentWatch: true, debounceTimeout: config.clickDelay }); button2.watch(function (err, state) { // 1 == pressed, 0 == not pressed if (state === 1) { self.playNext(); } }); started = true; } }, fromDir: function(startPath, filter) { if (!fs.existsSync(startPath)) { Log.info("no dir ", startPath); return; } var files = fs.readdirSync(startPath); var i; var fullPath; var filename; var stat; for (i = 0; i < files.length; i+=1) { fullPath = path.join(startPath, files[i]); filename = files[i]; stat = fs.lstatSync(fullPath); if (stat.isFile()) { if (filename.indexOf(filter) >= 0) { musicList.push(fullPath); } } } }, playNext: function() { if (sound.playing()) { sound.stop(); } index += 1; if (index === musicList.length()) { index = 0; } sound.play(index); }, createSound: function() { sound = new Howl({ src: musicList }); } } );

    Maybe someone can help me.
    Thanks in advance

    I don’t think that your code respects helpers as described in official documentarion,
    Or we are not talking about the same helpers Pnr Status.TextNow

  • MMM-Hover module Error

    Bug Hunt
    1
    0 Votes
    1 Posts
    1k Views
    R

    I have tried to run the MMM-Hover module with the mirror, but it’s giving an error which seems odd.

    ERROR! Could not validate main module js file.
    /home/pi/MagicMirror/modules/MMM-Hover/MMM-Hover.js:
    i2cBus: 0,
    ^^^^^^

  • 0 Votes
    4 Posts
    5k Views
    S

    Create a branch on top of the master one.
    When an update is available, go back to the master, do the pull.
    Then rebase your branch onto master.

  • ERROR IN STARTING MAGIC MIRROR IN PI ZERO

    Troubleshooting
    2
    0 Votes
    2 Posts
    2k Views
    bheplerB

    A couple things. First, please use the markdown features of the forum to make your code easier to read. There’s a nice tutorial on Git.

    Secondly, you need to run the npm install command in the Magic Mirror folder. So try this:

    cd ~/MagicMirror npm install
  • 0 Votes
    1 Posts
    1k Views
    M

    Hey everyone,

    I just came across this awesome project. So many cool modules and some top quality builds from looking at the showcases. I’m so impressed by it all and desperate to find the time to build my own smart mirror.

    In the meantime, I’d love to get your thoughts on something I’ve already built, which I think should be a perfect use case for a smart mirror:
    A voice activated AI personal stylist…

    The service is called Able Style and can be found at https://able.style. It is also available on Alexa (“Alexa, enable Able Style”) and Google Assistant (“Ok Google, talk to Able Style”).

    Using the service you can ask, “what shall i wear today?” and it’ll give you outfit suggestions based on your local weather forecast and the items in your wardrobe. It’s easy to tell Able which items you have in your wardrobe by either voice or on the website. You can also upload your own outfits via the website.

    What I’m wondering is, given there are Alexa and Google Assistant modules already built, is it possible to use Able Style via those services? And if so, do you also get the images shown?

    If the answer is no to either of those questions then I guess it’ll need its own module. Tbh, I’d like to build a standalone module for it anyway but it’s less pressing if it’s already fully available via Alexa or GA.

    Would be great to know your thoughts and/or requests as the smart mirror experts that you are! :)

    Thanks,
    Martin

  • 0 Votes
    6 Posts
    3k Views
    J

    Wow what a great forum!!
    thanks for the help… really is appreciated :)
    Will try now