MQTT Discovery - ESPRESENSE - dont create sensor

Hi guys, I’m coming here for advice. I installed espresense on esp32. In HA I see that the sensor is working properly. He shows me the room - workroom.

I inserted the sensor of my iphone into configuration.yaml, but I don’t see it in the developer tools. MQTT discovery won’t create anything for me, it won’t find anything.

  - platform: mqtt_room
    name: "FajnyiPhone"
    device_id: "apple:iphone13-2"
    state_topic: "espresense/devices/apple:iphone13-2"
    timeout: 5
    away_timeout: 120

In mqtt explorer I see this in espresense/devices/apple:iphone13-2

{“id”:“apple:iphone13-2”,“name”:“iPhone13,2”,“disc”:“351f438b03bf68”,“idType”:40,“rssi@1m”:-65,“rssi”:-69,“mac”:“6b5819e8158e”,“raw”:1.3,“distance”:1.25,“speed”:0}

I tried google and found that I had to run a script that would create entities, but I guess I have the wrong ones.
I tried deleting the mqtt addon and reinstalling it with the autodiscovery option, I created a new user account, but it doesn’t do anything.

Am I doing anything wrong?
Thanks a lot

Hi,

This initially got me too but you don’t reference the indiviual device topic instead you use the common topic for all devices

    state_topic: 'espresense/rooms'
  - platform: mqtt_room
    device_id: "replace_with_your_device_id"
    name: 'My Mobile'
    state_topic: 'espresense/rooms'

Good luck

Dear _dev_null, thanks a lot for your reply/advice…

I also tried this configuration, but nothing happen.

  - platform: mqtt_room
    name: "FajnyiPhone"
    device_id: "apple:iphone13-2"
    state_topic: "espresense/rooms"
    timeout: 5
    away_timeout: 120

No worries… Do you have auto discovery setup ?

I created new user only for mqtt.

image

I see info about sensors under topic: espresense/rooms and devices in MQTT explorer…

image