• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Pass module object to node helper

Scheduled Pinned Locked Moved Development
3 Posts 2 Posters 1.8k Views 1 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    sharmmoh1983
    last edited by Sep 12, 2017, 1:03 AM

    Hi
    I am trying to pass module instance to node helper but in that scenario, no communication happens and node helper received notifications never gets triggered

    Module:
    this.sendSocketNotification(“CONFIG”, this);

    Node helper:

    socketNotificationReceived: function(notification, moduleInstance) {
    if (notification === “CONFIG”) {
    this.activateSonus(moduleInstance)
    console.log(“Working notification system. Notification:”, notification, "payload: ", payload);
    }
    },

    C 1 Reply Last reply Sep 12, 2017, 1:07 AM Reply Quote 0
    • C Offline
      cowboysdude Module Developer @sharmmoh1983
      last edited by Sep 12, 2017, 1:07 AM

      @sharmmoh1983

      this.sendSocketNotification(“CONFIG”, this.config);

      1 Reply Last reply Reply Quote 0
      • S Offline
        sharmmoh1983
        last edited by Sep 12, 2017, 1:42 AM

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

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        1 / 1
        • First post
          1/3
          Last post
        Enjoying MagicMirror? Please consider a donation!
        MagicMirror created by Michael Teeuw.
        Forum managed by Sam, technical setup by Karsten.
        This forum is using NodeBB as its core | Contributors
        Contact | Privacy Policy