Read the statement by Michael Teeuw here.
Need help with MMM-MQTTbridge not "communicating" with MMM-RTSPStream
-
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.
-
@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 -
@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. -
@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
-
@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] [31m[ERROR][39m [31mThis module configuration contains errors:[39m [31m{[39m [31m "module": "MMM-RTSPStream",[39m [31m "classes": "page1",[39m [31m "position": "middle_center1",[39m [31m "disabled": false,[39m [31m "config": {[39m [31m "autoStart": false,[39m [31m "rotateStreams": true,[39m [31m "rotateStreamTimeout": 10,[39m [31m "moduleWidth": 500,[39m [31m "moduleHeight": 281,[39m [31m "localPlayer": "vlc",[39m [31m "moduleOffset": {[39m [31m "left": -170,[39m [31m "top": -125[39m [31m },[39m [31m "remotePlayer": "ffmpeg",[39m [31m "showSnapWhenPaused": false,[39m [31m "remoteSnaps": false,[39m [31m "shutdownDelay": 12,[39m [31m "stream1": {[39m [31m "name": "Videocitofono",[39m [31m "url": "rtsp://username:password@doorbellip/cam/realmonitor?channel=1&subtype=1#backchannel=0",[39m [31m "frameRate": "undefined",[39m [31m "width": 500,[39m [31m "height": 281,[39m [31m "muted": true,[39m [31m "ffmpegPort": 9999[39m [31m }[39m [31m }[39m [31m}[39m [31mposition: must be equal to one of the allowed values[39m [31m[39m [31m "fullscreen_below",[39m [31m "top_bar",[39m [31m "top_left",[39m [31m "top_center",[39m [31m "top_right",[39m [31m "upper_third",[39m [31m "middle_center",[39m [31m "lower_third",[39m [31m "bottom_bar",[39m [31m "bottom_left",[39m [31m "bottom_center",[39m [31m "bottom_right",[39m [31m "fullscreen_above"[39m [31m[39m [2025-04-23 14:41:01.109] [33m[WARN] [39m [33mInvalid module position found for this configuration:[39m [33m{[39m [33m "module": "MMM-RTSPStream",[39m [33m "classes": "page1",[39m [33m "position": "middle_center1",[39m [33m "disabled": false,[39m [33m "config": {[39m [33m "autoStart": false,[39m [33m "rotateStreams": true,[39m [33m "rotateStreamTimeout": 10,[39m [33m "moduleWidth": 500,[39m [33m "moduleHeight": 281,[39m [33m "localPlayer": "vlc",[39m [33m "moduleOffset": {[39m [33m "left": -170,[39m [33m "top": -125[39m [33m },[39m [33m "remotePlayer": "ffmpeg",[39m [33m "showSnapWhenPaused": false,[39m [33m "remoteSnaps": false,[39m [33m "shutdownDelay": 12,[39m [33m "stream1": {[39m [33m "name": "Videocitofono",[39m [33m "url": "rtsp://username:password@doorbellip/cam/realmonitor?channel=1&subtype=1#backchannel=0",[39m [33m "frameRate": "undefined",[39m [33m "width": 500,[39m [33m "height": 281,[39m [33m "muted": true,[39m [33m "ffmpegPort": 9999[39m [33m }[39m [33m }[39m [33m}[39m
-
@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 atnpm 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.
-
@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 startstill no activity from the button
two things- the event is not triggering to mqtt
- the action in mqttbridge is not what you expected
i dont know how to debug either one
-
@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.
-
@Cr4z33 looking further at mqttbridge it also logs receipt of the notification from the subscription
so that tells me it did not receive info from mqtt
-
@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)?