A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.
  • How to pass extra variable to a Https Get Request

    1
    0 Votes
    1 Posts
    850 Views
    P

    Hello everyone,

    I’m pretty new to NodeJS, but I’m working on a module for the Home automation JEEDOM.
    I’m stuck at being able to do a simple GET and having the context during async GET response in order to know from where my request came from

    var req = https.get("https://JEEDOMURL/core/api/jeeApi.php?apikey=...&type=cmd&id=127"); req.idx = "127"; req.on("response", function(res){ res.on('data', (d) => { console.log("DEBUG : " + req.idx +" / "+ typeof (d)); console.log("DEBUG : " + req.idx +" / "+ d); }) }); var req = https.get("https://JEEDOMURL/core/api/jeeApi.php?apikey=...&type=cmd&id=695"); req.idx = "695"; req.on("response", function(res){ res.on('data', (d) => { console.log("DEBUG : " + req.idx +" / "+ typeof (d)); console.log("DEBUG : " + req.idx +" / "+ d); }) });

    With no surprise I’m getting
    DEBUG : 695 / object
    DEBUG : 695 / 5515
    DEBUG : 695 / object
    DEBUG : 695 / 19.8

    instead of getting
    DEBUG : 695 / object
    DEBUG : 127 / 5515
    DEBUG : 695 / object
    DEBUG : 695 / 19.8

    I know that is expected by JS async guru, but How can I explicitly pass a variable and getting my http get DATA synchronize.

    I’ve read a lot of module code, and unfortunately for me JEEDOM is not giving me any context information in the GET answer
    https://JEEDOMURL/core/api/jeeApi.php?apikey=...&type=cmd&id=127" is only responding 5515
    and https://JEEDOMURL/core/api/jeeApi.php?apikey=...&type=cmd&id=695" is responding 19.8

    Any help would be appreciate ?

    Thanks in advance for your time.
    I’m really stuck, and I don’t want to parse the URL to get back my ID.

  • C# Module Ideas for project

    1
    0 Votes
    1 Posts
    1k Views
    S

    I am making a mirror to showcase for a class project. Part of the requirements are that I actually develop something, specifically in C#. I know I can use C# through the Mono framework but past that, I’m not sure what to do. I’ve thought about creating a module for BlackBoard. Any ideas on what I could work on?

  • Including socketNotificationReceived in getDom function

    8
    0 Votes
    8 Posts
    3k Views
    ?

    @yours.mukul
    I think it is not good to put the noti into start() of node_helper.js.
    Because after finishing module loaded and DOM created, updateDOM() would be working properly, but your code tried too early.
    As you’ve said, you had your code in node_helper.js to get REAL latitude & longitude, isn’t it? My code was just an example. Send your REAL lat & lng to main module when your node_helper code gathers real target values.

  • How can I see the HTML that being generated?

    11
    0 Votes
    11 Posts
    5k Views
    Mykle1M

    @Zooooooom said in How can I see the HTML that being generated?:

    Thanks! I was missing the address from config.

    You’re welcome mate

  • Need help for testing modules

    14
    0 Votes
    14 Posts
    6k Views
    ?

    @Txukie as i know google assistant doesn’t support spanish yet(at least, in current grpc api). In configuration, spanish is available in ‘recognition on command mode’ and ‘speech response of command mode’, not ‘google assistant mode’.

  • Communication from node helper to module: Taking too long

    7
    0 Votes
    7 Posts
    2k Views
    S

    I am calling :

    Node_helper:

    self.sendSocketNotification(‘SONUS’, sonus);

    Module:

    socketNotificationReceived: function (notification, payload) {
    receivedNotification(this,notification,payload);
    }

    It is taking seven seconds from Node helper to Module

  • MMM-Alexa

    4
    0 Votes
    4 Posts
    4k Views
    G

    @bartalluyn Sorry for kicking this old topic but I couldn’t find on your blog how to configure Alexa and MM. Can you provide more information?

  • Better way to use HTML in module development

    3
    0 Votes
    3 Posts
    2k Views
    E

    Thanks buddy,

    That looks nice, any idea when it’s coming out in release ?

  • How to detect SBC model?

    13
    0 Votes
    13 Posts
    4k Views
    ?

    @edubey Yes. 99% works. The performance is better than rpi.

  • [Help Needed: Core Module] Developing a new default weather module.

    5
    0 Votes
    5 Posts
    3k Views
    tbbearT

    have a look at MMM-NOAA i think this is the most interesting weather app of all!!!

  • Better speech recognition engine?

    6
    2 Votes
    6 Posts
    3k Views
    lavolp3L

    Now you have my full attention! :-)
    Sounds exciting! Good luck with development!

    Do you now jasper?
    “Jasper is an open source platform for developing always-on, voice-controlled applications”
    https://jasperproject.github.io/
    Maybe worth a look?

    E.g.:
    “Julius is a high-performance open source speech recognition engine. It does not need an active internet connection. Please note that you will need to train your own acoustic model, which is a very complex task that we do not provide support for. Regular users are most likely better suited with one of the other STT engines listed here.”
    (from the documentation)

  • UpdateDom not working

    22
    0 Votes
    22 Posts
    9k Views
    S

    @j-e-f-f It is kind of working now… I will test it thoroughly for two days and will revert in case of any issue

    @j-e-f-f @Sean thank a lot for your prompt replies and efforts

  • Cannot create complex Json structure in module

    1
    0 Votes
    1 Posts
    859 Views
    S

    I am trying to create complex json object in module

    const commands = { 'hello': function () { console.log('You will obey'); }, '(give me) :flavor ice cream': function (flavor) { console.log('Fetching some ' + flavor + ' ice ceam for you sr') }, 'turn (the)(lights) :state (the)(lights)': function (state) { console.log('Turning the lights', (state == 'on') ? state : 'off') } }

    But commands are turning out be some other objects than the correct JSON message to be passed in following method

    annyang.addCommands(commands);

    But same is happening correctly in node_helper

  • Pass module object to node helper

    3
    0 Votes
    3 Posts
    2k Views
    S

    I don’t want to pass config but the complete module object (this). Which is not working?
    How to do that?

  • Interacting With MM Modules with external script

    1
    0 Votes
    1 Posts
    863 Views
    Y

    I have a voice controlled personal assistant running on python on my raspberry pi. I need to control the Magic Mirror with my voice assistant. I know there are voice modules available with Magic Mirror but what if I want to integrate MM with my external voice assistant? How to interact MM with external running script ?

  • Stock Module Problem

    6
    0 Votes
    6 Posts
    3k Views
    W

    @yours.mukul

    Hi. Maybe this is helpfully for you:

    https://stackoverflow.com/questions/46070126/google-finance-json-stock-quote-stopped-working

    On this thread they also provide the yahoo finance service for a work around.
    On the end a user wrote:

    "The following works

    https://finance.google.com/finance?q=TICKER&output=json

    And returns a json with lots of information for you to parse."

    I hope this information was helpful for you.

    Greetings

  • Are modules sandboxed from each other?

    3
    0 Votes
    3 Posts
    1k Views
    ?

    @ovg
    Even you can execute other module’s member function.
    All modules are combined and executed together in front browser layer, thats why error of one module stops whole system.

  • Push Notification

    6
    0 Votes
    6 Posts
    3k Views
    J

    @yours.mukul As in email alerts, text messages, etc? I don’t know of a particular module that does this, but it’s possible that you might be able to kludge something together using IFTTT (https://ifttt.com/), and by writing a module to receive notifications from that. I know it’s not a complete solution, but it gets you at least halfway there, and given the number of different ways that IFTTT can be used, it might even give you more flexibility than you were expecting.

    EDIT There is an IFTTT module. Try this:
    https://forum.magicmirror.builders/topic/673/mmm-ifttt-if-this-then-that-maker-notifications

  • Displaying current AND today's high temp in MMM-Wunderground

    1
    0 Votes
    1 Posts
    841 Views
    A

    I just resurrected an old MM, and my wife is wondering if I can change the display to show both the current temp and today’s predicted high (ie 60F/80F) as large as possible.
    I can copy and paste, and if I think hard enough, probably modify files.

    Thanks,

  • Hiding temp from the default currentweather.js module

    6
    0 Votes
    6 Posts
    3k Views
    Mykle1M

    @rcollie said in Hiding temp from the default currentweather.js module:

    You’re a legend

    In my own mind. :^')