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.

    Need help with MMM-MQTTbridge not "communicating" with MMM-RTSPStream

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    68 Posts 5 Posters 10.7k Views 4 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.
    • Cr4z33C Offline
      Cr4z33
      last edited by Cr4z33

      So long story short what I want to achieve is to show my video doorbell live feed for 15 seconds on my smart mirror whenever someone presses its button.

      Therefore I want to use MMM-MQTTbridge to detect the doorbell MQTT line with code

      2025-04-16 11:40:58,897 INFO __main__ Publishing MQTT message DahuaVTO/Invite/Event: {'Action': 'Pulse', 'Code': 'Invite', 'Data': {'CallID': '3', 'IsEncryptedStream': False, 'LocaleTime': '2025-04-16 11:40:58', 'LockNum': 2, 'RealUTC': 1744796458, 'SupportPaas': False, 'TCPPort': 37777, 'UTC': 1744800058.0, 'UserID': '101'}, 'Index': 0, 'deviceType': 'DHI-VTO3311Q-WP', 'serialNumber': '*******'}
      

      and send the RTSP-PLAY command to MMM-RTSPStream to play its video feed.

      This is the MMM-MQTTbridge config.js section:

      	{
      		module: 'MMM-MQTTbridge',
      		disabled: false,
      		config: {
      			mqttServer: "mqtt://:@ipaddress:port",
      			mqttConfig:
      			{
      				listenMqtt: true,
      				interval: 500,
      			},
      			notiConfig:
      			{
      				listenNoti: true,
      				ignoreNotiId: ["CLOCK_MINUTE", "NEWS_FEED"],
      				ignoreNotiSender: ["system", "NEWS_FEED"],
      			},
      			// set "NOTIFICATIONS -> MQTT" dictionary at /dict/notiDictionary.js
      			// set "MQTT -> NOTIFICATIONS" dictionary at /dict/mqttDictionary.js
      			},
      	}
      

      This is the MMM-RTSPStream config.js section:

      {
      
      module: "MMM-RTSPStream",
      
      position: "middle_center",
      
      disabled: true,
      
      config: {
      autoStart: false,
      rotateStreams: true,
      rotateStreamTimeout: 10,
      moduleWidth: 500,
      moduleHeight: 281,
      localPlayer: 'vlc',
      moduleOffset: { left: -170, top: -125 },
      remotePlayer: 'ffmpeg',
      showSnapWhenPaused: false,
      remoteSnaps: false,
      shutdownDelay: 12,
      stream1: {
      name: 'Videocitofono',
      url: 'rtsp://username:password@doorbellip/cam/realmonitor?channel=1&subtype=1#backchannel=0',
      frameRate: 'undefined',
      width: 500,
      height: 281,
      muted: true,
      ffmpegPort: 9999,
      },
      }
      }
      

      And finally this is the content of mqttDictionary.js:

      var mqttHook = [
        {
          mqttTopic: "zigbee2mqtt/BTicino F20T60A",
          mqttPayload: [
            {
              payloadValue: "",
              mqttNotiCmd: ["POWERMETER"],
              mqttPayload: ""
            },
          ],
        },
        {
            mqttTopic: "DahuaVTO/Invite/Event",
            mqttPayload: [
              {
                 jsonpath: "Action", 
                 conditions: [
                             {
                               type: "eq",
                               value: "Pulse"
                             },
                           ],
                mqttNotiCmd: ["videocitofono"]
              },
            ],
          },
      ];
      
      var mqttNotiCommands = [
        {
          commandId: "POWERMETER",
          notiID: "POWERMETER_VALUES",
        },
        {
            commandId: "videocitofono",
            notiID: "RTSP-PLAY",
            notiPayload: "stream1" 
          },
      ];
      
      module.exports = { mqttHook,  mqttNotiCommands};
      

      Looking at MM and PM2 logs there’s neither a single trace of that MQTT line being detected nor the feed being playbacked.

      Perhaps someone of you skilled people can please help me? 🥺

      The author of MMM-MQTTbridge is busy at work and therefore cannot help.

      S mumblebajM 2 Replies Last reply Reply Quote 0
      • S Offline
        sdetweil @Cr4z33
        last edited by

        @Cr4z33 if you set

        debug:true

        in the MMM-MqttBridge config in config.js

        it will output messages at npm start

        i always recommend not using pm2 while testing
        as you can see the messages from npm start easily

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • mumblebajM Offline
          mumblebaj Module Developer @Cr4z33
          last edited by

          @Cr4z33 said in Need help with MMM-MQTTbridge not "communicating" with MMM-RTSPStream:

          MMM-RTSPStream

          The position is incorrect. There is no middle\_center position.

          Check out my modules at: https://github.com/mumblebaj?tab=repositories
          Check my blog-post: https://mumblebaj.xyz/

          S 2 Replies Last reply Reply Quote 1
          • S Offline
            sdetweil @mumblebaj
            last edited by

            @mumblebaj AND with release 2.30 or higher a message will be sent to the stderr stream that this module will not be loaded

            good catch

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 1
            • S Offline
              sdetweil @mumblebaj
              last edited by

              @mumblebaj WELL… it turns out this is a false warning as _ is treated as _ in js…

              I changed the position middle_center1 and got

              41:01.108] [ERROR] This module configuration contains errors:
              {
                "module": "MMM-RTSPStream",
                "classes": "page1",
                "position": "middle_center1",
                "disabled": false,
                "config": {
                  "autoStart": false,
                  "rotateStreams": true,
                  "rotateStreamTimeout": 10,
                  "moduleWidth": 500,
                  "moduleHeight": 281,
                  "localPlayer": "vlc",
                  "moduleOffset": {
                    "left": -170,
                    "top": -125
                  },
                  "remotePlayer": "ffmpeg",
                  "showSnapWhenPaused": false,
                  "remoteSnaps": false,
                  "shutdownDelay": 12,
                  "stream1": {
                    "name": "Videocitofono",
                    "url": "rtsp://username:password@doorbellip/cam/realmonitor?channel=1&subtype=1#backchannel=0",
                    "frameRate": "undefined",
                    "width": 500,
                    "height": 281,
                    "muted": true,
                    "ffmpegPort": 9999
                  }
                }
              }
              position: must be equal to one of the allowed values
              
                "fullscreen_below",
                "top_bar",
                "top_left",
                "top_center",
                "top_right",
                "upper_third",
                "middle_center",
                "lower_third",
                "bottom_bar",
                "bottom_left",
                "bottom_center",
                "bottom_right",
                "fullscreen_above"
               
              [2025-04-23 14:41:01.109] [WARN]  Invalid module position found for this configuration:
              {
                "module": "MMM-RTSPStream",
                "classes": "page1",
                "position": "middle_center1",
                "disabled": false,
                "config": {
                  "autoStart": false,
                  "rotateStreams": true,
                  "rotateStreamTimeout": 10,
                  "moduleWidth": 500,
                  "moduleHeight": 281,
                  "localPlayer": "vlc",
                  "moduleOffset": {
                    "left": -170,
                    "top": -125
                  },
                  "remotePlayer": "ffmpeg",
                  "showSnapWhenPaused": false,
                  "remoteSnaps": false,
                  "shutdownDelay": 12,
                  "stream1": {
                    "name": "Videocitofono",
                    "url": "rtsp://username:password@doorbellip/cam/realmonitor?channel=1&subtype=1#backchannel=0",
                    "frameRate": "undefined",
                    "width": 500,
                    "height": 281,
                    "muted": true,
                    "ffmpegPort": 9999
                  }
                }
              } 
              

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              Cr4z33C 1 Reply Last reply Reply Quote 0
              • Cr4z33C Offline
                Cr4z33 @sdetweil
                last edited by Cr4z33

                @sdetweil sorry for being gone for so long time, but I’ve been out of town more than scheduled. 😅

                So back in topic… the typo for the MMM-RTSPStream config section was done in this forum post only.

                Where did you get all those warnings from?
                Looking at npm start output nothing like that was displayed (on my side).

                On the other hand I could see this when I launched that command with MQTTbridge log set to true:

                [29.04.2025 09:57.21.030] [LOG]   [MQTT bridge] Subscribed to the topic: DahuaVTO/Invite/Event
                

                So the module is somehow doing something, but then as I said nothing happens at button press.

                S 1 Reply Last reply Reply Quote 0
                • S Offline
                  sdetweil @Cr4z33
                  last edited by sdetweil

                  @Cr4z33 as i said the \- in the position is ok,
                  i made the position invalid by adding a 1 at the end, then the bad position output is shown from npm start

                  still no activity from the button
                  two things

                  1. the event is not triggering to mqtt
                  2. the action in mqttbridge is not what you expected

                  i dont know how to debug either one

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  Cr4z33C 1 Reply Last reply Reply Quote 1
                  • Cr4z33C Offline
                    Cr4z33 @sdetweil
                    last edited by

                    @sdetweil it’s OK mate and thanks for having tried to help me. :)

                    Let’s hope someone can come up with a working solution soon.

                    S 1 Reply Last reply Reply Quote 0
                    • S Offline
                      sdetweil @Cr4z33
                      last edited by sdetweil

                      @Cr4z33 looking further at mqttbridge it also logs receipt of the notification from the subscription

                      IMG_1049.png

                      so that tells me it did not receive info from mqtt

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      Cr4z33C 1 Reply Last reply Reply Quote 0
                      • Cr4z33C Offline
                        Cr4z33 @sdetweil
                        last edited by

                        @sdetweil I am not quite sure that I understood.

                        Are you saying it’s a module’s bug or is it needed further coding I should add (somewhere)?

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