ottopaulsen / MMM-MQTT

MQTT Client module for MagicMirror2
MIT License
57 stars 29 forks source link

openHab Tasmota Integration #34

Closed korbinian23 closed 4 years ago

korbinian23 commented 4 years ago

Hi i need help please to integrate a DHT11 Sensor. The sensor is integrated in openHab2.

The export on my mosquito mqtt broker is:

tele/dht_schlafzimmer/SENSOR {"Time":"2020-03-26T10:24:21","DHT11":{"Temperature":24.7,"Humidity":46.0},"TempUnit":"C"}

For openHab i use this ones:

Thing mqtt:topic:dht_schlafzimmer   "dht_schlafzimmer"      {
        Type number :   Temperature  "Temperature"                    [
            stateTopic="tele/dht_schlafzimmer/SENSOR",
            transformationPattern="JSONPATH:$.DHT11.Temperature"

I tried it like this:

    {
    module: 'MMM-MQTT', // https://github.com/ottopaulsen/MMM-MQTT
        position: 'bottom_right',
        header: 'Temperaturen',
        config: 
        {
            mqttServer: '192.168.178.xx',   // OpenHAB
            port: '1883',
            subscriptions: 
            [
                {
                    label: 'Innen',
                    topic: 'tele/dht_wohnzimmer/SENSOR',
                    jsonpointer: 'DHT11/Temperature'
                }
            ]
        }
    },

But something isn't right.

Can you help me out?

korbinian23 commented 4 years ago

Found the Problem by myself