• 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.

MMM-Mqtt pub and sub at the same time

Scheduled Pinned Locked Moved Troubleshooting
6 Posts 2 Posters 2.7k Views 2 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.
  • A Offline
    axellejamous
    last edited by Jan 11, 2018, 12:14 AM

    Hello,

    I was wondering if any of you know how to actually subscribe and publish to a topic using this module? I currently tried adding two different instances of the module to the config file and have one set as sending and one as receiving but that just causes the module to crash and go offline.
    Has anyone figured out how to do both of these at the same time?

    M 1 Reply Last reply Jan 11, 2018, 1:09 AM Reply Quote 0
    • M Offline
      Mykle1 Project Sponsor Module Developer @axellejamous
      last edited by Jan 11, 2018, 1:09 AM

      @axellejamous

      Have you tried copying the entire module folder and renaming the copy (for example) MMM-Mqtt2. Rename the important bits inside the folder and the important bits inside the MMM-Mqtt2.js file. Then your 2nd entry in the config.js to match the “new” module name. It’s worth a shot. :-)

      Create a working config
      How to add modules

      A 1 Reply Last reply Jan 11, 2018, 2:30 AM Reply Quote 1
      • A Offline
        axellejamous @Mykle1
        last edited by Jan 11, 2018, 2:30 AM

        @Mykle1 this was indeed the alternative solution I had in mind! I managed to get it to work now, but it looks a bit iffy since both instances of the module will receive the incoming data and so it will be displayed on the screen twice (which doesn’t seem to happen with outgoing data). I’m going to try see if I can manage to display it only on one of them and otherwise I’ll revert to the alternative you suggested! Thank you :)

        M 1 Reply Last reply Jan 11, 2018, 3:31 AM Reply Quote 1
        • M Offline
          Mykle1 Project Sponsor Module Developer @axellejamous
          last edited by Jan 11, 2018, 3:31 AM

          @axellejamous

          Cool. Good luck. Let me know how you make out.

          Peace!

          Create a working config
          How to add modules

          A 1 Reply Last reply Jan 15, 2018, 5:51 PM Reply Quote 1
          • A Offline
            axellejamous @Mykle1
            last edited by Jan 15, 2018, 5:51 PM

            @Mykle1 I ended up copying and renaming the entire module! Worked way better than my silly workaround. Thank you! :)

            M 1 Reply Last reply Jan 15, 2018, 10:38 PM Reply Quote 1
            • M Offline
              Mykle1 Project Sponsor Module Developer @axellejamous
              last edited by Jan 15, 2018, 10:38 PM

              @axellejamous

              You’re welcome, mate. Glad it worked out for you. :-)

              Create a working config
              How to add modules

              1 Reply Last reply Reply Quote 1
              • 1 / 1
              1 / 1
              • First post
                1/6
                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