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

Scheduled Pinned Locked Moved Unsolved System
44 Posts 14 Posters 11.8k Views 15 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
    Serge
    last edited by Jun 21, 2020, 7:50 AM

    @chimera said in MMM-MQTTbridge:

    eg: swimming pool temperature, only updates if it changes, garden sprinkler last run, only updates when it’s run, etc

    As far as I understood you, you need to issue some NOTI during the MM/Module startup, right?
    How would be the best option to do that? One possible solution is to have a file with the list of topics (e.g. “swimmingpool/temp/status”, “gardenspirnkler/run/status”) to which MQTTbrdige will send the mqtt-messages at startup.
    Will this solve your problem with the integration of MM to your smart home?

    1 Reply Last reply Reply Quote 0
    • S Offline
      Serge @oberpiller
      last edited by Serge Jun 21, 2020, 8:13 AM Jun 21, 2020, 7:51 AM

      @oberpiller said in MMM-MQTTbridge:

      Is it possible to get variables (from “arrays”) into the mqttMsgPayload variable of NotiDictionary.js?

      nope. I will think about it.
      should it work somehow like that:
      In notiMqtt dict should be specified whether we are using variable or not and, if yes, use it:

      var notiMqttCommands = [
        {
          commandId: "Command 1",
          mqttTopic: "myhome/kitchen/light/set",
          useVariables: true, //added new setting to the dict to 
          mqttMsgPayload: ARTICLE_INFO_RESPONSE //if useVriables=true, put here the variable name. If useVariable=false or not stated - mqttMsgPayload will send "ARTICLE_INFO_RESPONSE" in its payload.
        },
      ];
      
      
      S 1 Reply Last reply Jun 21, 2020, 8:10 AM Reply Quote 0
      • S Offline
        Serge @Serge
        last edited by Jun 21, 2020, 8:10 AM

        This post is deleted!
        1 Reply Last reply Reply Quote 0
        • S Offline
          shinebright
          last edited by Aug 6, 2020, 5:35 PM

          When i publish 1 message, it’s receiving it multiple times for some reason. Do i need to be worried?
          screenshot

          S 1 Reply Last reply Aug 6, 2020, 8:54 PM Reply Quote 0
          • S Offline
            Serge @shinebright
            last edited by Aug 6, 2020, 8:54 PM

            @shinebright should produce one note per each mqtt message, check your settings once more or try to install on clean mm setup.

            S 1 Reply Last reply Aug 7, 2020, 3:44 PM Reply Quote 0
            • S Offline
              shinebright @Serge
              last edited by Aug 7, 2020, 3:44 PM

              @Serge got it thanks! i’ll give that a try. awesome module by the way, i managed to change some of your codes along with the compliments module. Now I’m sending messages from my phone to update the mirror compliments and the kids think the mirror is replying back to them. :)

              S 1 Reply Last reply Aug 7, 2020, 7:57 PM Reply Quote 1
              • S Offline
                Serge @shinebright
                last edited by Aug 7, 2020, 7:57 PM

                @shinebright what you had changed? Could you tell soi can add it as an option for the next releases

                1 Reply Last reply Reply Quote 0
                • F Offline
                  fribse
                  last edited by Aug 8, 2020, 5:54 AM

                  Hi @Serge
                  I’ve finally received the mirror itself, so now the MagicMirror is finally getting finished.
                  One of the things was to update the MM itself, as well as a few modules (screencast).
                  After doing that, I don’t see any mqtt status messages going out, and it doesn’t react on incoming either.
                  I’ve checked the username/password, still correct, and the IP hasn’t changed either?

                  S 1 Reply Last reply Aug 8, 2020, 11:50 AM Reply Quote 0
                  • S Offline
                    Serge @fribse
                    last edited by Serge Aug 8, 2020, 11:50 AM Aug 8, 2020, 11:50 AM

                    This post is deleted!
                    1 Reply Last reply Reply Quote 0
                    • S Offline
                      Serge
                      last edited by Serge Aug 8, 2020, 3:42 PM Aug 8, 2020, 3:40 PM

                      Version 1.1 released https://github.com/sergge1/MMM-MQTTbridge

                      Code updated with the help of community members.
                      Now,

                      • mqtt topics introduced into mqttDictionary. This allows now:
                        – Subscribe to that specific topic from the mqttDictionary.
                        – now you can specify different behavior for the same payload from different topics,
                        e.g. if you got the mqttPayload “20” at “kitchen/temperature” topic and at “kitchen/humiduty” topic - different Command could be executed (before module recognized only payload for all the topics subscribed);

                      • Now, if notiPayload or mqttPayload are not specified within mqttDictionary or notiDictionary, the respective payload from mqtt or noti will be sent as payload for noti or mqtt.
                        E.g. if MM receives the mqtt message at “kitchen/temperature” with payload “20”, and mqttDictionary does not have specified payload at all - the “20” will go as payload for issued Noti.

                      • All errors of several mqtt connections disappear;

                      • mqttBridgeFormatOnly - not used anymore;

                      • Changed mqttDictionary according to notiDictionary. Subscription to topic only once

                      Please do not forget to change the config section and mqttDictionary accroding to the new structure.

                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 4
                      • 5
                      • 3 / 5
                      • First post
                        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