ESPresence Beacons not showing as Devices

I’ve got an ESPresence node sensor all set up and configured in HA, that appeared fine with auto discovery but I can’t get my iPhone to show up in Home Assistant.

I’ve enrolled my phone with ESPresence, and I can see the messages coming in on the espresence/devices/stuart_s_iphone/office topic & when I put that in HA’s MQTT debug section it is receiving them.

I’ve also added a section to configuration.yaml to tell it about the device:

  - platform: mqtt_room
    device_id: "stuart_s_iphone"
    name: "ESP Stuarts iPhone"
    state_topic: "espresense/devices/stuart_s_iphone"
    timeout: 60
    away_timeout: 120

but the phone never appears as a device under MQTT.

Where in configuration.yaml did you add this? Under what top level key? Should be under

sensor:

Yes, it’s under the top level Sensor: section.

Sensor: or sensor: ?

sensor:
  - platform: mqtt_room
    device_id: "stuart_s_iphone"
    name: "ESP Stuarts iPhone"
    state_topic: "espresense/devices/stuart_s_iphone"
    timeout: 60
    away_timeout: 120

were you able to figure it out I’m also having the same issue

No, I’m still working on it :frowning:

@junior_m2011 I finally fixed this issue so I thought I’d come back and update the thread with the steps I took.

Remove the Existing Config Topic from MQTT

Note: When doing this again to write this update, I didn’t need to remove the config, re-enrolling the phone updated the config automatically, however initially when solving the issue the config wasn’t getting updated, ymmv.

First you need to remove the config for the existing device from MQTT (I also removed & reconfigured the MQTT instance, but I don’t think that was really needed.) I used MQTT Explorer on my Mac. If you open the espresense folder, and then rooms you’ll find the config for your device under it’s irk ID. Just delete this topic to remove the config.

Screenshot 2024-09-22 at 09.44.52

This image shows my old config, the ID changes when I re-enroll it below.

Check the contents first to make sure you have the right one. Once you’ve done that have your phone “Forget” the Espresence pairing.

Re-Enroll your phone with Espresense

Just follow the instructions on the espresense website

Make sure you follow HA’s naming requirements as outlined in those docs, the default name generated by espresense will not work with home assistant, it can only include letters, numbers and underscores. Espresense uses colons & dashes by default which HA will not parse, and will not throw an error or warning about!

You might get the config to work if you quote the names with other characters, I have seen config that claims to work written like this, but I have not confirmed that myself, I made sure my names followed the naming instructions exactly, to remove as many variables from the problem as possible.

You might need to restart all your other espresense devices so they pick up the new enrolled name. Use your MQTT viewer and check if new messages are still coming in to the old topic, you should be able to tell which device is sending them by how recent the messages are.

Update your configuration.yaml

First, remove any config for the the device that isn’t working and RESTART HOME ASSISTANT. You can check it’s been removed by filtering the entity list in HA by the mqtt_room integration (if this was you’re only device and it’s gone, the integration won’t be available to filter by.)

Add a section that maps your device’s ID from Espresense to a Home Assistant device.

sensor:
  - platform: mqtt_room
    device_id: stuarts_iphone
    name: ESP Stuarts iPhone
    state_topic: espresense/devices/stuarts_iphone
    timeout: 60
    away_timeout: 120

After this you must RESTART HOME ASSISTANT, simply re-loading the yaml config will not pick up your changes. I suspect this is the most important step tbh, possibly the only step actually needed, but I have no way to verify that, but again, ymmv.

1 Like