Navigation

    MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord
    MagicMirror² v2.15.0 is available! For more information about this release, check out this topic.

    MMM-Mqtt pub and sub at the same time

    Troubleshooting
    2
    6
    1990
    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.
    • axellejamous
      axellejamous last edited by

      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?

      Mykle1 1 Reply Last reply Reply Quote 0
      • Mykle1
        Mykle1 Project Sponsor Module Developer @axellejamous last edited by

        @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. 🙂

        axellejamous 1 Reply Last reply Reply Quote 1
        • axellejamous
          axellejamous @Mykle1 last edited by

          @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 🙂

          Mykle1 1 Reply Last reply Reply Quote 1
          • Mykle1
            Mykle1 Project Sponsor Module Developer @axellejamous last edited by

            @axellejamous

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

            Peace!

            axellejamous 1 Reply Last reply Reply Quote 1
            • axellejamous
              axellejamous @Mykle1 last edited by

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

              Mykle1 1 Reply Last reply Reply Quote 1
              • Mykle1
                Mykle1 Project Sponsor Module Developer @axellejamous last edited by

                @axellejamous

                You’re welcome, mate. Glad it worked out for you. 🙂

                1 Reply Last reply Reply Quote 1
                • 1 / 1
                • First post
                  Last post
                Enjoying MagicMirror? Please consider a donation!
                MagicMirror created by Michael Teeuw.
                Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
                This forum is using NodeBB as its core | Contributors
                Contact | Privacy Policy