Read the statement by Michael Teeuw here.
MMM-MQTT - JSON Syntax
-
Hi all
I’m trying to display MQTT data from my solar system battery logger so that a simple capacity percentage will display on the MagicMirror. I’m using the MMM-MQTT module. While the module loads up fine, it doesn’t seem to interpret the data and simply displays " Loading "
I need to retrieve a particular value within the topic. That value has a label of capacityP. The Pi running MagicMirror has a Mosquitto broker installed natively. And if I query the MQTT topic, it’s receiving data correctly. I think where I’m falling short is the syntax around retrieving the capacityP value from the topic. Any ideas ? I’ve tried so many different options. But I just can’t get it right!
*{ module: 'MMM-MQTT', position: 'bottom_left', header: 'SolarMD Battery', config: { mqttServer: 'mqtt://localhost', port: '1883', label: 'Charge Level', decimals: 1, topic: 'solarmd/energy/outputEnergy/bank1', jsonpointer: '{"solarmd": {"energy": {"outputEnergy": {"bank1": {"capacityP"}}}}}', suffix: '%'*
-
-
Thanks so much for the response. That syntax/config was the latest version ( of sooo many ) I tried where I just couldn’t get it to work
I have since taken another route. I’m running Home Assistant and MQTT Docker containers on a Synology NAS. Home Assistant displays the info I need via a simple custom dashboard. I then use an iFrame on the Magic Mirror to display said data. Works a treat