Read the statement by Michael Teeuw here.
MMM-MQTTbridge
-
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.
-
-
This is really needed and very nice!! Thank you!
-
Stupid novice question. How can I update the module? :) I have to remove the old one and upload the new one, is there any command to update the already uploaded module?
-
@majdzik84 upload? internet is upload, local computer is download
to update a module locally, you go to that module folder and do a git pull
sometimes you also need to do npm install again, but I would try first without it
-
Hello,
I installed the module on Aug 18, 2020 and have it connecting to my broker. Either I have something off or the module always sends out the notification’s payload and I cannot over-ride such. My notiDictionary.js file looks like this:
var notiHook = [ { notiId: "USERS_LOGIN", notiPayload: [ { payloadValue: '', notiMqttCmd: ["Command 1"] }, ], }, { notiId: "SHOW_ALERT", notiPayload: [ { payloadValue: '', notiMqttCmd: ["Command 2"] }, ], }, { notiId: "NEWS_FEED", notiPayload: [ { payloadValue: '', notiMqttCmd: ["Command 3"] }, ], }, ]; var notiMqttCommands = [ { commandId: "Command 1", mqttTopic: "mirror/profile", mqttMsgPayload: 'george' // mqttMsgPayload: '{state:"OFF"}' }, { commandId: "Command 2", mqttTopic: "mirror/alert/set", mqttMsgPayload: 'on' }, { commandId: "Command 3", mqttTopic: "mirror/alert/test", mqttMsgPayload: 'go' }, ]; module.exports = { notiHook, notiMqttCommands };
When an alert is shown, the SHOW_ALERT send an MQTT Topic of mirror/alert/set but the payload according to MQTT Snooper and my HomeSeer system is [object Object]. I expected it to be a string of on. NEWS_FEED does noth8ing, as expected from the config. USERS_LOGIN is from the MMM-Face-Reco-DNN module. It has a string value of the person who’s face it recognizes. When it recognizes me, the payload for the MQTT topic is Karl both when I have no value and when I have George in the payload setting as shown above.
This is how I have the module configured in the config.js file:
{ module: 'MMM-MQTTbridge', // disabled: false, config: { mqttServer: "mqtt://192.168.1.2:1883", mqttConfig: { listenMqtt: true, interval: 300000, }, 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 }, },
What might I be doing wrong?
Note that for an IP address and no username/password I had to set the server to mqttServer: “mqtt://192.168.1.2:1883”, dropping the colon (:) prior to the IP address. I had it in there based on the provided settings for the localhost version.
-
This post is deleted! -
Can I use this module to manage MMM-pages?
-
the module is working. try to reinstall it and check the configuration once more.
Here is the community member says that he uses module perfectly https://forum.magicmirror.builders/topic/13726/mmm-ledstripcontrol-control-a-led-strip-with-optional-pong-game-support@Mrtrol2013 said in MMM-MQTTbridge:
Can I use this module to manage MMM-pages?
Yes.
See
-
that part of MMM-pages’s readme here https://github.com/edward-shen/MMM-pages#regarding-notifications and
-
that part of MMM-MQTTbridge’s readme here https://github.com/sergge1/MMM-MQTTbridge#mqtt-to-notifications-dictionary-section
-
-
@KSumwalt please update the module and try once more. If the problem will exist, send here your logs
-
This post is deleted!