MagicMirror² v2.14.0 is available! For more information about this release, check out this topic.

Communication between modules.

  • Hi everyone, I’m new on this, I have been working with MM for almost 2 weeks and I’m trying to understand how it works, changing some values of the scripts but I still don’t understand how to communicate modules, because I want to turn on a camera connected in the raspberry pushing a touch button on the screen, so far I have 2 modules, one for pushing buttons which is this: and this module for the camera:
    In the camera module I can take a picture saying a word like “Selfie” but instead of that, I want to take a picture by pushing a touch button.

    I found in the js script of the buttons how to trigger actions but I don’t know how to make a line to communicate to the camera or something like that.
    Is this so difficult to do? I appreciate any kind of help. Thank you.

  • @robrtoprz realy the only documented way to communicate between modules is to send notification messages

    sendNotification(“some_identifier_string”, infomation_data_specific_to_this_identifier)

    so, what message happens when voice says ‘Selfie’??? u send that same message

    What code is listening for ‘Selfie’?? is it a MagicMirror module (like MMM-Hotword)? Or a python script?

Log in to reply