How do I get the temperature data using mqtt?

Good Morning:
I want to use two raspberrys for the control of home heating, automatic ignition of the gas boiler depending on the temperature of the room and also depending on the time.
One of the rasperry I use as temperature probe of the room.
I have installed openhab on both raspberrys and also MQTT.
How do I get the temperature data from the raspberries using mqtt in the raspberry server?
MQTT works correctly for me, I want the code so that the rasp-server reads the data and that way I can create the rules.


On the other hand I would like to connect with the smartphone in “myopenhab”, but I get this code:
“Exception stack: java.io.IOException: Unauthorized”

Thanks in advance.

You have several issues here.

  1. MQTT use with OH
  2. MQTT to read Raspi data and send to MQTT broker
  3. Android App
  4. Asking for code

1:
https://docs.openhab.org/addons/bindings/mqtt1/readme.html

2:
Google it

3:
Search the forum

4:
Don’t. Come up with your own, search on the forum, if it doesn’t work, we will help

You know what you want to do. You now need to do your own research and coding. When you get stuck with openHAB we’ll step in. Start by searching the forum the answers to all your questions are already there.

Thanks.