1

My setup:

  • RaspberryPi with openhabian + mqtt-broker
  • Esp8266 NodeMCU (mqtt client)

I have added an mqtt-broker with openhabian-config and downloaded the mqtt-binding via Paper UI. Additionally I was already able to power On & Off an output called Catflap via terminal using the following code:

mosquitto_pub -d  -t "openhabian/feeds/onoff" -m "ON"

and

mosquitto_pub -d  -t "openhabian/feeds/onoff" -m "OFF"

Issue:

Anyhow if I try to add a switch into the Items File it does not publish anything. I have been using MqttFX to check.

Here are my settings:

  • mqtt.cfg

    The only statement in the mqtt config

    # URL to the MQTT broker, e.g. tcp://localhost:1883 or ssl://localhost:8883
    #<broker>.url=tcp://<host>:1883
    broker.url=tcp://localhost:1883
    
  • Item File

    // This is the Items File
    // Catflap
    Switch CatFlap "Katzenklappe" ["Switchable"] {mqtt=">[broker:openhabian/feeds/onoff:command:ON:ON],>[broker:openhabian/feeds/onoff:command:OFF:OFF]" }
    
finefoot
  • 9,914
  • 7
  • 59
  • 102
T3n3d0s
  • 11
  • 1

0 Answers0