MQTT Binding 2.4 via Docker on Synology - Aqara Sensor & Osram Smart Plug

Hello everyone, I need your help. I already spent two days trying and reading, reading and trying and I don’t know what to do anymore. My problem is that everything seems to work, but I can’t get any further with OH2.4 integration.

After some problems now run in the Docker container: Zigbee2Mqtt (koenkk) und MQTT (eclipse) on Port 1883).

The following two devices are connected to the Zigbee2mqtt and seem to report the data.
0x00158d00025d8703 is the Aqara Temp Sensor
0x00158d00025d8703 is the Osram Plug

The configuration.yaml looks like this:

homeassistant: false
permit_join: true
mqtt:
base_topic: zigbee2mqtt
server: ‘mqtt://192.168.2.200:1883’ // IP Diskstation
serial:
port: /dev/ttyACM0
devices:
‘0x00158d00025d8703’:
friendly_name: ‘0x00158d00025d8703’
retain: false
‘0x84182600000eb9c6’:
friendly_name: ‘0x84182600000eb9c6’
retain: false

The Mosquitto.conf looks like this:

Place your local configuration in /mqtt/config/conf.d/

#pid_file /var/run/mosquitto.pid

persistence true

persistence_location /mosquitto/data/

user mosquitto

Port to use for the default listener.

port 1883

log_dest file /mosquitto/log/mosquitto.log

#log_dest stdout

#include_dir /mqtt/config/conf.d

A connection to the MQTT Eclipse can be established via MQTT.fx. Both Puplish and Subscripe seem to work.

In OH2.4 both the binding is installed, and connected to the MQTT
image

Now I’m trying to add a new THING, but I don’t know where to add what.
I would like to read the temperature from the sensor on the one hand and switch the Smart Plug on/off on the other hand. I am very grateful for help!


Have a look into the second part of this thread

Hi Jürgen,
thanks but from the command lines of sonoff (which are mostly described) I don’t get smart. I would need someone to look at my configuration above and tell me where to put what. Sorry, but I’ve gone through all the variations of sonoff in the meantime.

In short for a switch create an On/Off Type channel, for the temperature a number channel.
For both to report their respective state back the state topic has to be set, for the On/Off you need to set the commandtopic as well.
You do have the needed settings in your MQTTfx.

In short for a switch create an On/Off Type channel, for the temperature a number channel.

It’s not these settings. I had already read this out in the instructions.

For both to report their respective state back the state topic has to be set, for the On/Off you need to set the commandtopic as well.
You do have the needed settings in your MQTTfx.

can you show me how and where?

Subscribe to the statetopic “zigbee2mqtt…” and use “JSONPATH:$.temperature” as Incoming value transformation (found when clicking “show more”)

Sensational! OH pulls the data of the temperature sensor!!! T H A N K S :slight_smile:
Can you help me with the Osram plug - How do I configure it to switch?

image

The same as told above, use the topic that did command to switch as the commandTopic and the topic that reported the state as stateTopic.

I’m sorry, I don’t get it. Could you explain it for stupid people?

Sorry, but I do not have an Osram switch device from which I could copy the command. However you have one and you most probably do have some documentation on that. You need to find the command take initiates the switch to be operated. If you have that, someone could help.
If you can send such a command from “somewhere” your MQTT would show it.