javiergayala / mmm-mqtt Goto Github PK
View Code? Open in Web Editor NEWThis is an extension for the MagicMirror² (https://github.com/MichMich/MagicMirror). It provides the ability to subscribe to MQTT topics and display them.
This is an extension for the MagicMirror² (https://github.com/MichMich/MagicMirror). It provides the ability to subscribe to MQTT topics and display them.
I made few modifications on visual side of the module
Optional rounding of displayed value. Now if MQQT message contains values like temperature or humidity, they can be rounded to specific number of decimals. Also it avoids bugs like temperature: -.345
.
Usage CSS to customize the look.
For those of us who have never worked with mqtt before how about an example config so we can see what it should look like?
I have it configured on a Pi2 connecting to an external broker. Screen says "MQTT data loading" but when I publish to ESP/Test with the topic 'Hello', nothing appears on the screen.
{
module: 'MMM-mqtt',
position: 'bottom_left',
header: 'Living Room Temperature', // This is optional
config: {
mqttServer: '10.0.2.8', //Connection string for the server to connect to (mqtt://localhost)
loadingText: 'MQTT Data Loading...', //Text to display while waiting for data to load
topic: 'ESP/Test/', //MQTT Topic to subscribe to on the server (sensors/temperature/livingroom)
showTitle: 'true', //Boolean to show/hide a title (default: false)
title: 'Test', //Title to show if showTitle is true
interval: '', //Refresh interval, not including MQTT subscription deliveries. (default: 300000)
postText: '', //Text to append after the data received from MQTT (default: '')
}
},
Have I got everything configured OK?
Hello,
could you Implement a feature to show subscribed Images from an MQTT Broker?
Thanks,
Stefan
First of all thanks a lot for this great plugin! I have it running on my RBPi based MM.
n my scenario it listens to my home assistant which publishes some sensor stats about my home.
I’m running three instances of this plugin, each listening to a different sensor . If I freshly boot the MM it works until suddenly it freezes and does stop updating the stats. At this point all the other MM plugins continue to work as intended. I checked and the broker actually keeps broadcasting updates values. Hence, I suspect that something with this plugin does not work. In order to get everything working again I need to restart Tge magic mirror.
It would be great if someone could help me to fix this.
Hi there,
Any plans to update this to allow it to connect to a broker with a username and password?
Hi... what about forwarding topics from mqtt as new notifications.
I think of using Alexa and AWS IoT Core for changing modules...
Regards,
Wolfgang
I'm trying to make my mqtt module subscribe and publish to a topic.
Since I have to choose, I added two separate instances of the module in the config file, which causes it to crash.
Is this possible using this module?
Update:
I managed to get it working. However, now when receiving a message on a topic it will show on both instances.
Is any chance to add option to add more than one mqtt topic in one instance od MMM-mqtt?
Multi room information about temperature or open windows status will be great
Regards
Hello Javier!
Is there any way to change the font size and the color from the mqtt output on my mm?
I have a mirror with dark spyglass so i would prefer brighter and larger fonts!
thanks!
I am running MM v2.10.1
Today I have a look at terminal and have found an ERROR message (the full log show below). Error appeared just 50 minutes after the MM start (once per each start).
By step-by-step verification, I have identified that the error is caused by the MMM-mqtt module.
[23:40:52.148] [ERROR] (node:13645) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 message listeners added. Use emitter.setMaxListeners() to increase limit
Full terminal log
**pi@raspberrypi:~/MagicMirror $ sudo npm start**
[email protected] start /home/pi/MagicMirror
./run-start.sh
[22:50:42.019] [LOG] Starting MagicMirror: v2.10.1
[22:50:42.036] [LOG] Loading config ...
[22:50:42.059] [LOG] Loading module helpers ...
[22:50:42.062] [LOG] No helper found for module: alert.
[22:50:42.064] [LOG] No helper found for module: clock.
[22:50:43.281] [LOG] Initializing new module helper ...
[22:50:43.283] [LOG] Module helper loaded: calendar
[22:50:43.287] [LOG] No helper found for module: currentweather.
[22:50:43.289] [LOG] No helper found for module: weatherforecast.
[22:50:43.430] [LOG] Initializing new module helper ...
[22:50:43.432] [LOG] Module helper loaded: newsfeed
[22:50:43.561] [LOG] Initializing new module helper ...
[22:50:43.562] [LOG] Module helper loaded: MMM-PIR-Sensor
[22:50:43.566] [LOG] No helper found for module: MMM-SmartWebDisplay.
[22:50:44.144] [LOG] Initializing new module helper ...
[22:50:44.145] [LOG] Module helper loaded: MMM-mqtt
[22:50:44.360] [LOG] Initializing new module helper ...
[22:50:44.361] [LOG] Module helper loaded: MMM-Remote-Control
[22:50:44.362] [LOG] All module helpers loaded.
[22:50:44.363] [LOG] Starting server on port 8181 ...
[22:50:44.376] [INFO] You're using a full whitelist configuration to allow for all IPs
[22:50:44.393] [LOG] Server started ...
[22:50:44.396] [LOG] Connecting socket for: calendar
[22:50:44.397] [LOG] Starting node helper for: calendar
[22:50:44.399] [LOG] Connecting socket for: newsfeed
[22:50:44.401] [LOG] Starting module: newsfeed
[22:50:44.402] [LOG] Connecting socket for: MMM-PIR-Sensor
[22:50:44.403] [LOG] Connecting socket for: MMM-mqtt
[22:50:44.405] [LOG] MMM-mqtt started ...
[22:50:44.406] [LOG] Connecting socket for: MMM-Remote-Control
[22:50:44.408] [LOG] Starting node helper for: MMM-Remote-Control
[22:50:44.436] [LOG] Sockets connected & modules started ...
[22:50:45.046] [LOG] Launching application.
[22:50:52.218] [LOG] Create new calendar fetcher for url: https://calendar.google.com/calendar......./basic.ics - Interval: 300000
[22:50:52.242] [LOG] Create new calendar fetcher for url: https://calendar.google.com/calendar......./basic.ics - Interval: 300000
[22:50:52.248] [LOG] Create new news fetcher for url: https://www..../rss/ - Interval: 300000
[22:50:52.367] [LOG] Creating new MQTT client for url: mqtt://localhost:1883
**[23:40:52.148] [ERROR] (node:13645) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 message listeners added. Use emitter.setMaxListeners() to increase limit**
I am running MM on the following hardware/software:
Raspbian version
pi@raspberrypi:~/MagicMirror $ cat /etc/os-release
>PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
>NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
Linux core
pi@raspberrypi:~/MagicMirror $ uname -a
Linux raspberrypi 4.19.75-v7+ #1270 SMP Tue Sep 24 18:45:11 BST 2019 armv7l GNU/Linux
Hardware model
pi@raspberrypi:~/MagicMirror $ cat /proc/device-tree/model
Raspberry Pi 3 Model B Plus Rev 1.3
Node and NPM version
pi@raspberrypi:~ $ node -v v10.18.1
pi@raspberrypi:~ $ npm -v 6.13.4
List of active MM modules
- clock
- calendar
- currentweather
- weatherforecast
- newsfeed
- MMM-PIR-Sensor
- MMM-SmartWebDisplay
- MMM-mqtt
- MMM-Remote-Control
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.