Openmqtt DHT22 sensor data MQTT

Hello,

i try to connect ma ESP8266 with opnemqtt https://github.com/1technophile/OpenMQTTGateway to receive data from my DHT22 sensor.

Can someone help me to use MQTT with openhab2.4 to collect data vom this sensor?

Have you looked at the guide?

Looking through the issues it appears that Homie has not yet been implemented.

You should be able to enable the Home Assistant standard as documented here and use automatic discovery with the MQTT 2 binding.

But I highly recommend running OH 2.5 M1 or one of the latest snapshots. The MQTT 2.4 binding has a lot of known problems.

Thank you.

now i can switch on my RF socket.

But how can i use the “on and off values???”

If you want to link your channel to an openHAB Switch type Item, you can use these parameters to “map” openHABs ON/OFF states to your devices MQTT payloads - like “on”/“off” , “auf”/“zu”, “On”/“Off” etc.

i have to send the hole command

ON -> {“message”:"{“id”:0,“unit”:0,“on”:1}",“protocol”:“quigg_gt7000”}’
OFF -> {“message”:"{“id”:0,“unit”:0,“off”:1}",“protocol”:“quigg_gt7000”}’

What should i change in my screenshot to send the separate command for the on and off command?

That’s JSON and beyond me - I will let someone else pick this up, please!

i try it with JSONPATH but i am not sure how i can chance this code to JSONPATH with on and off function.

You put your JSONPATH in the Incoming value transformation box,
you put “on” in the On/Open value box,
you put “off” in the Off/Closed value box.

i thought my JSONPATH should look like

JSONPATH:$message.id[0].unit[0].string.protocol[quigg_gt7000]

Incoming value transformation* box, but there is something wrong.

Do you know how does the JSONPATH look like?

Can someone help me to create the right JSONPATH or can explain me how to use the on and off values with my ON and OFF code?