MQTT don't see the devices

Hello
MQTT is new to me and I don’t understand that yet. I installed the broker, created and configured users. Then I signed up a shelly and a dingz button to the broker. The broker seems to work, with MQTT Explorer I can detect communication.
But in Home Assistant on devices, at MQTT I can’t see the devices logged in to the broker.
I have repeatedly reinstalled the broker, restarted, etc. read instructions, watched Youtube videos. I’m sure the broker works perfectly, but why does HA not see the devices. HA MQTT is logged in to the broker with the correct user.

What do I not understand? and what do I do wrong?

Any reason you are using MQTT instead of the core Shelly integration that supports discovery?

Did you try the shellies discovery script ?

Incorporating Shelly with MQTT is actually only for testing. I usually use “normal” integration. But I’m trying to understand MQTT. Actually, I want to integrate my dingz button into MQTT. Did it also need a discovery for this? Will not automatically display all devices that are logged in to MQTT broker?

thank you very much for answer me. For other devices, in my case dingz buttons. Does it need a special discovery for this? That’s exactly what I don’t understand. In the broker I can see the logged-in devices communicate. But I don’t see these devices in HA.

Have you setup the MQTT integration in HA ?

Once you get your head around how it works, there really isnt much to it.

Messages are published to topics. Devices can subscribe to topics, and perform an action when something is published to that topic.

EG:
You tell HA to turn a light on
HA publishes a message “ON” to the configured topic light/command
The light is subscribed to that same topic light/command, sees a new message, and turns on.

The light then publishes a message to a second topic, light/state, “ON” confirming that yes, indeed that light is now on.
HA sees this message, and updates the state of the light in HA to on.

Entities (switches, lights etc) dont always automatically appear in HA just because they are using MQTT. There is a special topic used for discovery. If you have MQTT setup and working, you may just need to manually create your device in your configuration.yaml file.

If your dingz button does not have discovery, you have to configure it manual in .yaml
or use mqtt triggers.

Yes that be installed and it see traffic from the broker. But i cant see it as devices for to use in HA.

I also think that the dingz devices must add it manualy, but thats a to high level for me. I have no idea how to do that. The instruction gives me more ???

Start by showing what you receive in the broker when you press the button.

The MQTT receive as sample “Nachricht 42 empfangen auf dingz/xxxxxxxxxxx/dz1f-pir/event/pir/0 um 14:32:”

or Nachricht 47 empfangen auf dingz/xxxxxxxxxxx/dz1f-pir/event/button/2 um 14:33:

That does not help at all

‘Message 42 received on dingz/xxxxxxxxxxx/dz1f-pir/event/pir/0 at 14:32:’

What is the content of the message ?

For dingz there is a custom integration :

Oh, thank you very much! I’ll deal with it. I was previously looking for it, but I didn’t find it.

This integration is not working at the moment. And I see, this integration is not with MQTT.

I can see only Messages like this in the HA MQTT Device Integration. And in the MQTT Explorer I can see little more, please see attached screenshot.

What i see its, the Broker it works, but what i must do for create a device in HA for each dingz device, about that i have no idea. i can see a Message if i push a button, or a sensor value change it, or the PIR Sensor detecting a motion.

And here some communication in HA

did you fix your problem. I have the same issue. Can’t see any device under Mqtt. Broker is working, I see my devices there. Also I deployed the shelly discovery script. Any solution till now

Hi @uwelklumpp ,

this MQTT works for a different MQTT installation I have:

mqtt:
  sensor:
    # Dragino Gateway dragino-275a08 sensors
    # Sensor-1
    - state_topic: "homeassistant/dragino-275a08/018905E4/data"
      name: "dragino-275a08-018905E4-temp"
      value_template: "{{ value_json.TempC_SHT }}"
      unit_of_measurement: "°C"
      unique_id: dragino-275a08-018905E4-temp
      device_class: temperature
    - state_topic: "homeassistant/dragino-275a08/018905E4/data"
      name: "dragino-275a08-018905E4-hum"
      value_template: "{{ value_json.Hum_SHT }}"
      unit_of_measurement: "%"
      unique_id: dragino-275a08-018905E4-hum
      device_class: humidity
    - name: "dragino-275a08-018905E4-bat-stat"
      state_topic: "homeassistant/dragino-275a08/018905E4/data"
      value_template: "{{ value_json.Bat_status }}"
      unit_of_measurement: "%"
      unique_id: dragino-275a08-018905E4-bat-stat
      device_class: battery

deliverd raw data of the sensor is

{"Bat_status":3,"TempC_SHT":-18.99,"SNR":8.5,"Hum_SHT":53.4,"EXT":"Illumination Sensor","RSSI":-75,"ext_sensor":1,"ILL_lux":65535,"BatV":2.871}

You should use MQTT explorer to see what the Broker is getting (I used mosquitto on HA) and adapt from the above. Problems might be device classes, etc. pp. But this is what you might find in the forums here. Sorry, I cannot help with dingz, but if you get MQTT “flooding around” (which you can see with mqtt explorer), than you are 90% there, and should put the above into your configuration.yaml

Above is ONE physical sensor, that delivers 3 different state topics. Maybe you can cut out 2. But really use mqtt explorer. That is the swiss army knife you need!

thanks
Juergen

Hi Juergen,
thanks for supporting me. I have this new shelly uniplus multisensor installed. This sensor should count me the gas consumption. In the shelly app and also with the mosquito explorer I see the right infomation eg.
Bildschirmfoto 2024-02-27 um 16.07.33

But I have no clue in which way I can define this information in the right form into the configuration.yaml. Which device_class i should use …

After a while I found a solution for define the sensor values for the shelly - multisensor uniplus.

mqtt:
    sensor:
        - name: GaszaehlerUwetotal
          state_topic: "Gaszaehler/status/input:2"
          value_template: " {{ value_json['counts'].total}} "      
    
        - name: GaszaehlerUwextotal
          unique_id: "shellyplusuni-a0a3b3688a48"
          state_topic: "Gaszaehler/status/input:2"
          value_template: " {{ value_json['counts'].xtotal}}