Read the statement by Michael Teeuw here.
[MMM-MQTTbridge] A module to publish and receive MQTT messages
-
@wishmaster270 thank you mate!
Yeah I will add a timeout command as I don’t think it will take much to search for it. 🙂
-
@wishmaster270 sorry to bother you again.
Right now my mqtt Dictionary.js looks like this
var mqttHook = [ { mqttTopic: "zigbee2mqtt/BTicino F20T60A", mqttPayload: [ { payloadValue: "", mqttNotiCmd: ["POWERMETER"], mqttPayload: "" }, ], }, ]; var mqttNotiCommands = [ { commandId: "POWERMETER", notiID: "POWERMETER_VALUES", }, ]; module.exports = { mqttHook, mqttNotiCommands};
so how should I add the new piece of code please?
-
@Cr4z33 The two datatstructures are arrays containing objects. So you can simply append the two objects…
var mqttHook = [ { mqttTopic: "zigbee2mqtt/BTicino F20T60A", mqttPayload: [ { payloadValue: "", mqttNotiCmd: ["POWERMETER"], mqttPayload: "" }, ], }, { mqttTopic: "DahuaVTO/VideoTalkLog/Event", mqttPayload: [ { jsonpath: "Action", conditions: [ { type: "eq", value: "Pulse" }, ], mqttNotiCmd: ["doorbell"] }, ], }, ]; var mqttNotiCommands = [ { commandId: "POWERMETER", notiID: "POWERMETER_VALUES", }, { commandId: "doorbell", notiID: "RTSP-PLAY", notiPayload: "YOUR-STREAM-URL" }, ]; module.exports = { mqttHook, mqttNotiCommands};
-
@wishmaster270 thank you again!
However nothing happens in the MagicMirror frontend (although I can see the MQTT event if running MM by npm start
[23.07.2024 17:15.55.132] [LOG] [MQTT bridge] MQTT message received. Topic: DahuaVTO/VideoTalkLog/Event, message: {"Action":"Pulse","Data":{"EndState":"Missed","LocalNumber":"9901","LocaleTime":"2024-07-23 17:15:55","RealUTC":1721747755,"TalkTime":0,"UTC":1721751355}}
I suspect that I am entering the wrong data at
"YOUR-STREAM-URL"
What shall I enter? Just the IP address or something like ie.
rtsp://username:password@IPADDRESS/cam/realmonitor?channel=1&subtype=1#backchannel=0
-
@Cr4z33 said in [MMM-MQTTbridge] A module to publish and receive MQTT messages:
although I can see the MQTT event if running MM by npm start
if using pm2 to autolaunch MM, then
pm2 logs --lines=xxxx
will show you the last xxxx of the output
-
@Cr4z33 Hi,
think I found the problem.
You need to send streamX as value where X is the number of the stream in the configuration of MMM-RTSPStream.
You will need to configure the camera information in the MMM-RTSPStream module and only will be able to start the stream by notification -
@sdetweil said in [MMM-MQTTbridge] A module to publish and receive MQTT messages:
@Cr4z33 said in [MMM-MQTTbridge] A module to publish and receive MQTT messages:
although I can see the MQTT event if running MM by npm start
if using pm2 to autolaunch MM, then
pm2 logs --lines=xxxx
will show you the last xxxx of the output
@wishmaster270 said in [MMM-MQTTbridge] A module to publish and receive MQTT messages:
@Cr4z33 Hi,
think I found the problem.
You need to send streamX as value where X is the number of the stream in the configuration of MMM-RTSPStream.
You will need to configure the camera information in the MMM-RTSPStream module and only will be able to start the stream by notificationThank you both will do as soon as I am back at home again!