A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.
  • My Setup (or: How crazy I am)

    6
    0 Votes
    6 Posts
    4k Views
    bheplerB

    I just wanted to chime in and say this post also helped me get started. Thank you for the general setup points.

    The last issue I had was that when the mirror was doing its thing and displaying content to the monitor, I couldn’t use a browser from my development machine to see the output. And SSH into the Pi wasn’t allowing me to start the mirror service. The browser and Pi just weren’t communicating.

    My solution was to run node serveronly. This allows me to hit the mirror’s ip address and for my browser to render the mirror content. A quick reboot of the mirror will pop it back into display mode.

  • Module will not render

    2
    1 Votes
    2 Posts
    2k Views
    MichMichM

    If you wan’t to perform a updateDom a.s.a.p, you could use the DOM_OBJECTS_CREATED notification:

    notificationReceived: function(notification, payload, sender) { if (notification === 'DOM_OBJECTS_CREATED') { this.updateDom(); } }

    BUT … keep in mind, the updateDom() method will be called during the dom creation. So it doesn’t make any sense to do so …

  • Added getHeader function

    1
    3 Votes
    1 Posts
    1k Views
    MichMichM

    Per request, I’ve added a getHeader() method to the module api. This allows you to modify the header of the module from within the module itself.

    Note: that this method will only be called if the user has set a default header. If not no header will be shown and you won’t be able to update it.

    Note: if you module’s users run an old version of MagicMirror (a version without this change), this method will not be called. No errors should be thrown. So it’s safe to use …

    If you want to use the user’s set header in this method, just reference the this.data.header variable.

    Example code:

    getHeader: function() { return this.data.header + ' append string'; }

    More info:

    Documentation: https://github.com/MichMich/MagicMirror/tree/develop/modules#getheader Commit: https://github.com/MichMich/MagicMirror/commit/b2a7d3584bad2752d59d2325c581f5018e875306

    Please let me know if this feature works for you …

  • Home Energy Usage on my Mirror?

    3
    0 Votes
    3 Posts
    3k Views
    yawnsY

    In addition to strawberry it looks like it is rather complicated getting access to the SiteSage API. Looking at various threads on the SiteSage support portal it requires approval from the sales guys and maybe a technical approval from your campus it department.

  • Unable to sendSocketNotification from node_helper to Module

    5
    0 Votes
    5 Posts
    3k Views
    J

    Wow that is not obvious or documented.

    However, that worked :) Thanks heaps!

  • Transit Departure module. How to get started?

    4
    0 Votes
    4 Posts
    2k Views
    B

    edit the files and in a browser, you open the URL to MM (localhost:8080 in my case) and you refresh whenever.

    BTW, you don’t have to stop it, it seems that running the command again (pm2 start mm) does a “restart”

  • setTimeout called only once in node_helper.js

    3
    0 Votes
    3 Posts
    2k Views
    B

    I’m ashamed…

    thanks!

  • This topic is deleted!

    10
    0 Votes
    10 Posts
    172 Views
  • This might be a daft question, but...

    27
    0 Votes
    27 Posts
    14k Views
    strawberry 3.141S

    @Mitchfarino feel free to contact me via personal message

  • How to use Font Awesome?

    2
    1 Votes
    2 Posts
    2k Views
    P

    Hello, i want make a own module. Sadly i don’t know how add Font Awesome to project.

    getStyles: function() { return ["font-awesome.css"]; },

    and what next?

    e.g.

    <i class="fa fa-cog"></i>
  • Parse HTML String

    7
    0 Votes
    7 Posts
    5k Views
    A

    @strawberry-3-141 You are absolutly right, I made a bad example. The real html code is a little bit more complicated, so I mixed the real code with this example.
    @ianperrin My input html is more complicated, but thanks for your answer, good to know!

    @Plati It helped me a lot to look at other modules. You should use a node_helper.js, there you can create a function which gets the html code of the website.

    //function which gets the data from the given URL getTheData: function(theURLtoCatch) { var options = {url: theURLtoCatch}; request(options, (error, response, body) => { if (response.statusCode === 200) { this.sendSocketNotification("DATA", this.parseHTML(body)); } else { console.log("Error getting Data " + response.statusCode); this.sendSocketNotification("ERROR", response.statusCode); } }); }, parseHTML: function(dataBody) { //use something like ianperrin and strawberry showed in his example }
  • Need some advise. Digital Ocean Modules

    19
    0 Votes
    19 Posts
    8k Views
    andrewchumchalA

    Thanks you so much @strawberry-3-141.

  • How to make sure dependencies get installed?

    3
    0 Votes
    3 Posts
    2k Views
    andrewchumchalA

    @strawberry-3.141 said in Hey Guys.:

    create a package.json file with npm init fill out the fields, after that type npm install --save

    Thanks for the quick reply.

  • Schedule a function in a module.

    3
    0 Votes
    3 Posts
    2k Views
    V

    @yo-less I solved in a different way that it was planned before, but just for the fill the lack of knowledge, can you share your solution?
    tks!

  • Handle dependencies

    4
    0 Votes
    4 Posts
    2k Views
    strawberry 3.141S

    @alexyak e.g. [ card : alexyak/motiondetector ] without spaces

  • How to receive push notifications from another server?

    6
    0 Votes
    6 Posts
    4k Views
    paphkoP

    @strawberry-3.141 Awesome, thank you! That’s exactly what I was looking for :-)

  • Sound cards of different Pi models

    2
    0 Votes
    2 Posts
    2k Views
    J

    @strawberry-3.141 said in Sound cards of different Pi models:

    To optimise one of my modules, I would like to ask you guys to type cat /proc/asound/cards in your console and provide the output together with your raspberry pi module and what kind of microphone you’re using
    Raspberry Pi 3 / USB Microphone

    No modules running now, Jbl Go with Bluetooth on a pi3.

    0 [ALSA ]: bcm2835 - bcm2835 ALSA bcm2835 ALSA

  • Get user input

    3
    0 Votes
    3 Posts
    2k Views
    V

    Great it worked!!! My mistake was that I was creating the app after a notification and not at the start of my module!
    Thanks a lot!

  • py/php question

    1
    0 Votes
    1 Posts
    1k Views
    cowboysdudeC

    Quick question…

    The module I’m trying to create [that I already have in php] … I know I can call it from a py script just have NO clue about py so any help here would be great!!

    Thank you!

  • Auto-disable module

    12
    0 Votes
    12 Posts
    7k Views
    yo-lessY

    @KirAsh4 - It’s amazing for me to see how helpful and how full of good advice people on this forum are. Thank your for that!

    I’ve got my module up and running now and will go through troubleshooting it. As soon as I feel that it’s working as it should, I will try to implement the feature to automatically disable it if necessary, I will study your code then as well. Thanks for pointing me in a good direction!