[MMM-MQTTbridge] A module to publish and receive MQTT messages
MMM-MQTTbridge allows you to integrate your MagicMirror into your smart home system via MQTT protocol and manage MagicMirror via MQTT messages by converting them into MM Notifications and vise verse - listen to your MM’s Notifications and convert them into MQTT mesages.
So, this module for MagicMirror does the following:
Listens to MQTT messages from your MQTT broker and, if mqtt-message arrives, module sends MM Notifications based on the pre-configured mqtt-to-notification Dictionary rules.
Listens to the MM Notifications within your MagicMirror environment. If Notification arrives, module sends MQTT message based on the preconfigured notification-to-mqtt Dictionary rules.
- introducing two new conditions
timeto suppress messages / notifications if they happen to quickly after each other and
tdiffto send messages / notifications only if they changed or there is enough time gap between the last one
- it is possible to configure notifications / messages which should be send after the module connected and subscribed successfully now
- it is possible the parse the input of MQTT messages as JSON now
- the JSON content of MQTT messages now can be filtered with JSONPath-Plus
- the payload of MQTT messages or notifications now can be formatted with a format string before further processing happens
- it is possible to configure complex conditions (equal, lower than, lower equal, greater, greater equal, includes, matches) for message and notification processing now
This is the first release after the ownership of the module changed to Tom-Hirschberger
There are breaking changes in the
mqttDictionary.jswith this release. Make sure to save the two dict files before updating. The files will be ignored with future releases and there is no need to be careful with them after version 2.0.0! Please read the two sections in the Readme about the dictionaries.
The following things changed:
- The way of how to configure how to ignore the payload of notifications and MQTT messages changed
- The way of how to configure how to send the payload of notifications as MQTT messages and the payload of MQTT messages as payload of notifications changed
- It is now possible to configure a “last will” message and define if you like a clean MQTT session (see http://www.steves-internet-guide.com/mqtt-clean-sessions-example/ for details) or any other of MQTT.js supported connection option
- It is now possible to configure a QoS value, the retain flag and any other of MQTT.js supported option for published MQTT messages (either in general or individual for single messages)
- It is now possible to configure a QoS value and any other of MQTT.js supported option for subscribed MQTT messages (either in general or individual for single topics)
- The paths of the dictionary files can be configured now and the dictionary files in the “dict” directory will be ignored during updates.
- If one of the dictionary files is missing or has syntax errors a warning is printed but the module starts with empty configuration (and does not crash the whole mirror anymore)
- The speed of the notification and message filter has been increased